> ## Documentation Index
> Fetch the complete documentation index at: https://moengage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Talon.One

# Introduction

[Talon.One](https://www.talon.one/) provides personalized incentives for your mobile marketing CRM and allows you to launch contextual 1-to-1 coupon, referral, discount, and loyalty campaigns quickly and efficiently.

# MoEngage × Talon.One

The MoEngage and Talon.One integration can help take your loyalty or coupon program to the next level by sending codes generated by Talon.One to your audience through MoEngage campaigns.

The following Talon.One functionalities are supported:

* [Create coupon](https://docs.talon.one/docs/dev/technology-partners/cep/integrating-cep#creating-a-coupon)
* [Create referral](https://docs.talon.one/docs/dev/technology-partners/cep/integrating-cep#creating-a-referral)
* [Fetch loyalty ledger](https://docs.talon.one/docs/dev/technology-partners/cep/integrating-cep#fetching-a-loyalty-ledger)

# Integration

<Info>
  * Ensure you have a Talon.One account.
  * Ensure that you have your Talon.One API key. Details on generating a Talon.One API key can be found in the [Talon.One API docs](https://docs.talon.one/docs/dev/tutorials/integrating-talon-one#creating-a-talonone-api-key)
</Info>

## Step 1: Generate authentication key on Talon.one

1. Open your Talon.One Application in the Campaign Manager and click **Settings** > **Developer settings**.
2. Click **Create API Key**
3. Select **Yes** for **Do you want to use this API Key with a 3rd party service?**
4. Select **Customer Engagement** from the dropdown.
5. Select and expiry date and click **Create API Key**.
6. Copy it for later use. Use the key in the `Authorization` header of each of these endpoints:

Example:

Authorization: ApiKey-v1 dbc644d33aa74d582bd9479c59e16f970fe13bf3

## Step 2: Define Talon.one content API on MoEngage

Use [MoEngage content APIs](/docs/user-guide/campaigns-and-channels/getting-started/campaign-content/content-apis)to add Talon.One as one of your endpoints.

On your MoEngage dashboard:

1. Navigate to **Settings** -> **Advanced settings** -> **Content API**. Click **+ Add content API** at the top right corner of the Content API screen. <img src="https://mintcdn.com/moengage/syqICryKE0qygh49/images/partner_21979634305172.png?fit=max&auto=format&n=syqICryKE0qygh49&q=85&s=c3072edc05feb7d652fab730998d669b" alt="ContentAPI_Navogation.png" width="2706" height="1344" data-path="images/partner_21979634305172.png" />
2. Add your Talon.One subdomain to the endpoint URL.<img src="https://mintcdn.com/moengage/0EdW-QMnfbsLxXT2/images/partner_4631619545492.png?fit=max&auto=format&n=0EdW-QMnfbsLxXT2&q=85&s=4d65528b51a8957292e29f7e9d538b68" alt="Screenshot_2022-03-08_at_7.54.01_PM.png" width="1284" height="420" data-path="images/partner_4631619545492.png" />

#### Headers

| Parameter                             | Description                                                                   | Example                                     |
| ------------------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------- |
| `Authorization`\*                     | Required. API authorization key                                               | `ApiKey-v1 <TOKEN>`                         |
| `customer-engagement-platform-name`\* | Required. Enter *MoEngage* here                                               | `<MoEngage>`                                |
| `destination-hostname`\*              | Required. The base URL of your Talon.One deployment.                          | `https://mycompany.europe-west1.talon.one/` |
| `X-DRY-RUN`                           | Indicates whether to persist the changes. Changes are ignored when `dry=true` | `true`                                      |

#### Path parameters

| Parameter                | Description                                                                                                                                               | Example                |
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- |
| `campaignId`\*           | Required. The ID of the campaign in Talon.One where the coupon will be created.                                                                           | `34`                   |
| `applicationId`\*        | Required. The ID of the Application in Talon.One.                                                                                                         | `12`                   |
| `externalCampaignId`\*   | Required. The external campaign id that should be referenced                                                                                              | `abc123`               |
| `recipientIntegrationID` | The integration ID of the only customer that can use the generated coupon code. Leave blank to allow any user to use the coupon.                          | `abc123`               |
| `discountLimit`          | The discount amount the coupon is worth. Can be blank if for example the coupon provides a 10% discount or something other than a set value of discounts. | `1.23`                 |
| `startDate`              | Time when the coupon starts becomes valid.                                                                                                                | `2020-12-31T13:00:00Z` |
| `expiryDate`             | Time when the coupon stops being valid.                                                                                                                   | `2021-12-31T13:00:00Z` |
| `Attributes`             | Object containing all the coupon attributes to set on the coupon.                                                                                         |                        |

To set a custom attribute, add the attribute name and value as an extra query parameter prefixed with a `.`. For example, if you have an `email` attribute, set it with: `&.email=john.doe@example.com`.

3. URL [https://integration.talon.one/customer\_engagement/referral](https://integration.talon.one/customer_engagement/referral)

#### Headers

| Parameter                             | Description                                                                   | Example                                     |
| ------------------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------- |
| `Authorization`\*                     | Required. API authorization key                                               | `ApiKey-v1 <TOKEN>`                         |
| `customer-engagement-platform-name`\* | Required. Enter *MoEngage* here                                               | `<MoEngage>`                                |
| `destination-hostname`\*              | Required. The base URL of your Talon.One deployment.                          | `https://mycompany.europe-west1.talon.one/` |
| `X-DRY-RUN`                           | Indicates whether to persist the changes. Changes are ignored when `dry=true` | `true`                                      |

#### Path parameters

| Parameter                      | Description                                                                                                                     | Example                |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- | ---------------------- |
| `campaignId`                   | Required. The ID of the campaign in Talon.One where the referral code will be created.                                          | `34`                   |
| `externalCampaignId`           | Required. The external campaign id that should be referenced                                                                    | `abc123`               |
| `advocateprofileintegrationid` | Required. The integration ID of the advocate                                                                                    | `abc123`               |
| `friendprofileintegrationid`   | The profile ID of the referred customer.                                                                                        | `abc123`               |
| `usagelimit`                   | Number of times a referral code can be used. This can be set to 0 for no limit, but any campaign usage limits will still apply. | `1.23`                 |
| `startDate`                    | Date when the referral code can be used.                                                                                        | `2020-12-31T13:00:00Z` |
| `expiryDate`                   | Date when the referral code can't be used anymore.                                                                              | `2020-12-31T13:00:00Z` |
| `Attributes`                   | Object containing all the coupon attributes to set on the coupon.                                                               |                        |

### Fetch loyalty ledger

#### URL

GET loyalty

[https://integration.talon.one/customer\_engagement/loyalty](https://integration.talon.one/customer_engagement/loyalty)

#### Headers

| Parameter                           | Description                                           | Example                                     |
| ----------------------------------- | ----------------------------------------------------- | ------------------------------------------- |
| `Authorization`                     | Required. API authorization key.                      | `ApiKey-v1 TOKEN`                           |
| `customer-engagement-platform-name` | Required. Enter *MoEngage* here                       | `<MoEngage>`                                |
| `destination-hostname`              | Required. The base URL of your Talon.One deployment.. | `https://mycompany.europe-west1.talon.one/` |

#### Path parameters

| Parameter              | Description                                                                                                       | Example                |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------- | ---------------------- |
| `profileIntegrationID` | Required. The integration ID of the customer profile in [Talon.One](http://Talon.One).                            | `abc123`               |
| `loyaltyProgramID`     | Required. The ID of the loyalty program in Talon.One.                                                             | `34`                   |
| `projectionEndDate`    | Required. The end date to query the projected loyalty balances. You can project results up to 31 days from today. | `2020-12-31T13:00:00Z` |

4. Click Save. And you will see your Talon.One API added in MoEngage <img src="https://mintcdn.com/moengage/0EdW-QMnfbsLxXT2/images/partner_4631794709652.png?fit=max&auto=format&n=0EdW-QMnfbsLxXT2&q=85&s=9f402eb1e4eb87d052cb1757b9aa82c3" alt="Screenshot_2022-03-08_at_8.05.10_PM.png" width="2308" height="586" data-path="images/partner_4631794709652.png" />

## Step 3: Using Talon.One's content in MoEngage campaigns

You can now use these content APIs in your campaigns. [Read here](/docs/user-guide/campaigns-and-channels/getting-started/campaign-content/content-apis) to know more.

1. On step 2 of your campaign creation, enter @.
2. In the pop-up, select the Content API configured in Step 2.
3. You can use MoEngage templating language to parse through the API response and use the content in your campaigns. Read about the Talon.One API responses in the following links: [Create coupon ,](https://docs.talon.one/third-party-api#tag/Customer-engagement-platforms/operation/cep/createCoupon) [Create referral](https://docs.talon.one/third-party-api#tag/Customer-engagement-platforms/operation/cep/createReferral)[ , Fetch loyalty ledger](https://docs.talon.one/third-party-api#tag/Customer-engagement-platforms/operation/cep/loyalty)
