How Suprsend identifies a user
SuprSend identifies users with immutabledistinct_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.
Create User
To create a new user or to update an existing user, you’ll have to fetch user instance. Callsupr_client.user.get_instance to instantiate user object.
Edit User
To Edit user, you need to first fetch user instance, call all the update methods and save changes usingusers.Save() method.
Add User Channels
Add User Channels
Add communication channels on which you want to notify user. Push and Inbox tokens are automatically tracked on user identification when the corresponding frontend SDK is integrated. Other channels (Email, SMS, Slack, MS Teams, WhatsApp) need to be explicitly set in user profile.Use
user.Add* method(s) to add user channels.Remove User Channels
Remove User Channels
Use
user.Remove* method(s) to remove channels.Remove Channel types
Remove Channel types
This method will delete/unset all values in specified channel for user (ex: remove all emails attached to user).
Set Preferred language
Set Preferred language
If you want to send notification in user’s preferred language, you can set it by passing language code in this method. This is useful especially for the applications which offer vernacular or multi-lingual support.
Set preferred timezone
Set preferred timezone
You can set timezone of user using this method. Value for timezone must be from amongst the IANA timezones.
Set
Set
Set is used to add custom user properties. It is an upsert function, meaning any existing property value with the same key will be overwritten on subsequent updates.
Unset
Unset
Unset is used to remove a property key.
Append
Append
This method will append a value to the array list.
Remove
Remove
This method will remove a value from the array list.
Set Once
Set Once
Works just like user.Set, except it will not override already existing property values. This is useful for properties like first_login_date.
Increment
Increment
Increase or decrease integer values on consecutive action, like login count. To reduce a property, provide a negative number for the value.
Bulk Update Users
Bulk operations use UPSERT to create or update users. There isn’t any limit on number-of-records that can be added tobulk_users instance. Use .append() on bulk_users instance to add however-many-records to call in bulk.
Get user details
Delete user
Get list of objects subscribed by user
You can pass optional query parameters -limit, before, after
Get lists subscribed by user
You can pass optional query parameters -limit, before, after