Wraps a voucher lifecycle change as a FunnelEvent, so a funnel can be driven by a voucher being issued to a profile or changing state (for example being redeemed). Raised by voucher issuing and redemption code across the vouchers app (VoucherManager, VouchersApp, ManageVoucherTypesFolder, VoucherRowProcessor) and passed to the funnel engine, which resolves the affected lead profile from the voucher's allocation.
Group: Journeys
Implements: FunnelEvent
Properties
| Property | Returns | Description |
|---|---|---|
| action | VoucherAction | Which lifecycle change the voucher underwent: ISSUED when the voucher was issued, or STATE_CHANGED for a subsequent state change such as redemption. |
| leadProfile | Profile | The profile the voucher is allocated to, resolving the allocated profile directly if it is set, otherwise looking it up by the voucher's allocated-to id. |
| relatedLead | Lead | Not used by this event; a voucher event has no directly related lead. |
| voucher | Voucher | The voucher this event is about. |
Methods
toProps()
Returns: Map<String,Serializable>
Builds the event properties map used by the funnels engine and exposed to JS, including a URN reference to the voucher and the action it underwent.
getLeadProfile()
Returns: Profile
The profile the voucher is allocated to, resolving the allocated profile directly if it is set, otherwise looking it up by the voucher's allocated-to id.
getVoucher()
Returns: Voucher
The voucher this event is about.
getAction()
Returns: VoucherAction
Which lifecycle change the voucher underwent: ISSUED when the voucher was issued, or STATE_CHANGED for a subsequent state change such as redemption.
getRelatedLead()
Returns: Lead
Not used by this event; a voucher event has no directly related lead.