How to create or retrieve a Coupon Code with Talon.One

Malcolm Jacobson
Malcolm Jacobson
  • Updated

Offering your customer a coupon is a great way to build customer engagement and loyalty. Customers can redeem coupons for discounts when making additional purchases, or for giveaways or special promotions.

Promotions engines like Talon.One can be used to validate and track coupon usage, providing a clear record of interactions during your customer journey.

Integrating Talon.One with Pendula gives you the ability to create or retrieve personalised coupons that target your customers preferences and behaviours at the optimal time in the customer journey, allowing you to maximise engagement and drive results.

Screenshot 2024-04-09 at 10.27.19.png

Coupon codes are created by using the web request node to make a GET request to Talon.One.


To create the coupon, you’ll need to know

  • the number - applicationId - of the Talon.One application you are using
  • the number - campaignId - of the Talon.One campaign within the application
  • the value - externalCampaignId - you use to identify the Talon.One campaign in your system of record

Refer to the Talon.One documentation for more information about where to find these in your Talon.One instance.

Add flexibility with an identifier

These the basic attributes that are required to generate a coupon code, and you could start with these, but let’s add an optional parameter - identifier - so we can decide if we want the GET request to either create a new coupon code, or to retrieve an existing coupon code.

When an identifier value is provided as part of the request, Talon.One will check to see if that value already exists inside the Talon.One database.

  • If the value in the identifier does not exist, Talon.One will create a new coupon code
  • If the value in the identifier already exists, Talon.One will retrieve the existing coupon code that matches this identifer

This way, you can use the same node configuration in different parts of the flow, or in separate flows, to create a new coupon for a new customer, or to retrieve an existing coupon code when you need to validate or redeem the coupon.

The value for identifier can be anything within your system of record that uniquely identifies an individual customer.

Now that you have all the information you require, let's see how to use this in a Pendula flow.


To create or retrieve coupons from Talon.One:

  1. Drag the Web Request node into your flow at the point where you want to create or retrieve a coupon code.
  2. Set the Request type to GET.
  3. Copy and paste the following into the API endpoint URL field:<VALUE>&campaignId=<VALUE>&externalCampaignId=<VALUE>&identifier=<VALUE>
    Replace each <VALUE> with the matching values from your systems.
    These values can either be added manually, or dynamically through merge fields.
  4. Select Headers from the Authentication drop down.
  5. Select the credential you have configured for Talon.One.
  6. In the Request headers section, click Add a header.
  7. Paste the following into the Header field:
  8. Enter pendula as the Value for this field.
  9. Click Add a header and paste destination-hostname into the Header field.
  10. In the Value field, enter the base URL for your Talon.One instance (e.g. -
  11. Click Add a header and paste X-DRY-RUN into the Header field, and false into the Value field.
  12. Click Save to save your changes and close the node editor.

Screenshot 2024-04-09 at 10.39.12.png

Using within a flow

A GET request to Talon.One can be used at any point in a flow where coupon codes are part of the customer journey. For example, the screenshot of the flow at the start of this article creates a coupon code to send to a customer as a thank you on their birthday each year.

Because Pendula can create or retrieve coupon codes at any time, you can also use this method for self-serve flows, like letting a customer check their loyalty points value by SMS, or inviting them to enter a competition by scanning a QR code with a special word, as shown in the following example.

Screenshot 2024-04-09 at 13.39.07.png