Integration with Segment CDP (as Destination)
Last updated February 28, 2024
Segment removes the need to build a connection to the Mailmodo API yourself. Anytime you Identify a person on your site, they’ll be added to a Mailmodo contact database or, if they’re already on it, their traits will be updated based on your Segment traits. Similarly, when a user performs any activity on your site, you can use Segment Track calls to push those activities to Mailmodo. You won’t need to do any additional development to configure any of these features.
Once the identify and track data is synced to Mailmodo, you can segment the user and send them personalized campaigns at scale.
Getting Started
Step 1: From the Destinations Catalog page in the Segment App, click Add Destination.
Step 2: Search for “Mailmodo” in the Destinations Catalog, and select the Mailmodo destination.
Step 3: Choose which Source should send data to the Mailmodo destination.
Step 4: Go to the Mailmodo Platform , navigate to Settings > API Keys, then create a new API and copy the same.
Step 5: Enter your copied API Key under Connection Settings in the Mailmodo destination settings in Segment.
Step 6: Switch on the slider button under Settings for the connection to become Enabled.
Supported Methods
Mailmodo supports the following methods, as specified in the Segment Spec .
Identify
If you aren’t familiar with the Segment Spec, take a look at the Identify method documentation to learn about what it does. An example call would look like:
{
"type": "identify",
"traits": {
"name": "Anushka Agnihotri",
"email": "anushka@mailmodo.com",
"plan": "lite",
"logins": 5
},
"userId": "97980cfea0067"
}
Every time you call identify with an email address included, we will:
- First ask Mailmodo if that email exists.
- If the email doesn’t exist, then we will add the user as a Contact to the Mailmodo database and match user properties with the Segment traits sent in identify call payload.
- If the email exists, then we will update the user properties for the Contact against the Segment traits sent in identify call payload.
All the special traits recognized by Segment will be translated and matched with the Mailmodo accepted user properties for a Contact. These fields will be automatically created in Mailmodo and will be available for personalization and advanced segmentation.
Please note the following things: 1. The email field is required. Identify calls without an email are dropped. 2. If different email addresses are sent against the same user id in identify call, then they are treated as two different contacts in Mailmodo.
Track
If you aren’t familiar with the Segment Spec, take a look at the Track method documentation to learn about what it does. An example call would look like this:
{
"type": "track",
"event": "User Registered",
"properties": {
"plan": "Lite",
"accountType" : "Personal"
}
}
Segment sends Track calls to Mailmodo as a Custom Event. When you call track , we’ll send the event to Mailmodo with the event name and all properties that you specified.
Be sure you send an Identify call for any user who will trigger Track calls. If Mailmodo receives a Track call for an unknown userId, the call is dropped.
Settings
Segment lets you change these destination settings from the Segment app without having to touch any code.
SETTING | DESCRIPTION |
API Key (required) | string. Please include the API key from Mailmodo |
How will the traits of a user in Segment be integrated into Mailmodo?
Property name in Segment | Property name in Mailmodo | Data type in Mailmodo |
address.city | city | String |
address.country | country | String |
address.postalCode | postal_code | String |
address.state | state | String |
address.street | address1 | String |
age | age | Number |
avatar | avatar | String |
birthday | birthday | Datetime (ISO) |
company.name | company | String |
company.id | company_id | String |
company.industry | company_industry | String |
company.employee_count | company_employee_count | Number |
company.plan | company_plan | String |
createdAt | created_at | Datetime (ISO) |
description | description | String |
String | ||
firstName | first_name | String |
gender | gender | String |
userId | segment_id | String |
lastName | last_name | String |
name | name | String |
phone | phone | String |
title | designation | String |
username | username | String |
website | website | String |
Any new property receive will have the same name as Segment, and it's data type will be inferred from the value of the property
FAQ
Q) How to sync historical data from Segment?
A) Mailmodo destination supports cloud-mode data which enables customers to sync historical data from Segment into Mailmodo. To import historical data, you need to perform the following:
- Reach out to Segment Support for syncing or replaying historical data to Mailmodo Destination. To learn more about replaying, check segment documentation .
- Raise a ticket with Mailmodo Support to delete existing data from Segment if required.
If you face any problems, reach out to us at Mailmodo Support or share your thoughts at Mailmodo Product Feedback .