Triggered when a coupon is applied.
function wixMarketing_onCouponApplied(event: CouponAppliedEvent): void;
export function wixMarketing_onCouponApplied(event) {
const eventId = event.metadata.id;
const entityId = event.data.coupon._id;
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.