Batch (Actions) Destination
Batch is a customer engagement platform for personalized, timely notifications and messages that boost retention and drive growth.
This destination is maintained by Batch. For any issues, contact Batch Support.
Getting started
- From your workspace’s destinations catalog, search for Batch.
- Select Batch (Actions) and click Add Destination.
- Choose the source you want to connect to Batch (Actions).
- In the Batch dashboard, copy your Project Key and REST API Key.
- Paste the Project Key and REST API Key into the Batch destination settings in Segment.
- Toggle Enable Destination. Segment will start sending data to Batch according to your Mappings.
Destination Settings
Setting | Description |
---|---|
REST API Key | Required. Token used to authorize sending data to the Destination platform |
Project Key | Required. The unique project key identifying your project in the Destination platform |
Available Presets
Batch (Actions) has the following presets:
Preset Name | Trigger | Default Action |
---|---|---|
Update Profile | Event type = "identify" Event type = "track" |
Update User Profile |
Available Actions
Build your own Mappings. Combine supported triggers with the following Batch-supported actions:
Mapping limits per destination
Individual destination instances have support a maximum of 50 mappings.
Update User Profile
Sends user events or creates and updates user profiles in Batch.
Update User Profile is a Cloud action. The default Trigger is: type = "identify" or type = "track"
Field | Description |
---|---|
Identifiers* | Type: OBJECT User identifiers |
Profile attributes | Type: OBJECT Attributes for the user profile. Batch can accept up to 50 attributes per user. |
Event Name | Type: STRING The name of the event. |
Event Attributes | Type: OBJECT An object containining the event’s attributes |
Profile attributes mapping
If you’re new to the Identify call, see the Segment spec for more details.
When you call Identify, Segment maps userId
to identifiers.custom_id
and writes traits into attributes
.
Example Identify call (Segment input)
analytics.identify("97980cfea0067", {
name: "Peter Gibbons",
email: "peter@example.com",
phone: "+33600000000",
email_marketing: "subscribed",
sms_marketing: "unsubscribed",
plan: "premium",
logins: 5
}, {
context: {
timezone: "Europe/Paris",
locale: "fr-FR"
}
});
Auto-mapped fields (native)
Segment field | Batch field |
---|---|
userId |
identifiers.custom_id |
traits.email |
attributes.$email_address |
traits.phone |
attributes.$phone_number |
traits.email_marketing |
attributes.$email_marketing |
traits.sms_marketing |
attributes.$sms_marketing |
context.timezone |
attributes.$timezone |
context.locale → language (for example: fr ) |
attributes.$language |
context.locale → region (for example: FR ) |
attributes.$region |
Notes
$email_marketing
/$sms_marketing
: usesubscribed
/unsubscribed
.- A locale like
fr-FR
is split into language (fr
) and region (FR
). - All other non‑reserved fields become custom attributes under
attributes
(strings, numbers, booleans, arrays of strings). Avoid arbitrary nested objects.
For more details on the fields to be included, refer to the Batch API Profile documentation.
Resulting Batch profile payload (output)
{
"identifiers": {
"custom_id": "97980cfea0067"
},
"attributes": {
"$email_address": "peter@example.com",
"$phone_number": "+33600000000",
"$email_marketing": "subscribed",
"$sms_marketing": "unsubscribed",
"$language": "fr",
"$region": "FR",
"$timezone": "Europe/Paris",
"name": "Peter Gibbons",
"plan": "premium",
"logins": 5
}
}
Add custom mappings
To map additional traits into Batch profile attributes:
- Open your destination → Mappings → Edit Mapping.
- Go to Profile attributes → Add Mapping Field.
- Choose a source (for example,
traits.plan
) and set a target underattributes
(for example,attributes.plan
).
- In Step 4 – Send test record, you can test your mapping before saving.
- Save and enable the mapping.
Supported types
Strings, numbers, booleans, arrays of strings are supported. Avoid arbitrary nested objects.
Historical backfill request
If you want to integrate your entire Segment userbase into Batch using the Identify method, you can request a historical backfill from Segment.
To do this:
- Contact Segment Support at friends@segment.com.
- Request a historical replay of your data.
- Provide Segment with the following details:
- Start date and time
- End date and time (usually “now”)
- Source: the Segment source you want to replay
- Destination: Batch (Actions)
- Events:
Identify
Segment will then replay your historical data so Batch can import your full userbase.
Profile events mapping
When you call Track, Segment uses your userId
as Batch’s identifiers.custom_id
. A userId is required to attribute the event to a profile.
For more details on the Track call, see the Track spec.
Example Track call (Segment input)
analytics.track("User Registered", {
plan: "Pro Annual",
accountType: "Facebook"
}, {
userId: "97980cfea0067"
});
How Segment maps to Batch
Segment | Batch |
---|---|
userId |
identifiers.custom_id |
event |
event.name |
properties.* |
event.attributes.* |
Resulting Batch event payload (output)
{
"identifiers": {
"custom_id": "97980cfea0067"
},
"event": {
"name": "User Registered",
"attributes": {
"plan": "Pro Annual",
"accountType": "Facebook"
}
}
}
Events are sent to Batch in near real time according to your destination mappings, and all event properties
are included under event.attributes
.
Validation checklist
- Always send a stable
userId
→ becomesidentifiers.custom_id
. - Place native profile fields under
attributes
:$email_address
,$email_marketing
,$phone_number
,$sms_marketing
,$language
,$region
,$timezone
. - Put everything else under custom attributes in
attributes
. - Format dates using ISO‑8601 UTC (for example:
1989-07-20T00:00:00Z
). - Configure additional mappings in Mappings → Edit Mapping.
- Test with a read-back or export to verify types, encodings, and timezones.
Integrating a computed trait
For more details on computed traits, see the Segment spec.
To integrate a computed trait with Batch:
- Go to your Segment workspace.
- Open the Engage tab → Destinations.
- If your Batch destination is already listed, skip this step.
- Otherwise, click Add destination and select Batch (Actions).
- Open the Engage tab → Audiences → Computed traits.
- Click Create computed trait.
- Configure your calculation method (for example: count, aggregation, last value).
- Click Preview, then Next.
- Select your Batch destination.
- Choose how to send the data:
- For an attribute → enable Send Identify in the connection settings.
- For an event → enable Send Track.
- Give your computed trait a clear name.
Segment will then automatically update and forward your computed trait data to Batch.
This page was last modified: 30 Sep 2025
Need support?
Questions? Problems? Need more info? Contact Segment Support for assistance!