The Loyalty Events Webhook

This webhook is actually a set of three "sub-events" that work together.

Any event may include a "LoyaltyInterface", indicating the point of sale, tablet, or web interface that was the source of that event. If a loyalty interface is not included, the event came from the member management interface in the SlickText dashboard.

LoyaltyEventCreated

The "loyalty event created" webhook event is triggered whenever any of your textwords acquire a new subscriber. This event will happen in any of the following circumstances...

  • A customer joins your loyalty program.
  • A customer gains points in your loyalty program.
  • A customer redeems a reward in your loyalty program.
  • You credit or debit loyalty members through the member management interface.

All of these events will include a "LoyaltyEvent", a "LoyaltyMember", and a "LoyaltyProgram", as well as other information depending on which event it is and where it came from. The LoyaltyEvent object will include one of three values for its "Type": "joined", "credit" or "debit".

"Debit" events may include an associated "Reward", indicating that the customer redeemed that reward. If a reward is not included, it the debit comes from the member management interface.

LoyaltyEventUpdated

The "loyalty event updated" webhook event is triggered when you change an credit or debit event in the member management interface.

LoyaltyEventDeleted

The "loyalty event deleted" webhook event is triggered when you delete an credit or debit event from the member management interface. Note that while the LoyaltyEvent is still included in the webhook data, at this point it has been successfully deleted and the associated debit or credit will not count toward the members points balance.

Example

Below is an example of the JSON data you'd receive from the "Loyalty Event Created" webhook.


                  {
                    "Event": "LoyaltyEventCreated",
                    "Timestamp": "2019-07-12 07:59:21",
                    "attemptNumber":1,
                    "LoyaltyEvent": {
                      "LoyaltyEventId": "68",
                      "Type": ("joined" or "credit" or "debit"),
                      "Spend": null,
                      "Amount": "0",
                      "Created": "2018-06-24 08:19:32"
                    },
                    "LoyaltyMember": {
                      "LoyaltyMemberId": "52",
                      "Hash": "b504272a0d7efb24f4dcf85844b75684",
                      "FirstName": "Jerry",
                      "Number": "+12222222222",
                      "Link": false,
                      "Created": "2019-06-24 08:19:32",
                      "Balance": 6,
                      "AvailableRewards": [
                        {
                          "LoyaltyRewardId": "16",
                          "Name": "free coffee",
                          "Description": "Get a free coffee",
                          "Cost": "3"
                        }, {
                          "LoyaltyRewardId": "17",
                          "Name": "free espresso",
                          "Description": "Get a free espresso drink",
                          "Cost": "6"
                        }
                      ]
                    },
                    "LoyaltyProgram": {
                      "LoyaltyProgramId": "6",
                      "Name": "Slick Coffee",
                      "Description": "The loyalty program for the Slick Cafe",
                      "BusinessName": "Slick Cafe",
                      "Type": "visit",
                      "MinimumAccrualInterval": "0",
                      "MinimumSpendPerAccrual": "0",
                      "DollarsPerPoint": "",
                      "PointsAccruedMessage": "",
                      "PointsAccruedAndRewardMessage": "",
                      "Rewards": [
                        {
                          "LoyaltyRewardId": "16",
                          "Name": "free coffee",
                          "Description": "Get a free coffee",
                          "Cost": "3"
                        }, {
                          "LoyaltyRewardId": "17",
                          "Name": "free espress",
                          "Description": "Get a free espresso drink",
                          "Cost": "6"
                        }, {
                          "LoyaltyRewardId": "18",
                          "Name": "free food",
                          "Description": "Get some free food",
                          "Cost": "12"
                        }
                      ]
                    },
                    "Reward": {
                      "LoyaltyRewardId": "18",
                      "Name": "foooooooood",
                      "Description": "Get some food",
                      "Cost": "12"
                    },
                    "LoyaltyInterface": {
                      "LoyaltyInterfaceId": "12",
                      "TextwordId": null,
                      "Name": "New Check-In Screen",
                      "Hash": "782eaad2048b7d8760819c22aa665a4c",
                      "PointOfSaleId": "bdb19111-1bf4-4a60-9d6c-35d94cacf07a",
                      "DoubleOptIn": false,
                      "DoubleOptInMessage": ""
                    }
                  }