Skip to main content

Running promotions for Segment audiences

The Engage Audiences feature in Segment enables you to group users or accounts based on event behavior and traits that Segment tracks.

In Segment, you can build an audience from a tracking event and synchronize it with a destination. By configuring Talon.One as a destination, you can reference the audience in your Talon.One campaigns.

In this tutorial, let's group all users who removed a product from their cart into an audience. Then, in Talon.One, let's offer these users a convincing discount by issuing a coupon code.

Talon.One requirements

Segment requirements

Creating the Segment audience

In this scenario, we pass event data from a data source to an audience in Segment. Then, we synchronize the audience with a Talon.One destination.

So let's first create an audience that includes all users who removed a product from their cart.

To create the Segment audience:

  1. In the Segment sidebar, click Engage > Audiences.
  2. If necessary, create an Engage space or select an existing one.
  3. Click New Audience > Audience.
  4. On the Configure and Preview Your Audience page, click Add Condition > Performed an Event.
  5. In ...performed, select Product Removed, at least, 1 time.
  6. Click Next.
  7. On the Select Destinations page, do not select any destination. We will create the destination in the next step.
  8. On the Review and Create Your Audience page, type a name and optional description and click Create Audience.

Creating the Talon.One destination

Now that we've created an audience, let's create the destination:

  1. In the Segment sidebar, click Connections > Destinations > Add Destination.
  2. On the Catalog page, search for talon and select the Talon.One (Actions) destination.
  3. On the overview page, click Add destination.
  4. On the Select data source page, select the Space data source that contains your audience and click Next.
    important

    Ensure that you select a Space data source. Other source types cannot be used to synchronize audiences.

  5. Click Confirm source.
  6. On the Basic Settings page, enter the following information:
    1. In Destination name, type a descriptive name for the destination.
    2. In API Key, type the API key you created.
    3. In Deployment, type the base URL of your Talon.One deployment, for example https://mycompany.europe-west1.talon.one/.
    4. Click the Enable Destination toggle and click Save Changes.

Synchronizing the audience with the destination

To synchronize the audience you created with the destination you created:

  1. In the Segment sidebar, click Engage > Audiences, and open the audience you created.
  2. Click Add destination and select the destination you created.
  3. In Connection settings, enable Send Identify and Send Track.
  4. In Enter Event, type Product Removed.
  5. Click Save.
  6. Click Add 1 destination.

Configuring data mapping

Data mapping allows you transform the incoming data into a Talon.One-readable format before passing it to Talon.One.

To configure the data mapping:

  1. In the Segment sidebar, click Connections > Destinations, and open the destination you created.

  2. In the Mappings tab, click New Mapping and select Update customer profile.

  3. In Select events to map and send > Event Name > is, type Product Removed.

  4. In Add test event, click Load test event from source.
    A test event is displayed in JSON format.

    note

    If loading the test event fails, the audience dataset may not be ready. Wait until the audience status changes to Live.

  5. In Select mappings, map your event fields to the attributes in Talon.One. See the Segment documentation.

    • Customer Profile ID: Map this to a field containing a unique identifier. Default is userId.
    • List of audience ID to dissociate with the customer profile: Leave this field empty. It is used to remove users from an audience, but in our case, we want to add users.
    • List of audience ID to associate with the customer profile: Map this to a field containing a list of Talon.One audience IDs, or manually enter a list.
    important
    • The list provided must be enclosed in []. Examples: [52], [8, 34, 84].
    • The specified audiences must exist in Talon.One.
  6. (Optional) To test the mapping, click Send test event to destination, and check if a customer has been added to your Talon.One audience.

  7. Click Save.

  8. In the Mappings table, under Status, enable the mapping.

Building the rule in Talon.One

In your Talon.One campaign, you can now reference the audience you defined in Segment.

In your rule, use the Is member of an audience condition and the Create coupon code effect to create coupon codes for the members of your audience.

tip

You can also use the other available audience conditions in the Rule Builder.