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
- You are an Admin user.
- You have set up an Application.
- Your Application contains a running campaign with the Coupons feature enabled.
- You have created an audience.
- You have created a Segment-specific API key.
Segment requirements
- You are an Admin user.
- You have configured a data source to track events.
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:
- In the Segment sidebar, click Engage > Audiences.
- If necessary, create an Engage space or select an existing one.
- Click New Audience > Audience.
- On the Configure and Preview Your Audience page, click Add Condition > Performed an Event.
- In ...performed, select Product Removed, at least,
1
time. - Click Next.
- On the Select Destinations page, do not select any destination. We will create the destination in the next step.
- 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:
- In the Segment sidebar, click Connections > Destinations > Add Destination.
- On the Catalog page, search for
talon
and select the Talon.One (Actions) destination. - On the overview page, click Add destination.
- 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.
- Click Confirm source.
- On the Basic Settings page, enter the following information:
- In Destination name, type a descriptive name for the destination.
- In API Key, type the API key you created.
- In Deployment, type the base URL of your Talon.One deployment, for example
https://mycompany.europe-west1.talon.one/
. - 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:
- In the Segment sidebar, click Engage > Audiences, and open the audience you created.
- Click Add destination and select the destination you created.
- In Connection settings, enable Send Identify and Send Track.
- In Enter Event, type
Product Removed
. - Click Save.
- 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:
-
In the Segment sidebar, click Connections > Destinations, and open the destination you created.
-
In the Mappings tab, click New Mapping and select Update customer profile.
-
In Select events to map and send > Event Name > is, type
Product Removed
. -
In Add test event, click Load test event from source.
A test event is displayed in JSON format.noteIf loading the test event fails, the audience dataset may not be ready. Wait until the audience status changes to Live.
-
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.
- Customer Profile ID: Map this to a field containing a unique identifier. Default is
-
(Optional) To test the mapping, click Send test event to destination, and check if a customer has been added to your Talon.One audience.
-
Click Save.
-
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.
You can also use the other available audience conditions in the Rule Builder.