Connector setup on SuprSend
Login to SuprSend dashboard. Go to Settings-> Connectors. Select “Segment” from the connectors list. This is how segment integration page looks like.
1. Add Prefix to track events
This option allows for distinguishing the events coming from multiple data sources such as SuprSend SDK and Segment, or any other connector. By enabling this feature, a prefix ofsegment : 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
2. User preference mapping
There are certain reserved properties in SuprSend user profile, such as language preference. In order to map these reserved properties, you have to define the trait in Segment identify call whose value should be mapped to the reserved property. e.g.. if you definelanguage 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
-
Segment
userIDis used to map thedistinct_idof user on SuprSend. -
All properties inside
traitsare 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
3. User channel mapping
For existing segment users, you can use the same mapping that is used to track user channels in your segment identify call in SuprSend as well. Just map the channel keys in the Segment identify call with the corresponding communication channel in SuprSend interface. By default, theemail 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
Now that the desired mapping of Segment events and users in SuprSend has been established, the next step is to start Segment integration.
Setting up data sync from Segment to SuprSend
You’ll have to configure SuprSend as a destination in Segment.Use webhooks destination to connect with SuprSendSince, we are in beta and we don’t have a first-party integration with Segment yet, you can use webhooks in Segment destination list to connect with SuprSend.
1
Add SuprSend as destination in your segment account
-
Login to your Segment account. Select Connections-> Destinations from the side navigation menu and click on “Add Destination”

2
Search for webhook
This will open destinations catalog. Search for webhook and select “Webhooks (Actions)”

3
Add Destination
On the Webhooks page, click on “Add destination”

4
Pick Data Source
Select the data source from which you are syncing your user and event data and click on “Next”
5
Add Destination Name
On the setup screen, add Destination name. Destination name can be “SuprSend {workspace}”. For example- For staging workspace, the destination name can be “SuprSend Staging”. Choose “Fill in settings manually” and click on “Create destination”.

6
Create a New Mapping
Now, on your webhook destination page, go to Mappings tab and create a +New Mapping.

7
Send an HTTP Request
Select Send an HTTP request in Add Mapping modal and add below details

8
Add below mapping in the send request:
-
Select any of event type- track and identify
-
In Add test event, select Load Test Event from Source
- In Select Mappings, add below details:
URL: https://hub.suprsend.com/connector/segment/
Method:POSTAuthorizationin headers:Bearer _api_key_(Please make sure to replace “api_key” with actual api key from segment connector settings page.)

9
Sending Test Event
Now, send a test event of type 
Once your SuprSend connection is successful, try sending a test
track or identify. You’ll see status 200 OK response and the corresponding event on SuprSend dashboard -> API logs page.
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.10
Enable Mapping
-
After successful testing, Save and Enable the mapping.

11
Enable Destination in Settings
Also enable destination in Settings tab to start sending webhook data to SuprSend.
