How Suprsend identifies a user

SuprSend identifies users with immutable distinct_id. It’s best to map the same identifier in your DB with distinct_id in SuprSend. Do not use identifiers that can be changed like email or phone number. You can view synced users by searching distinct_id on Users page.

Identify user and Set Push token

1

Create/Identify a new user

You can identify a user using thesuprsend.identify() method. iospsuh token is automatically set in user’s profile when this method is called. Call this method as soon as you know the identity of user, that is after login authentication. If you don’t call this method, user will be identified using distinct_id (uuid) that sdk generates internally.

We internally create an event called $user_login. You can see this event on SuprSend workflows event list and you can configure a workflow on it.

suprsend.identify(distinct_id);

//Sample Values
suprsend.identify("291eaa13-62f5-4d52-b2dd");
ParametersTypeDescription
distinct_idint, bigint, string, UUIDmandatory Unique identifier for a user across devices or between multiple logins.
2

Call reset to clear user data on log out

As soon as the user logs out, call suprsend.reset() method to clear data attributed to a user. This allows you to handle multiple user logins on a single device and keep their data isolated from each other.

suprsend.reset();

Don’t forget to call reset on user logout. If not called, users’ distinct_id will not reset and multiple tokens and channels will get added to the distinct_id who logged in first on the device.

Set Communication Channels

Mobile push tokens automatically gets updated in user profile on suprsend.identify() call. All you have to do is to integrate push notification service in your application to start sending mobile push notification. To set other communication channels, use below methods:

Set User Properties

(currently not available in iOS SDK)

You can sync other user properties in SuprSend and use it to pass dynamic content in template or add in workflow conditions.