Fired when a user receives an email, whether sent from within Kademi or via an inbound mail integration. Registered as a TriggerEvent, this lets journeys and automation triggers react to received emails, for example to notify the recipient or to update engagement tracking for a related lead. The associated EmailItem and website are exposed both as typed getters and as entries in the attribute map.
Implements: TriggerEvent
Properties
| Property | Returns | Description |
|---|---|---|
| attachments | List<EmailAttachment> | The files attached to the received email, as EmailAttachment entities. |
| attributes | Map<String,Object> | Free-form attributes associated with this event, including the received email item under the key "emailItem" and the website under the key "website". |
| emailItem | EmailItem | The email item that was received. |
| eventId | String | The trigger event id used to register and match this event type. |
| sourceProfile | Profile | The profile of the user who received the email. |
| triggerItem1 | String | The first trigger matching item, used by trigger rules to filter on the website an email was received in. |
| triggerItem2 | String | The second trigger matching item. Unused by this event. |
| triggerItem3 | String | The third trigger matching item. Unused by this event. |
| triggerItem4 | String | The fourth trigger matching item. Unused by this event. |
| triggerItem5 | String | The fifth trigger matching item. Unused by this event. |
| website | Website | The website the email was received in the context of. |
Inherited from TriggerEvent
Properties
| Property | Returns | Description |
|---|---|---|
| serialisable | 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
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
getEmailItem() · getAttachments() · getWebsite() · getEventId() · getSourceProfile() · getTriggerItem1() · getTriggerItem2() · getTriggerItem3() · getTriggerItem4() · getTriggerItem5() · getAttributes()
getEmailItem()
Returns: EmailItem
The email item that was received.
getAttachments()
Returns: List<EmailAttachment>
The files attached to the received email, as EmailAttachment entities.
getWebsite()
Returns: Website
The website the email was received in the context of.
getEventId()
Returns: String
The trigger event id used to register and match this event type.
getSourceProfile()
Returns: Profile
The profile of the user who received the email.
getTriggerItem1()
Returns: String
The first trigger matching item, used by trigger rules to filter on the website an email was received in.
getTriggerItem2()
Returns: String
The second trigger matching item. Unused by this event.
getTriggerItem3()
Returns: String
The third trigger matching item. Unused by this event.
getTriggerItem4()
Returns: String
The fourth trigger matching item. Unused by this event.
getTriggerItem5()
Returns: String
The fifth trigger matching item. Unused by this event.
getAttributes()
Returns: Map<String,Object>
Free-form attributes associated with this event, including the received email item under the key "emailItem" and the website under the key "website".