Skip to main content
Rewarding your customers always pays off. For this, Engage has a Promotions module. There are several kinds of promotions available in Engage but the kind you can interact with via the Engage API are multichannel promotions so these are the main focus here.

Multichannel promotions

A multichannel promotion is one that can be set up to be used in-store or online or both ways. These promotions can be assigned to a contact based on their previous purchases or on any other type of contact data or interaction. You can assign multichannel promotions to segments as well as to single contacts in Engage. For this reason they’re also known as personal offers. Multichannel promotions can be used:
  • In-store - Here the contact is identified at the POS and their active multichannel promotions are fetched from Engage and are ready to use in the checkout
  • Online - Here the customer will also need to identify themselves at some point in the flow, either by logging in, or when they fill in their details at the checkout. Then all available multichannel promotions can be fetched from Engage and shown. How exactly this is done will depend on how the e-com has been set up.

Creating multichannel promotions

There are several ways to create and assign multichannel promotions when working with Engage. In this article the focus will be mostly on the Engage API but there are also these methods:

Setting up a multichannel promotion in Engage

Setting up a multichannel promotion in Engage
You will select the type of the promotion from the dropdown. You can use different values for “Can be used in store” and “Can be used online” in the same promotion. The options available are:
  • Monetary discount
  • Discount in percent
  • Manual instruction (only for in-store POS)
  • External promotion code
In the value type “External promotion code” the actual price rule is not stored in the promotion itself but in the retailer’s system (ERP or e-com platform). When this kind of promotion is displayed, the POS looks up the relevant price rule using the external promotion code and then displays those details. Staff or customers will not notice this happening.

Learn about setting up multichannel promotions

Assigning promotions by XML file import are covered in this article:

Assigning promotions by XML file

Get promotions for contact

The API endpoint used to fetch all available promotions assigned to a contact is:
These query string parameters are used:
  • contactId - The contact’s unique ID. If you have some other contact identifier, use this endpoint to get the contactId you will need for this request.
  • redemptionChannelType - “ECOM”, “POS” or “OTHER”. If left out, all promotions are returned.
string
This identifies a specific “instance” of the promotion that was created from the “template” that was identified by promotionId. The id value is unique to that contact and is the one used when redeeming this promotion.
string
This is the ID of the main promotion (the “template” this particular promotion was created from). Many customers can have the same value for this, since it just refers to the main promotion. This CAN’T be used to redeem a promotion.
string
This value exists when the promotion has been created over the API. If the promotion was created manually in the Engage UI, this is null. It is not important when redeeming the promotion.
The value returned as id is what you must use to redeem the promotion.
A request to this endpoint will only return those promotions where the assigned promotion AND the main promotion are active, and with a start date that is not in the future. This query will include already redeemed promotions as long as they otherwise fulfill the criteria for being active.

Redemption channels

When getting a contact’s promotion data, you’ll get back something like this:
The redemptionChannels object in the response specifies if a promotion is a percentage, a monetary amount to be withdrawn from the total amount of the transaction, or an external discount code that refers to a price rule in your platform.
These are the fields in the redemptionChannels object:
  • type - Which channel the promotion applies to.
  • valueType - Which type of discount we want to assign (percentage, monetary or external code).
  • value - The percentage, monetary amount or external code referring to the external price rule. With a monetary discount we also expose the group currency set in Engage for that client.
  • instruction - An instruction that can be used, for example, to give some information to store staff regarding the promotion.
These can be displayed in all currencies declared in your Engage environment.
Some redemptionChannels examples:

Assign a promotion

Multichannel promotions, as mentioned, can be assigned to contacts in these ways:
  • Over the Engage API
  • Manually in the Engage UI
  • Though an XML file import
Here we will continue to focus on the Engage API method, with this endpoint:
With this request you send the following kind of payload:
If your request has been successful, you’ll get a HTTP 200 OK response. Otherwise you’ll get one of these:
  • 400: InvalidContactId, InvalidPromotionId
  • 404: ContactNotFound, PromotionNotFound

Redeem a promotion

As soon as a promotion is used in a purchase, it must be redeemed in Engage so it can’t be used again. To do this you’ll need to know:
  • the promotion’s unique assignment ID
  • the redemption channel, either “POS” or “ECOM”
Since the assignment ID is already connected to a unique contact, the contact’s details are not needed when redeeming a promotion.
There are two steps in redeeming:
1

Call the /redeem endpoint

Redeem the promotion with a call to this endpoint, adding the assignment ID in the path:
In the request body, add the redemption channel:
2

Add promotion ID to /receipts call

As with every purchase, you will also call this endpoint with the full receipt information:
Here you will add the assignment ID of the promotion used to the usedPromotions block in the body of the query:
If you only call the /receipts endpoint but not /redeem, the promotion will still be redeemed, but often after a delay, bringing the risk that it could be used again. If you call /redeem but miss to add the promotion assignment ID to the /receipts call, the system will not know which transaction to connect the redeemed promotion to. It will try to work it out based on the timestamp, checking for transactions within ±5 minutes of the redemption. So you should always do both of these things whenever a promotion is used in a purchase.
After 4.5 seconds the /redeem endpoint will time out, provided it has not already saved the promotion as redeemed. If the promotion has been redeemed (this is known as the “point of no return”) when the 4.5 seconds limit is passed, the request will be processed until completion. It is therefore recommended to not have a timeout shorter than 60 seconds, in order to avoid situations where a promotion is redeemed in Engage but the calling system does not know it due to aborting the request.

Redemption response codes

If the request has been successful, you’ll get a HTTP 200 OK response. Otherwise you’ll get one of these:
  • 400: NotAValidRedemptionChannel, InvalidPromotionIdNoData
  • 404: PromotionNotFound, PromotionNotAssociatedWithContact
  • 409: PromotionNotValidForRedemptionChannel, PromotionAlreadyRedeemed, PromotionAlreadyRedeemed
  • 504: GatewayTimeout

Create a promotion

Creation of a multichannel promotion can be done in three ways:
  • Over the Engage API
  • Manually in the Engage UI
  • Though an XML file import
Whenever a new promotion is created in Engage, it is a draft. It must then be activated so that it can be assigned to contacts. This assignment must be manually done in the Engage UI.
Create a draft promotion using the following endpoint:
You can create a promotion in two ways:
  • By giving a start date and a validity time
  • By giving a start date and an end date
When sending in the startDate or endDate send only the year, month and day as in the examples shown below. Specific times in a day cannot be used.
Here is what such a request looks like:
Here is a successful response, containing the promotion’s ID:
The value id here is the ID for the promotion definition. This is used to assign this promotion to individual contacts. Each assignment gets its own ID, connecting this promotion and contact.
Here is what such a request looks like:
Here is a successful response, containing the promotion’s ID:
The maximum value for end date is “9999-12-30”.
If your creation request has been successful, you’ll get a HTTP 200 OK response. Otherwise you’ll get one of these:
  • 400: BadRequest
  • 500: Error

Update a promotion

You can update (alter) a multichannel promotions over the Engage API.
Only draft promotions can be updated, not active promotions.
You can update the entire promotion or only its validity. Each method uses a different API endpoint:
To update the entire multichannel promotion, used this endpoint:
Send a payload in the same format as when you created the promotion, including your updates:
To update just the duration of an existing multichannel promotion, send a PUT to this endpoint:
With a payload formatted like this:

Delete a promotion

You can delete a promotion using its Engage ID or its external ID (assuming an external ID was used when creating the promotion).
Only unassigned promotions can be deleted.
To delete a multichannel promotion using the ID, use this endpoint:
The id value here is the Engage ID (“31bc4f89-6e71-4086-8627-af8f01073331” or similar).
To delete a multichannel promotion using the external ID, use this endpoint with externalId as the query parameter:

Export promotions by XML

Exporting promotions by XML files are covered in this article:

Exporting promotions by XML file