Search.../

onCouponDeleted( )

An event that is triggered when a coupon is deleted.

Description

The onCouponDeleted() event handler runs when a coupon is deleted.

Note: Backend events don't work when previewing your site.

Authorization

Request

This endpoint does not take any parameters

Status/Error Codes

Related Content:

Was this helpful?

An event when a coupon is deleted

Copy Code
1// Place this code in the events.js file
2// of your site's Backend section.
3
4export function wixMarketing_onCouponDeleted(event) {
5 const deletedCouponId = event.metadata.entityId;
6}
7
8/* Full event object
9 *
10 * {
11 * "metadata": {
12 * "id": "0c279cd0-3db2-4e5c-afb5-9b1346bf3ccc",
13 * "entityId": "03a35393-7835-44b0-af53-6019a484b48b",
14 * "eventTime": "2021-01-17T12:01:46.597758Z",
15 * "triggeredByAnonymizeRequest": false
16 * }
17 * }
18 *
19 */