Skip to main content

Creating coupons through Iterable

In this tutorial, let's set up Talon.One and Iterable to have Iterable automatically request user-specific coupon codes directly from Talon.One.

For example, let's imagine that:

  • We are sending an email to users in some segment.
  • We want to include user-specific coupon codes worth 10% off purchases over $20.

With this integration, you can automate the process of creating those coupon codes via Talon.One and displaying them in the promotional email from Iterable.

important

This tutorial also applies when you want to create gift cards with Iterable. You can apply the same steps because gift cards are a special type of coupons.

Rate limiting recommendations#

Contact your Iterable CSM for implementation support.

Talon.One coupon settings#

You can modify the shape of Talon.One-generated coupon codes for any campaign:

  1. Open your campaign.
  2. Click Settings > Coupon codes.

Generating an API key for a 3rd party service#

Let's generate a Talon.One API key that we will use for a 3rd-party service, in our case, Iterable.

  1. Navigate to the developer settings of your Talon.One Application.
  2. Click Create API Key
  3. For Do you want to use this API Key with a 3rd party service?, select Yes.
  4. Select Iterable from the dropdown.
  5. Select and expiry date and click Create API Key.
  6. Copy it for later use.

Generating the integration URI#

To generate the coupon in Iterable, we call the following endpoint:

https://integration.talon.one/iterable?&deployment=[deployment]                                       &applicationId=[applicationID]                                       &campaignId=[campaignID]                                       &discountLimit=[discountLimit]                                       &usageLimit=[usageLimit]                                       &startDate=[startTime]                                       &expiryDate=[expiryTime]                                       &recipientintegrationid=[recipientIntegrationID]

With the following query parameters:

  • deployment*: Your deployment base URL. For example, if your Talon.One dashboard URL is demo123.talon.one then this will be demo123.
  • applicationID*: The ID of your app.
  • campaignID*: The ID of the campaign in which the coupon should be granted.
  • 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.
  • usageLimit: The number of times the coupon can be used. 1 by default.
  • startTime: The URL-encoded time at which the coupon becomes available.
  • expiryTime: The URL-encoded time at which the coupon expires.
  • recipientIntegrationID: The ID of the user to whom the coupon is being granted, if user-specific.

Generate the URI with the follow form:

You can now use this URI to configure Iterable.

Configuring Iterable#

In Iterable, create a new data feed to pull in coupon codes:

  1. Choose a name, for example Talon.One coupon codes.
  2. Using the URI generated in the previous section in the URL field and set Format to JSON.
  3. In HTTP Headers, type APIKey-v1 and enter your the API generated earlier.

Creating a template and linking the data feed#

  1. Create an Iterable template that will be used for your marketing campaign

  2. In the Advanced Options tab, select your Talon.One data feed.

    For more information about data feeds, see the Iterable docs.

  3. Reference the coupon code and/or entire response from Talon.One within the email template by using square brackets.

    For example: [[result]], [[result.value]].

    See the Iterable Docs.

  4. Check the template and placement of the data feed response by using the Preview with data tool.

  5. Click Load template feed in order to bring in the data feed response data into the template.

Related links#