Guide to integrate and sync data from Segment on SuprSend using webhooks.
segment :
will be added to all event names coming from Segment. This is particularly useful for existing Segment and SuprSend users who are passing the same events from both SuprSend SDK and Segment. By default, SuprSend assumes that events coming from all sources are unique and does not add any prefix to the event name.
For example- if the segment track API call looks like this
language
as the mapping key for Preferred Language in SuprSend. The value passed against language
trait in Segment identify call will be mapped as user preferred language in SuprSend.
Example of Segment identify
API call
userID
is used to map thedistinct_id
of user on SuprSend.
traits
are considered as user properties which can be further used to map user channels and preferences in SuprSend.
hi
will be set as the preferred_language in user profile
Key mapping in Segment Connector Settings
mapped value in user profile
email
trait in the Segment identify call is mapped to the Email channel in SuprSend, and the phone
trait is mapped to the SMS channel. You can add the mapping of other channels in the similar way
For new users setting up a fresh Segment integration, below table can be used as a reference for mapping user channels in both SuprSend and Segment:
SuprSend User Channel | Segment key |
---|---|
SMS | phone |
Slack (Email) | slackEmail |
Slack (User ID) | slackUserID |
Androidpush (FCM) | fcmAndroidpush |
Androidpush (Xiaomi) | xiaomiAndroidpush |
iospush (APNS) | apnsIospush |
identify
API call
Save Mapping
to save the changes
Add SuprSend as destination in your segment account
Search for webhook
Add Destination
Pick Data Source
Add Destination Name
Create a New Mapping
Send an HTTP Request
Add below mapping in the send request:
URL: https://hub.suprsend.com/connector/segment/
Method:POST
Authorization
in headers:Bearer _api_key_
(Please make sure to replace “api_key
” with actual api key from segment connector settings page.)
Sending Test Event
track
or identify
. You’ll see status 200 OK
response and the corresponding event on SuprSend dashboard -> API logs page.200 OK
response in event tester, this means that Segment was unable to successfully setup your SuprSend connection. Double check Webhook URL and header in step-7 and see if its configured correctly in the Destination settings.identify call
and see if the user channels are mapped correctly in SuprSend. You can see the synced user on SuprSend dashboard -> Subscribers page. Also, send a test track event
call and check if the workflows are getting triggered.Enable Mapping
Enable Destination in Settings