Search.../

onCouponCreated( )

Developer Preview

Triggered when a loyalty coupon is created.

Syntax

function wixLoyalty_onCouponCreated(event: CouponCreated): void

onCouponCreated Parameters

NAME
TYPE
DESCRIPTION
event
Optional
CouponCreated

Returns

This function does not return anything.

Return Type:

void

Was this helpful?

onCouponCreated example

Copy Code
1
2 export function wixLoyalty_onCouponCreated(event) {
3 const eventId = event.metadata.id
4 const entityId = event.entity._id;
5 }
6
7