Skip to main content

Create coupon on loyalty tier upgrade Closed beta

This tutorial describes how to trigger effects when a customer reaches a new loyalty tier.

To do so, we'll use the Trigger Rule Engine: Tier upgrade integration in the Integration Hub to run a rule after tier upgrades.

As an example, we'll create a welcome coupon for customers who reach the Gold tier. When a tier upgrade happens, the integration sends a custom event to the Rule Engine, which then evaluates it and creates a coupon for the new Gold tier member.

For more use cases, see the overview of the integration.

Prerequisites

Configure your Application

1

Create an Integration API key

In your Application, create an Integration API key.

important

Ensure the Application is connected to your loyalty program.

2

Create custom attributes

Create three custom attributes to store the previous and current tier values, as well as the customer profile ID:

PropertyAttribute 1Attribute 2Attribute 3
EntityEventEventEvent
Event typeLoyaltyTierUpgradeLoyaltyTierUpgradeLoyaltyTierUpgrade
TypeStringStringString
API nameOldTierCurrentTierProfileIntegrationID
tip

For a list of the available event attributes and their types, see the overview of the integration.

This automatically creates a custom event named LoyaltyTierUpgrade that contains the three attributes.

3

Create a rule

In your campaign, create a rule to issue a welcome coupon when a customer reaches the Gold tier:

WhatNameProperties
ConditionsCheck for event types
and custom event values
  • Event type: LoyaltyTierUpgrade
  • OldTier (Event) is equal to silver And ...
  • CurrentTier (Event) is equal to gold
EffectsCreate coupon code
  • Recipient: Current Customer (Friend)
  • Code pattern > Use custom code pattern:
    • Code length: 4
    • Prefix: WELCOMEGOLD-

Configure the integration

1

Create an instance

Create an instance in the Integration Hub:

  1. Open > Integrations > Generic integrations.
  2. Open the Trigger Rule Engine: Tier upgrade integration and click Configure. If instances already exist, click Add instance.
  3. On the Initial Configuration page, enter a descriptive name for the instance, for example, Trigger tier upgrade event, and click Next.
2

Configure the connection

On the Connection page, enter the following:

FieldValue
Base URLThe base URL of your Talon.One deployment.
Example: mycompany.europe-west1.talon.one
API keyThe Integration API key you created.
3

Select a loyalty program

On the Loyalty Program page, select the loyalty program connected to your Application.

The integration will only process tier upgrades from this loyalty program.

4

Configure event mapping

On the Event Configuration page:

  1. Click Add to Field Mappings.

  2. In Field Mappings, map the tier upgrade notification fields to the custom attributes you created. In this example, the source and target field names are the same, but you still must add them explicitly:

    Source field nameTarget field name
    OldTierOldTier
    CurrentTierCurrentTier
    ProfileIntegrationIDProfileIntegrationID
  3. In API Event Type, enter LoyaltyTierUpgrade. This must match the event type you assigned to the custom attributes.

Test the setup

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

  1. Manually add loyalty points to a customer's profile. Add enough points to trigger a tier change from Silver to Gold.
  2. In your Application, open the Events page.
  3. In the list of events, find the LoyaltyTierUpgrade event for the customer whose tier you just upgraded. If you don't see the event, wait a few minutes and refresh the page.
  4. In the Effects column, click 1 triggered.

The Triggered effects drawer opens, showing the coupon code created for the customer, for example, WELCOMEGOLD-Y88B.