> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: onCouponDeleted(event: CouponDeletedEvent) # Method package: wixMarketingBackend # Method menu location: wixMarketingBackend --> Events --> onCouponDeleted # Method Link: https://dev.wix.com/docs/velo/apis/wix-marketing-backend/events/on-coupon-deleted.md # Method Description: An event that is triggered when a coupon is deleted. The `onCouponDeleted()` event handler runs when a coupon is deleted. > **Note:** Backend events don't work when previewing your site. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## An event when a coupon is deleted ```javascript // Place this code in the events.js file // of your site's Backend section. export function wixMarketing_onCouponDeleted(event) { const deletedCouponId = event.metadata.entityId; } /* Full event object * * { * "metadata": { * "id": "0c279cd0-3db2-4e5c-afb5-9b1346bf3ccc", * "entityId": "03a35393-7835-44b0-af53-6019a484b48b", * "eventTime": "2021-01-17T12:01:46.597758Z", * "triggeredByAnonymizeRequest": false * } * } * */ ``` ---