Triggered when a discount rule is updated.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.ecom.discounts.v1.discount_rule
.
Event name. Expected updated
.
ID of the entity associated with the event.
Event timestamp.
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
If present, indicates the action that triggered the event.
Event information.
The data payload will include the following as an encoded JWT:
{
"data": {
"eventType": "wix.ecom.discounts.v1.discount_rule_updated",
"instanceId": "<app-instance-id>",
"data": "<stringified-JSON>",
// The identity field is sent as a stringified JSON
"identity": {
"identityType": "<identityType>", // ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP
"anonymousVisitorId": "<anonymousVisitorId>", // in case of ANONYMOUS_VISITOR
"memberId": "<memberId>", // in case of MEMBER
"wixUserId": "<wixUserId>", // in case of WIX_USER
"appId": "<appId>" // in case of APP
}
}
}
{
"entityId": "18b3a857-131e-47b1-8748-3c4d362511f3",
"entityEventSequence": "2",
"slug": "updated",
"id": "656ddf67-99fc-44ab-b3b1-6f99623328fd",
"entityFqdn": "wix.ecom.discounts.v1.discount_rule",
"updatedEvent": {
"currentEntity": {
"usageCount": 0,
"name": "New discount name",
"revision": "2",
"id": "18b3a857-131e-47b1-8748-3c4d362511f3",
"status": "LIVE",
"discounts": {
"values": [
{
"targetType": "SPECIFIC_ITEMS",
"specificItemsInfo": {
"scopes": [
{
"id": "all_215238eb-22a5-4c36-9e7b-e7c08025e04e",
"type": "CATALOG_ITEM",
"catalogItemFilter": {
"catalogAppId": "215238eb-22a5-4c36-9e7b-e7c08025e04e",
"catalogItemIds": []
}
}
]
},
"percentage": 15,
"discountType": "PERCENTAGE"
}
]
},
"offer": "15% off\nAll products",
"updatedDate": "2023-06-28T12:51:41.482Z",
"createdDate": "2023-06-28T12:43:22.739Z",
"active": true,
"trigger": {
"itemQuantityRange": {
"scopes": [
{
"id": "all_215238eb-22a5-4c36-9e7b-e7c08025e04e",
"type": "CATALOG_ITEM",
"catalogItemFilter": {
"catalogAppId": "215238eb-22a5-4c36-9e7b-e7c08025e04e",
"catalogItemIds": []
}
}
],
"from": 5
},
"triggerType": "ITEM_QUANTITY_RANGE"
}
}
},
"eventTime": "2023-06-28T12:51:41.489714Z",
"triggeredByAnonymizeRequest": false
}