Register Users and Devices

Use the SDK to register users and devices in Marketing Cloud Next. Registration is required to send messages to your users.

Before you begin, configure the SDK and initialize it.

The party identifier is a unique identifier that represents an individual in Marketing Cloud. It can be a customer ID, mobile number, email address, loyalty number, or another value.

Skip this step if you want to send only to anonymous users. For an anonymous user, the party identifier is a random GUID.

To set the party identifier for Android apps, use this code example.

To set the party identifier for iOS apps, use this code example.

Optimize API calls to Marketing Cloud Next by updating the locally stored Individual record only when your app is in the foreground. If your app is in the background, the SDK initializes to show a notification or to pre-cache messages, resulting in unnecessary communication with Marketing Cloud Next.

A registration is considered invalid if it doesn’t contain all the required fields, or if there are errors in the required fields. If a registration is invalid, the device is set to an inactive or opted-out state.

  1. To verify that the registration information is properly recorded, review how to test and validate registrations.

Registrations are asynchronous. While the SDK can receive a successful 201 response from the server indicating that it received the registration, it can’t determine whether it successfully processed it. The SDK also can’t know whether the server marked the registration as invalid.

This code sample shows an example of a registration request.