New 'discountReferenceIds' array + deprecated single discountReferenceId
We have built in further detail to the discount information sent to integrated POS platforms to identify where more than one discount is applied to an order. This will mean that where previously we'd send a singular "discountReferenceId"
we will now send "discountReferenceIds"
which will be an array of identifiers of each discount applied.
What will change?
🚧 The additional discountReferenceIds
attribute has been deployed to our staging environment on 4th September 2023 and will be deployed on our production environment on 11th September 2023.
❗️With this improvement, we will be deprecating the singular attribute discountReferenceId
which references only a singular referenceId
this will be deprecated on 11th December 2023
Further info
As an example, the single item purchased 'Lasagna' has two different percentage discounts applied. The referenceId
of these discounts is 1
and 3
In addition, the order itself has a 'free delivery' promotion applied, although this referenceId is 2
it does not apply to any individual item.
...
"items": [
{
"plu": "LASAGNA",
"name": "Lasagna",
"sortOrder": 0,
"price": 29800,
"quantity": 1,
"productType": 1,
"remark": "",
"subItems": [],
"productTags": [],
"discountReferenceId": 3,
"discountReferenceIds": [
1,
3
]
}
],
"discountTotal": 0,
"discounts": [
{
"type": "item_percent_off",
"provider": "shared",
"referenceId": 1,
"value": 5900,
"amount": 5900
},
{
"type": "delivery_discount",
"provider": "channel",
"name": "FREE delivery for all purchases over $100 paid with credit card",
"referenceId": 2,
"value": 490,
"amount": 490
},
{
"type": "item_percent_off",
"provider": "shared",
"referenceId": 3,
"value": 5900,
"amount": 5900
}
]
....
}
See Order Notification webhook for more information on the POS order model