Fired at each step of a referral's lifecycle: when it is sent, and again when it converts to a signup. On a sent referral it fires twice, once with the sender as the source profile (REFERRAL_SENT_BY_SENDER) and once with the recipient as the source profile (REFERRAL_SENT_TO_RECIPIENT). On a converted referral it fires twice again, once for the sender (REFERRAL_SIGNUP_SENDER) and once for the recipient (REFERRAL_SIGNUP_RECIPIENT). Use the action property to determine which of the four cases a given event represents. Registered with event id "referral".

Group: Journeys

Implements: TriggerEvent, FunnelEvent


Properties

PropertyReturnsDescription
actionReferralActionWhich of the four referral lifecycle steps this event represents: a referral sent to, or accepted by, either the sender or the recipient.
attributesMap<String,Object>Extra properties for this event. Always empty for this event type.
eventIdStringThe constant event id used to register listeners for this event type.
leadProfileProfileThe profile this event is reported against: the source profile for the sender-side actions (REFERRAL_SIGNUP_SENDER, REFERRAL_SENT_BY_SENDER), or the recipient profile for the recipient-side actions (REFERRAL_SIGNUP_RECIPIENT, REFERRAL_SENT_TO_RECIPIENT).
messageStringThe personal message the sender attached to the referral invitation, if any.
pageHrefStringThe URL of the accept-invitation page for the referral, included in the sent notification.
referralReferralThe referral this event relates to.
relatedLeadLeadThis event is never associated with an existing lead.
senderProfileThe profile who sent the referral.
sourceProfileProfileThe profile that is the source of this event, as passed to the constructor when the event was raised.
triggerItem1StringThe id of the website the referral belongs to.
triggerItem2StringThe name of this event's referral action.
triggerItem3StringNot used, always null.
triggerItem4StringNot used, always null.
triggerItem5StringNot used, always null.
websiteWebsiteThe website the referral belongs to.

Inherited from TriggerEvent

Properties

PropertyReturnsDescription
serialisablebooleanWhether this event's attributes were built to survive being persisted, ie every value is a plain serialisable value rather than a persistent entity or some other object that only makes sense inside the firing transaction. Only the firing app can know this, so it declares it - see EventBuilder. An agent that subscribes to an event does not run when it fires. The event is written to storage as JSON, buffered with others, and read back minutes later in a different session, so a value that cannot be written and read back is not merely awkward, it breaks the whole delivery. The agent framework therefore ignores any event which does not say yes here.

Methods

isSerialisable()

Returns: boolean

Whether this event's attributes were built to survive being persisted, ie every value is a plain serialisable value rather than a persistent entity or some other object that only makes sense inside the firing transaction. Only the firing app can know this, so it declares it - see EventBuilder. An agent that subscribes to an event does not run when it fires. The event is written to storage as JSON, buffered with others, and read back minutes later in a different session, so a value that cannot be written and read back is not merely awkward, it breaks the whole delivery. The agent framework therefore ignores any event which does not say yes here.


Methods

getLeadProfile() · getAction() · getRelatedLead() · getSourceProfile() · getEventId() · getWebsite() · getTriggerItem1() · getTriggerItem2() · getTriggerItem3() · getTriggerItem4() · getTriggerItem5() · getAttributes() · getSender() · getReferral() · getMessage() · getPageHref()

getLeadProfile()

Returns: Profile

The profile this event is reported against: the source profile for the sender-side actions (REFERRAL_SIGNUP_SENDER, REFERRAL_SENT_BY_SENDER), or the recipient profile for the recipient-side actions (REFERRAL_SIGNUP_RECIPIENT, REFERRAL_SENT_TO_RECIPIENT).

getAction()

Returns: ReferralAction

Which of the four referral lifecycle steps this event represents: a referral sent to, or accepted by, either the sender or the recipient.

getRelatedLead()

Returns: Lead

This event is never associated with an existing lead.

getSourceProfile()

Returns: Profile

The profile that is the source of this event, as passed to the constructor when the event was raised.

getEventId()

Returns: String

The constant event id used to register listeners for this event type.

getWebsite()

Returns: Website

The website the referral belongs to.

getTriggerItem1()

Returns: String

The id of the website the referral belongs to.

getTriggerItem2()

Returns: String

The name of this event's referral action.

getTriggerItem3()

Returns: String

Not used, always null.

getTriggerItem4()

Returns: String

Not used, always null.

getTriggerItem5()

Returns: String

Not used, always null.

getAttributes()

Returns: Map<String,Object>

Extra properties for this event. Always empty for this event type.

getSender()

Returns: Profile

The profile who sent the referral.

getReferral()

Returns: Referral

The referral this event relates to.

getMessage()

Returns: String

The personal message the sender attached to the referral invitation, if any.

getPageHref()

Returns: String

The URL of the accept-invitation page for the referral, included in the sent notification.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.