Webhooks for Coupon Creation & Redemption

Summary

Use Cases

Prerequisites

How do I get this functionality?

Update to Coupons API

Webhook Payloads


Summary

As part of our partnership with Impact Data, we strive to enhance our integration to uphold our customers' growing demand for more personalised marketing experiences.  To support this goal, we are enhancing the data available to be shared with Talk Box regarding coupons created for members and their redemption details.

Introducing webhooks to report details when coupons are created or redeemed in real-time will allow our customers to generate branded marketing emails and notify customers about the coupons.



Use Cases

This functionality will notify via webhook when coupons are:

  • created, or
  • redeemed

Prerequisites

To utilise this functionality the following version is required:

  • Polygon Central:  2.0.396 or later

How do I get this functionality?

If you want to implement these webhooks you will need to contact your account manager or:

  • call 1300 4 REDCAT (1300 473 322) in Australia, or
  • call 808 0808 189 3396 toll-free in the UK.

You will need to provide the URL you want to be configured for each webhook.



Update to Coupons API

To aid with the efficiency of coupon creation via API, a parameter may be added to have the coupons generated in the background by the task server instead of immediately by the database web server which may result in a time lag for the user when creating a large number of coupons.

To do this, "TaskServer": true may be added to the POST as shown below.

{
  "Members": [
    1300,
      1301,
      1302
    ]
    "Mulitple": false,
    "TaskServer": true
}


Webhook Payloads

The data sent to the webhook URL(s) will look like this:

Coupon Creation

{
  "CreatedCoupons": [
    {
      "MemberID": 1330,
      "Hash": "149925de617e",
      "CouponExpiryDate": "2023-10-13T08:08:00"
    }
  ],
  "Coupon": {
    "FinishDate": "2023-10-13T08:08:00",
    "CouponName": "WH Test 4",
    "ActiveStatus": 1,
    "CouponID": 213,
    "StartDate": "2023-10-12T08:07:00"
  },
  "MsgCreatedUTC": "2023-10-11T22:10:26.564180+00:00"
}

Coupon Redemption

{
  "HashExpiry": null,
  "MemberID": 1005,
  "LastUpdateDate": "2023-10-12T09:23:20",
  "CouponID": 213,
  "CouponName": "WH Test 4",
  "MemberNo": "GATA0006417",
  "MsgCreatedUTC": "2023-10-11T22:24:22.318439+00:00",
  "Hash": "2cc2f53103e9",
  "LastRedemptionDate": "2023-10-12T09:24:22.131006+11:00",
  "ActiveStatus": 1
}

 

 

 

Article Change Log

Date Record of Changes Author

October 2023

First publication of this article.

Susan B