Skip to content

Custom Bonuses

For StopChurn to be able to send out any bonuses they first must be created on the Back Office platform.

Create Custom Bonuses

Each bonus consist of a few simple fields:

  • Label – Custom label only meant for display within the User Journey creation process.
  • Name – Name of the bonus, which should be unique as it is used as a unique identifier when processing bonuses within the StopChurn system.
  • Value Type – As some bonuses might have values attached to them we need to be aware of what is the type of the possible value associated with the bonus.

To create our custom events we simply need to navigate to Database > Table Definitions on the Back Office platform and create the event using the custom event modal.

Bonus callbacks

Each brand have Bonus Endpoint property and all bonus requests are being sent to that endpoint. The payload signature security method is implemented for every callback.

Bonus callback data example

{
  "data": {
    "userId": 553,
    "name": "TEST_BONUS",
    "value": 256,
    "uniqueBonusId": "6579a4fb4acf4b8915c4346c_553",
    "eventData": { "name": "TEST_EVENT", "value": 333 }
  },
  "signature": "c01b60a5a6300ce9aff74833126dd08982cabf7527d0743cfe2805b62883e308859aefd1baf9588f1eed741949b2ea89b6c93e02c8a99fe61836bcb63a44bf2e"
}

By concatenating event trigger ID from our DB, underscore and user id, we get uniqueBonusId. This property can be used to prevent multiple bonuses triggering since it is unique for the journey event and user.

Property eventData contains data of the event which triggered the bonus action. It’s only being included in the bonus callbacks if ‘Send event data’ option is enabled on the edit journey action screen.