Segment-Outbound integration

If your organization uses Segment to capture customer data from different sources, you can use the Segment-Outbound integration to send captured user and event data to Outbound.

The Segment-Outbound integration can receive data from the following sources:

  • Websites
  • Servers
  • Mobile devices

For more information, see Sources in the Segment documentation.

The integration provides the following methods to pass on user and event data to Outbound:

  • identify
  • track
  • alias

The identify and track methods are named and work similarly to the ones in the Outbound REST API and integration libraries.

This document covers the following topics:

To learn more, see the following topics in the Outbound developer docs:

Set up the Segment-Outbound integration

  1. Browse to the integration catalog on the Segment website and search for "Outbound".

  2. Enter your public and private keys in the integration set up page.

    For more information on the keys, see Authentication in the introduction.

  3. If you plan on having both a production and development environment, enter your Outbound keys into the corresponding Segment projects.

    You can switch between your Segment projects in the top right corner:

    image

The integration is enabled after you enter your keys. It should take 5 to 10 minutes for data to be available for Outbound campaigns.

Identify users

You need to send information about the user to Outbound so that it can send messages to the user. The Segment-Outbound integration provides developers with a method named identify to send a user's id and traits to Outbound.

The following example uses Segment's JavaScript library to send the user data:

analytics.identify({
  userId: '019mr8mf4r',
  traits: {
    name: 'Michael Bolton',
    email: 'mbolton@example.com',
    phone: '1234567890'
  },
  context: {
    device: {
      type: "ios",
      token: 'XXXYYYZZZ'
    }
  }
});

Note that where the native Outbound API and integration libraries refer to additional details about the user as attributes, the Segment libraries refer to the data as traits.

Outbound uses the following first-class Segment traits to send and customize messages in various channels:

  • name - maps to Outbound’s first_name and last_name attributes. Recommended for targeted copy
  • email - maps to Outbound’s email attribute. Required for email campaigns
  • phone - maps to Outbound’s phone_number attribute. Required for SMS and voice campaigns
  • context.device.token - maps to Outbound’s apns or gcm attributes. For iOS and Android push notifications
  • timezone - maps to Outbound’s timezone attribute. Recommended for using Outbound’s time-of-day message delivery feature. Outbound only accepts tz database name values. These are automatically collected if you’re using Segment’s mobile SDKs

For implementation details, see:

  • identify in the Segment documentation
  • Users in the Outbound dev docs

You can also use Segment to assign users to groups in Outbound. See Group in the Segment documentation.

Track events

Messages sent to users by Outbound campaigns are triggered by events. The Segment-Outbound integration provides developers with a method named track to send event names and properties to Outbound.

The following example uses Segment's JavaScript library to send the event data:

analytics.track('Signed Up', {
  plan: 'Startup',
  source: 'Analytics Academy'
});

For implementation details, see:

  • identify in the Segment documentation
  • Events in the Outbound dev docs

Outbound’s campaign filters allow you to target specific segments of users based on events, event properties, and attributes. Having specific events and attributes allow you to better target your audiences with custom messaging.

Create aliases for users

Outbound allows aliasing -- that is, associating one user id to another user id. This is useful if you want to associate an anonymous user with an identified user after the anonymous user signs in. For more information, see Aliasing users. The Segment-Outbound integration provides developers with a method named alias to alias one user id to another one.

The following example uses Segment's JavaScript library to create an alias for a user:

analytics.alias('019mr8mf4r');

For implementation details, see alias in the Segment documentation.

Use the Segment iOS and Android SDKs

You can use the iOS and Android SDKs provided by Segment to send user and event data to Outbound. For implementation details, see the Android SDK and iOS SDK documentation on the Segment website.

The Outbound mobile SDKs are bundled with Segment’s mobile SDKs, giving you additional features for your Outbound account, many of which focus on getting permission to send your users push notifications. See the Outbound Android and iOS docs for more information.

FAQ

I activated Outbound in Segment but I don't see any incoming data.

Double check that you activated the correct project in Segment. You can find the projects in the top-right corner of your Segment account. Example:

image

It's also a good idea to check the Outbound API key you used in your project. You'll find the valid keys on the Environments page (Settings > Environments) in your Outbound account.