Segment integration

Overview

Segment is a data platform that helps businesses collect marketing and customer data. By integrating Segment with Ortto, you can use Ortto's campaign, reporting, and dashboard features with your customer data from Segment.

Follow the steps below to integrate Ortto with Segment and import your customer identities and event data into Ortto's platform.

NOTE: This Segment data source is an inbound stream, meaning Ortto receives customer identity and event data from Segment. It supports both client-side and server-side events.

If you want to send event data from Ortto to Segment, you'll need to set up the Segment webhook.


Segment prerequisites

To use this integration, you must have an active Segment account and workspace.

Configure your Segment source

Make sure your Segment source is set up to send customer data to Ortto. The source should be configured to push identify (customer contact) and track (customer action) event data to Ortto.

Ortto handles the Segment event data (in JSON format) for both identify and track events, along with a single response for unsupported events.

NOTE: Currently, the Segment integration only supports person-related (contact) events and does not support organization-related events.

Identify event field data

  • traits object - used to create or update people in Ortto.

Learn more about the structure of identify events.

Track event field data

  • event member - used to create or update activities in Ortto.
  • properties object - used to create or update an activity’s attributes in Ortto.
  • traits object within a context object - used to create or update people in Ortto.
  • userID or anonymousID members or both (within identify or track events) - used to link:
    • Segment traits object data for a person in Ortto, to
    • Segment event member (and its properties object) data for an activity (and its attributes) in Ortto.

TIP: These data members are not required if the traits data is captured within a track event’s context object.

Learn more about the structure of track events.

Unsupported events

Ortto only supports identify and track events from Segment. If Ortto receives any unsupported event types, it will return a 501 (Not Implemented) status.

Configure the AutopilotApp destination in Segment

Finally, make sure the AutopilotApp destination is configured in Segment.

NOTE: There is no Ortto (Autopilot) source available for Segment. The integration only allows data to flow from Segment to your Ortto account. The Autopilot Source is for Ortto's older product, Autopilot Journeys.


Connect from Ortto

To complete the integration between Ortto and your Segment data, follow these steps in the Ortto interface:

  1. Navigate to CDP > Data Sources > Segment > Get started (from the New Data Source page).
  2. On the Connect to Segment page, click Connect.
  3. If you're not already logged in to Segment, you'll be directed to the Segment login page. Enter your email and password, then click Log In.
  4. On the Authorize Autopilot App page, select the appropriate Segment workspace and Source (with your customer data), then click Allow.

Set merge options

On the Merge page in Ortto, choose how Ortto should handle existing people data from Segment:

  • Import and merge new records only
  • Import and overwrite existing records
  • Import new records only

These options correspond to the Append only, Overwrite existing, and Ignore strategies in the developer documentation.

By default, Ortto uses a person’s email address as the unique identifier for merging, with phone number as a fallback. You can customize these unique identifiers.

Under Merge key strategy, choose how to match people using unique identifiers:

  • Merge with any key match: Matches based on any key (e.g., email and phone number).
  • Match only if previous merge key is empty: Matches only if the primary key (e.g., email) is found, ignoring the fallback identifier.

Click Next to move to the Map page.

Map Segment traits to Ortto fields

On the Map page, Ortto will try to match the traits from Segment’s identify and track events to your Ortto fields. If a match is found, Ortto will automatically apply the appropriate fields.

If Ortto doesn't find a match or you want to adjust a match, you can search for existing fields or add new ones.

Click Next to move to the Activities page.

Map Segment track events to Ortto activities

On the Activities page, Ortto will read your Segment track events and properties, allowing you to recreate this data as activities and attributes in Ortto.

To add these activities:

  1. Click Add Activity and select the activity from the dialog.
  2. Choose the Segment activity and click Select.
  3. In the Add Activity dialog, you can edit the attribute’s name, type, and map it to an existing or new People field in Ortto.

This will make the activities and attributes available from the Activities page in Ortto.

NOTE: Since your customer and customer action data in Segment is customized, Ortto will not display any activities on the Connect to Segment page.

NOTE:

  • If you see a Waiting for Segment to send us an Identify event message on the Map page, it means your Segment source isn't fully configured. Close the page and wait for Segment to send event data to Ortto. You'll be notified by email once this happens.
  • Alternatively, you can manually send an event from Segment to Ortto, using modified identify and track events (with traits data) as examples.
  • Make sure the data types for Segment traits match Ortto CDP fields. If there's a mismatch, Ortto will ignore the data it can't convert.

NOTE:

  • Our search can display up to 500 recent activities. If you can't find your activity, check if Segment is sending recent data.
  • To add an activity manually, click Enter manually in the Add Activity dialog. This lets you include activities and attributes for future support in Segment.
  • For more activities, you can purchase the Activities + Add-on, which allows you to track additional Segment events. Each additional activity costs 1 x Activities + Add-on.

Searching existing Ortto CDP fields

If the list of Ortto CDP fields on the Map page is long, you can filter it by typing letters into the Search box. As you type, fields that don’t match the search will be hidden.

You can then select or deselect the remaining fields.

To reset the list, clear the Search box or click the X.

Adding a new Ortto CDP field

If you need to create a new Ortto CDP field to map data from your Segment source's identify events, follow these steps:

  1. Click Add a new field.
  2. In the Create field dialog, enter the Field name and Field type for the new field.
  3. Click OK to save. The new field will appear in the Ortto fields list, sorted alphabetically.
  4. Drag the new field to the matching Segment identify trait in the Unique identifiers section.

Segment identify event example

Here’s an example of a Segment identify event in JSON format, showing the fields Ortto can recognize. Note that fields in the traits object may require custom field configuration in Ortto.

json

{ "type": "identify", "userId": "lana.romeijn.myonlinestore-studio", "anonymousId": "507f191e810c19729de860ea", "traits": { "firstName": "Lana", "lastName": "Romeijn", "email": "lana.romeijn@example.org", "street": "6th St", "city": "San Francisco", "state": "CA", "postalCode": "94103", "country": "USA" } }
  • UserId and anonymousId link the identify event to track event data in Ortto, allowing the system to associate this person’s details and activity. You only need one of these values to establish the connection.
  • All traits should be at the same level (siblings). Ortto does not support nested objects within the traits object.

Segment track event examples

Below is an example of a simple Segment track event in JSON format. For track events that include a traits object, you may need to configure custom fields in Ortto.

This example shows a basic track event. If the event contains a traits object, you may need to set up custom fields in Ortto to capture those details.

Simple track event

Example simple track event:

json

{ "type": "track", "userId": "lana.romeijn.myonlinestore-studio", "anonymousId": "507f191e810c19729de860ea", "event": "Sign-in button clicked", "properties": { "action": "sign-in-button-clicked", "count": 3 } }

The userId and anonymousId are used to link identify events with track event data in Ortto. This allows Ortto to connect a person’s details (from the identify event) with their activities or attributes (from the track event). Only one of these values is needed to make the connection.

NOTE: All members of the properties object must be at the same level. Ortto does not support nested objects within the properties object.

Track event with traits data

Example track event with traits data:

json

{ "type": "track", "userId": "lana.romeijn.myonlinestore-studio", "context" : { "traits": { "firstName": "Lana", "lastName": "Romeijn", "email": "lana.romeijn@example.org", "street": "6th St", "city": "San Francisco", "state": "CA", "postalCode": "94103", "country": "USA" } }, "event": "Sign-in button clicked", "properties": { "action": "sign-in-button-clicked", "count": 3 } }

The userId is not required in this track event because it includes a context object with traits data from an associated identify event.

  • As with identify events, all members of the traits object must be at the same level. Nesting objects within the traits object is not supported by Ortto.
  • Similarly, all members of the properties object must be siblings. Nesting is not supported.

Supported date formats from Segment

When mapping date or time fields for Track or Identify activities, you can select your preferred date format from the dropdown below the data type input.

For example, when adding a date or time attribute to a track activity:

Setting the date format of a "time and date" activity attribute.

And another example when mapping the Identify trait:

Setting the date format of an Identify activity trait.

You can specify a different format for each field, to support the expected format each field will be sent from Segment.

NOTE: The date format you choose when mapping events must match exactly when sending data to Ortto. If the formats don’t align, the date will be considered invalid.

EX: If you map a Segment trait with the format YYYY-MM-DD, sending an event with the format DD-MM-YYYY will make the date property invalid.


Rate limits

Ortto has rate limits on the number of events it can consume from Segment, based on your plan and the number of contacts.

  • Identify Events: Ortto supports 10 events per included contact (and any additional contacts purchased) every 24 hours. For example:
    • With 5,000 contacts: 10 x 5,000 = 50,000 identify events per day.
    • With 20,000 contacts: 10 x 20,000 = 200,000 identify events per day.
  • Track Events: Ortto supports 5 events per included contact (and any additional contacts purchased) multiplied by the number of activities tracked, every 24 hours. For example:
    • With 5,000 contacts and 5 activities: 5 x 5,000 x 5 = 250,000 track events per day.
    • With 20,000 contacts and 10 activities: 5 x 20,000 x 10 = 2,000,000 track events per day.

Managing connected data sources

Once you've connected a data source to your Ortto account, you can manage it from the Data Sources page.

  • Navigate to CDP > Data sources.

Add Segment to another Ortto account

  • You can connect a single Segment account to multiple Ortto accounts.
  • You cannot connect more than one Segment account to a single Ortto account.
  • You can however, add multiple sources to a single Ortto destination in Segment.

Supported journey and playbook actions

When a Segment webhook is connected to your Ortto account, you can use the Send to Segment action in your journey and playbook campaigns. This sends activity data to the connected Segment webhook whenever the campaign's entry condition is met.

NOTE: To include activity data, ensure the Activity Payload checkbox is enabled in the Segment webhook data source settings.

Learn more about segment webhooks.

Example of the supported action shape settings.