Triggered when a discount rule is created.
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 created
.
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_created",
"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": "1",
"slug": "created",
"id": "44a04c22-73cb-457c-96fd-ef4438e84490",
"createdEvent": {
"entity": {
"usageCount": 0,
"name": "15% on all products when buying more than 5 items",
"revision": "1",
"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:43:22.739Z",
"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"
}
}
},
"entityFqdn": "wix.ecom.discounts.v1.discount_rule",
"eventTime": "2023-06-28T12:43:22.747473Z",
"triggeredByAnonymizeRequest": false
}