# Listrak (Actions) Destination

## Destination Info

* Accepts [Page](/docs/segment/connections/spec/page), [Alias](/docs/segment/connections/spec/alias), [Group](/docs/segment/connections/spec/group), [Identify](/docs/segment/connections/spec/identify), [Track](/docs/segment/connections/spec/track) calls.
* Refer to it as **Listrak (Actions)** in the [Integrations object.](/docs/segment/guides/filtering-data/#filtering-with-the-integrations-object)
* This integration is **partner owned.** Please reach out to the partner's support for any issues.

[Listrak](https://www.listrak.com/?utm_source=segmentio\&utm_medium=docs\&utm_campaign=partners) is the retail industry's leading customer engagement platform. Listrak delivers results for more than 1,000 retailers by providing best-in-class email, text message marketing, identity resolution marketing and push notifications through seamless cross-channel orchestration. Listrak's data-first approach delivers 1:1 personalization at scale so you can send messages at precisely the right time across the right combination of channels and devices to maximize customer engagement, revenue, and lifetime value.

Listrak maintains this destination. For any issues with the destination, [contact the Listrak Support team](mailto:support@listrak.com).

## Getting started

To add the Listrak Actions destination:

1. Set up the [Listrak Source](/docs/segment/connections/sources/catalog/cloud-apps/listrak/) first before connecting to the Listrak Actions Destination. Note the API client ID and client secret after creating the integration in Listrak.
2. From your Segment workspace, go to **Connections > Catalog** and select the **Destinations** tab.
3. Search for **Listrak (Actions)** in the Catalog and select the destination.
4. Click **Add destination**.
5. On the **Select data source** step, select your desired source. The source should not be a Listrak source. If you want to sync an Engage Audience, select the Engage space as the source. Click **Confirm Source**.
6. On the **Settings** tab, name your destination. For example, `Listrak`.
7. In the same section of the **Settings** tab, enter your Listrak API client ID and client secret.
8. Click **Save Changes**.
9. Follow the steps in the Destinations Actions documentation to [customize mappings](/docs/segment/connections/destinations/actions/#customize-mappings) or follow the steps below to Sync an Engage Audience.

## Syncing an Engage audience to Listrak

To sync an Engage audience with Listrak (Actions), first ensure that the Engage audience only includes profiles with email addresses subscribed to the Listrak list.

For example, when you build the audience, ensure each profile includes a Custom Trait like `listrak_list_12345`, where `12345` is the List ID.

### Listrak configuration

1. In Listrak, navigate to **Contacts > Profile Fields** and click **Create Field Group**.
2. Enter a name for the Profile Field Group (like `Engage Audiences`) and click **Save**.
3. Enter a name for the audience in the **Field Name** field.
4. Select **Check Box** for the **Data Type**.
5. Click **Update**.
6. Go to **Help & Support > API ID Information** and note the List ID and Profile Field ID values. You'll use these in your Segment destination.

### Segment configuration

In Segment, open the Listrak destination you created. Navigate to the **Mappings** tab, click **New Mapping**, and select **Update Email Contact Profile Fields**.

You can configure the "Update Email Contact Profile Fields" mapping in two ways:

1. **Separate Mappings:** Create individual mappings for "Audience Entered" and "Audience Exited" events. Set the profile field to "on" for "Audience Entered" and "off" for "Audience Exited."
2. **Single Mapping:** Use one mapping with the special value `useAudienceKey` for the profile field. This will dynamically use "on" and "off" in the request made to Listrak based on the `audience_key` boolean value - `true` ("Audience Entered") activates the field, and `false` ("Audience Exited") deactivates it.

### Recommended approach: single mapping for both events

1. To use a single mapping for "Audience Entered" and "Audience Exited" events, under **Select events to map and send**, configure a condition to include events from the desired audience only.

* Set **Event Context** `personas.computation_key` to `my_audience` (where `my_audience` is the Audience Key from the Audience settings page).

  ![The Update email contact profile fields section with the condition that event type is Track and audience\_key is my\_audience.](https://docs-resources.prod.twilio.com/7949c40b7106540ca9573747624a09372708c4eed5a454e8326792c1a722611a.png)

2. Under **Select mappings**, enter the Listrak List ID and map the email address if `context.traits.email` is not needed.
3. In the **Profile Field Values** section, enter the Listrak Profile Field ID in the `Enter Key Name` textbox on the right, and type `useAudienceKey` in the textbox on the left.

* This configuration will activate the profile field based on the boolean value in the Audience payload: "true" activates the field for "Audience Entered," and "false" deactivates it for "Audience Exited."

  ![Mapping fields from HTTP API to Listrak with useAudienceKey highlighted.](https://docs-resources.prod.twilio.com/9aca9a6ae7ffdfd31ddd5f9d899a424c1962313049db4ffdee3c911526f51ad3.png)

4. Click **Save** to save the mapping.

### Alternative approach: separate mappings for each event

1. Under **Select events to map and send**, select **Track** for the **Event Type**.
2. Click **Add Condition** and add: **Event Name** is `Audience Entered`.
3. Click **Add Condition** and add: **Event Property** `audience_key` is `my_audience` (where `my_audience` is the Audience Key from the Audience settings page).

   ![Mapping Subscription.](https://docs-resources.prod.twilio.com/f1da3435383989911b95123b2a694290b555c6dc73e9a97eb16cce4a10a7534f.png)
4. Under **Select mappings**, enter the Listrak List ID and map the email address if `context.traits.email` is not needed.
5. In the **Profile Field Values** section, enter the Listrak Profile Field ID in the `Enter Key Name` textbox on the right, and type `on` in the textbox on the left. This will activate the profile field in Listrak.

   ![Mapping fields from HTTP API to Listrak with profile field values highlighted.](https://docs-resources.prod.twilio.com/14605bfa7a1d2dd2b3ccb72c536452eea406491ee6a1a52bc249cad5b5a1305d.png)
6. Click **Save** to save the mapping.
7. Repeat the previous steps, substituting `Audience Entered` for `Audience Exited` and `on` for `off`.

## Using Segment audience data in Listrak

To filter email sends in Listrak using the new audience profile field, refer to the [help article](https://help.listrak.com/en/articles/3951597-introduction-to-building-filter-2-0-segments).

## Destination Settings

| Field             | Description                                                                                                                                                      | Required | Type     |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- |
| API Client ID     | Your Listrak API client ID. Find this on the setup tab of your Segment integration under Integrations > Integrations Management in https://admin.listrak.com.    | Yes      | string   |
| API Client Secret | Your Lisrak API client secret. Find this on the setup tab of your Segment integration under Integrations > Integrations Management in https://admin.listrak.com. | Yes      | password |

## Available Actions

Build your own Mappings. Combine supported [triggers](/docs/segment/connections/destinations/actions/#components-of-a-destination-action) with the following Listrak-supported actions:

> \[!NOTE]
>
> Individual destination instances have support a maximum of 50 mappings.

* [Update Email Contact Profile Fields](#update-email-contact-profile-fields)

### Update Email Contact Profile Fields

One or more list imports will be started to update the specified contact profile fields on the specified list.

Update Email Contact Profile Fields is a **Cloud** action.

| Field                 | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                | Required | Type    |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------- |
| List ID               | Identifier used to locate the list. Find this under Help & Support > API ID Information in https://admin.listrak.com.                                                                                                                                                                                                                                                                                                                                      | Yes      | INTEGER |
| Email Address         | Email address of the contact.                                                                                                                                                                                                                                                                                                                                                                                                                              | Yes      | STRING  |
| Profile Field Values  | Add one or more profile field IDs as object keys. You can find these IDs under Help & Support > API ID Information on https://admin.listrak.com. Choose one of three options as the object value: "on" (activates this field in Listrak), "off" (deactivates this field in Listrak), or "useAudienceKey" (Listrak sets the field based on the Segment Audience payload's audience\_key boolean value: "true" activates the field, "false" deactivates it). | Yes      | OBJECT  |
| Batch Data to Listrak | When enabled, multiple events will be sent to Listrak in a single request, which is recommended for optimal performance.                                                                                                                                                                                                                                                                                                                                   | Yes      | BOOLEAN |

## Engage

You can send computed traits and audiences generated using [Engage](/docs/segment/engage) to this destination as a **user property**. To learn more about Engage, schedule a [demo](https://segment.com/contact/demo).

For user-property destinations, an [identify](/docs/segment/connections/spec/identify/) call is sent to the destination for each user being added and removed. The property name is the snake\_cased version of the audience name, with a true/false value to indicate membership. For example, when a user first completes an order in the last 30 days, Engage sends an Identify call with the property `order_completed_last_30days: true`. When the user no longer satisfies this condition (for example, it's been more than 30 days since their last order), Engage sets that value to `false`.

When you first create an audience, Engage sends an Identify call for every user in that audience. Later audience syncs only send updates for users whose membership has changed since the last sync.

> \[!NOTE]
>
> Real-time audience syncs to Listrak (Actions)  may take six or more hours for the initial sync to complete. Upon completion, a sync frequency of two to three hours is expected.

## Settings

Segment lets you change these destination settings from the Segment app without having to touch any code.

| Field             | Description                                                                                                                                                      | Required | Type     |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- |
| API Client ID     | Your Listrak API client ID. Find this on the setup tab of your Segment integration under Integrations > Integrations Management in https://admin.listrak.com.    | Yes      | string   |
| API Client Secret | Your Lisrak API client secret. Find this on the setup tab of your Segment integration under Integrations > Integrations Management in https://admin.listrak.com. | Yes      | password |
