Skip to main content

Sending coupons via Iterable using a webhook

With an Iterable integration, you can send coupon codes generated in Talon.One to specific customers through one of the available Iterable messaging channels, like email, SMS, and push notification.

Tutorial summary

In this tutorial, we create a webhook to Iterable using the Send coupon template and set up campaigns in both platforms to show a basic integration use case. We reward a specific Iterable user with a personalized message and a generated coupon code on their birthday.

When the campaigns in both platforms are successfully evaluated, we can expect the following events to happen:

  1. On the user's birthday, Talon.One generates a coupon code and passes it to Iterable through the webhook effect.
  2. Iterable displays the received coupon code in a placeholder inside a personalized message to the user.
  3. Iterable sends the message to the user containing the coupon code for redemption.
Integration summary

In this tutorial, we use the following steps to show our Iterable integration use case:

  1. Create a webhook to Iterable using the available template.

    The webhook we create using the template contains a standard payload with:

    • The ID of the Iterable campaign.
    • The ID of the Iterable user to reward.
    • The coupon code to reward the user with.
  2. Create an Iterable campaign to send the coupon code to the user.

  3. Create a Talon.One campaign to pass a generated coupon to Iterable.

note

This tutorial describes a single use case of an Iterable integration template. You can customize your integration and campaign setups according to your business requirements.

Talon.One requirements

  • You are an Admin user.

  • In Account > Integrations > Iterable, you confirmed that the Connection Details section is up to date with:

    • Base URL: An endpoint URL that corresponds to your Iterable instance.
    • API Key: A server-side API key generated in Iterable.
    note
    • To find these values in Iterable, read about Base URLs and API keys.
    • If you enter or modify these values, remember to click Save.
  • You created a custom attribute to store the customer's birthday.

    • In this tutorial, we call this attribute Customer birthday.

Iterable requirements

  • You know which user to reward.
    • Copy the ID of the user to reward for later use. We call this Recipient User ID.

      tip

      You can look up users in Iterable by opening Segmentation > User Lookup.

  • You know which messaging channels you wish to use to reach your user.
  • You configured the required settings for those channels to work, for example, email setup.
  • You have an understanding of message personalization, specifically the {{<placeholder>}} syntax.

Creating a webhook to Iterable

Let's create a webhook to Iterable using the Send coupon template.

The webhook payload is prepopulated with the data expected by Iterable: The campaign ID, recipient user ID, and coupon code.

tip

In this tutorial, we use the template for convenience. You can always create a webhook without using a template.

To create a webhook to Iterable:

  1. Open Account > Integrations > Iterable.
  2. Click Create Webhook > Send coupon.
  3. In Webhook title, type a name for your webhook.
    • In this tutorial, we name it Send coupon code to Iterable.
  4. In Applications, select the Applications in which the webhook must be available.
  5. (Optional) Review the payload.
  6. Click Save.

Creating an Iterable campaign to send the coupon

In Iterable, let's create a campaign to send the coupon generated in Talon.One. You can use any supported messaging channel offered by Iterable. In this tutorial, we use email.

To create an Iterable campaign to send the coupon:

  1. In Iterable, click Messaging > Campaigns > New Campaign > Email.
  2. In Campaign name, type a name for your campaign.
  3. (Optional) To categorize your campaign using tags, click Add Label.
  1. In Type, click Api-Triggered, and click Create Campaign.
  1. Compose the email template as desired.

    • To create your own email template, in Content, click Start from scratch.

    • To insert the dynamically generated coupon code, personalize the email content accordingly. For example, your email message can read:

      Happy birthday, {{firstName}}!

      Use {{couponCode}} to get a discount on your next purchase with us.

      To unsubscribe from us, click {{unsubscribeUrl}}.
  2. Enter the remaining required details, and review your campaign by clicking Review.

  3. To activate your campaign, click Activate, and in the confirmation window, click Confirm.

  4. Copy the campaign ID for later use.

Creating a Talon.One campaign to generate the coupon

In Talon.One, let's create a standard campaign to generate a coupon code and trigger the webhook effect to pass the coupon code value to Iterable.

The campaign has a single rule containing 1 condition and 2 effects:

Condition

  • Validate attribute value: Customer birthday is on month day Current time.

Effects

  1. Create coupon code: In the current campaign, Recipient is Current Customer, Redemption Limit is 1.

    tip
    • To limit the discount value offered by the coupon, set a discount limit.
    • To personalize your code further, select Use custom code pattern. You can add a prefix or suffix and specify the code length and character set.
  2. Send coupon code to Iterable: CampaignID is <Campaign ID>, CouponCode is Generated Coupon in Session, and CustomerProfileID is <Recipient User ID>.

    note

    In this effect, you can paste the values you copied earlier:

    • <Campaign ID> is the ID of your Iterable campaign.
    • <Recipient User ID> is the ID of the Iterable user to reward.

Next steps

When you feel your campaign is configured to your requirements, activate the campaign. We recommend you test the integration by updating the customer profile with the customer's birthdate value.