# Stream loyalty tier updates to Adobe

> In this tutorial, let's set up Talon.One to push loyalty tier changes to Adobe Experience Platform using the Talon.One Streaming Events source.

> For the complete documentation index, see [llms.txt](https://docs.talon.one/llms.txt).

After that, you can use [Adobe Journey
Optimizer](https://business.adobe.com/products/journey-optimizer.html)
to automatically notify customers of their new tier and benefits.

## How it works

The Talon.One Streaming Events source in Adobe Experience Platform allows you to
receive streamed loyalty data from Talon.One, including loyalty points changes
and tier changes.

Talon.One provides the Talon.One Adobe Integration in the [Campaign
Manager](/docs/product/get-started) to stream the data to Adobe, using an optimized
payload.

Adobe Journey Optimizer can then act on that data to send targeted messages to customers.
For example, when a customer is upgraded to a new tier, you can trigger a personalized
message highlighting the new perks available to them, such as free shipping or exclusive
member discounts.

For use cases that involve processing accumulated loyalty data rather than
reacting immediately as events occur, use the [batch source connector](/docs/dev/technology-partners/adobe/fetch-achievement-data-adobe.md).

For more information, see our [overview page](/docs/dev/technology-partners/adobe.md) and the
[documentation provided by
Adobe](https://experienceleague.adobe.com/en/docs/experience-platform/sources/ui-tutorials/create/loyalty/talon-one-streaming).

## Talon.One requirements

- You have an [Application](/docs/product/applications/create-and-manage-applications.md) and
  [campaign](/docs/product/campaigns/create-and-manage-campaigns.md) in Talon.One.
- You have set up a [profile-based loyalty
  program](/docs/product/loyalty-programs/profile-based/create-pb-programs.md) with at
  least two [tiers](/docs/product/loyalty-programs/profile-based/use-loyalty-tiers.md), so
  that a customer can change tier. The loyalty program is connected to your Application.

## Set up the integration

<StepsContainer>

### Create an API key in Talon.One

In your Application, create an [Integration API
key](/docs/product/applications/manage-api-keys.md).

We will use the API key in a later step to configure the Adobe integration.

### (Optional) Create a loyalty schema in Adobe

If you already have a [schema](https://experienceleague.adobe.com/en/docs/experience-platform/xdm/tutorials/create-schema-ui)
in Adobe Experience Platform that includes the necessary fields to capture loyalty data,
you can skip this step.

For this tutorial, let's assume we don't have a suitable schema yet. As a starting point,
we can use the **Loyalty Details** field group provided by Adobe.

1. In Adobe Experience Platform, open the **Schemas** workspace.
1. At the top right of the page, click **Create schema**.
1. Choose **Manual** and click **Select**.
1. Choose **Individual Profile** as the schema base class and click **Next**.
1. In **Name and review**, provide a name for the schema, for example, `Talon.One Loyalty
   Schema`, and click **Finish**. The schema editor opens.
1. In the left sidebar, under **Composition**, next to **Field groups**, click **Add**.
1. In the list, find the following field groups and add them to the schema:
   - **Loyalty Details**
   - **IdentityMap**

   The schema should now include a `loyalty` object and an `identityMap` node.
1. In the right sidebar, under **Schema properties**, enable **Profile**, confirm the
   dialog regarding the primary identity, and click **Enable**.
1. Click **Save**.

### Configure the streaming events source in Adobe

Next, let's set up the Talon.One Streaming Events source to receive loyalty data from
Talon.One. Completing this step provides you with a streaming endpoint URL and a dataflow
ID, which is required for the next step.

1. Download the following example files:
    - [Example loyalty data](/files/adobe-loyalty-data.json)
    - [Example mapping](/files/adobe-loyalty-mappings.csv)
1. In Adobe Experience Platform, open the **Sources** workspace.
1. On the **Catalog** page, in the **Loyalty** section, find the **Talon.One Streaming Events No
   Auth** source. If available, use the **(Beta)** version to access the latest features
   and improvements.
1. Click **Set up** or, if you used the source before, **Add data**.
1. In **Select data**, upload the example loyalty data file from step 1 and click **Next**.
1. In **Dataset details**, create a new dataset based on the schema you [created](#optional-create-a-loyalty-schema-in-adobe)
   and name it, for example, `Talon.One Loyalty Dataset`.
1. Enable the **Profile dataset** option.
1. In **Dataflow details**, provide a name for the dataflow, for example,
   `Talon.One Loyalty Dataflow`, and click **Next**.
1. In **Mapping**, click **Clear all**.
1. Click **Import mapping > Import mapping from file** and upload the example mapping
   file from step 1.
1. Click **Next** and review the dataflow details. If everything looks good, click
   **Finish**.
1. In the list of dataflows, find the one you just created and click it.
1. In the right sidebar, under **API Usage**, copy the **Streaming endpoint** and
   **Dataflow ID** values for later use.

### Configure the Adobe integration in Talon.One

1. In the Campaign Manager, open <Account className="icon" /> **Account** > <Integrations
   className="icon" /> **Integrations** > **Adobe**.
1. Click **Add Instance**.
1. Follow the configuration steps:
   - On the **Talon.One Configuration** page, provide the
   Integration API key you [created](#create-an-api-key-in-talonone), without any prefix. For example, `274204ce7792dfc...`.
   - On the **Adobe Configuration**
   page, provide the streaming endpoint URL and the dataflow ID you [copied in the previous step](#configure-the-streaming-events-source-in-adobe).
1. Click **Finish**.

:::note
- You can create multiple instances of the Adobe integration, for example, to stream data
  to different Adobe sources.
- You can use the same endpoint URL and dataflow ID for the points change dataflow and the
  tier change dataflow.
- If you only want to use one of the dataflows, you can leave the fields for the other one
  empty. For example, if you only want to stream tier change data, you can leave the
  points change dataflow fields empty.
- If the configuration setup stops responding, refresh the page and restart the configuration process.
:::

### Test the setup

Let's test our setup by triggering a loyalty tier change for a customer:

1. Use the [Add points to customer
   profile](/management-api#tag/Loyalty/operation/addLoyaltyPoints) endpoint in the
   Management API to add points to a customer's profile. Add enough points to trigger a
   tier change.
1. In Adobe Experience Platform, open the **Datasets** workspace and open the dataset you
   [created](#configure-the-streaming-events-source-in-adobe) for this tutorial, for example,
   `Talon.One Loyalty Dataset`.
1. In the top right of the page, click **Preview dataset** to check for new data.

   If the button is disabled and labeled **Preview not available**, wait and check again.
   It can take several minutes for the data to be received from Talon.One and appear in
   the dataset.

### Next steps

Now that you have loyalty tier change data in Adobe Experience Platform, you can use it to
trigger personalized customer journeys in Adobe Journey Optimizer.

For example, you can set up a journey that sends a congratulatory email to customers when
they have been upgraded to a new tier, highlighting the benefits of their new status.

</StepsContainer>
