Fired when a comment or forum reply is posted on a website, identified by the event id "newComment". Carries the posted comment text and the page URL it was posted on in its attributes map, along with the profile that posted it and the underlying post. When the comment is a reply to an existing comment, two events are fired: one for the replier (comment type REPLY_TO_COMMENT) and one for the original commenter (comment type COMMENT_REPLIED_TO), so both sides of the conversation can trigger notifications.
Group: Journeys
Implements: TriggerEvent, FunnelEvent
Properties
| Property | Returns | Description |
|---|---|---|
| attributes | Map<String,Object> | Extra properties describing the event: comment (the posted comment text), pageUrl (the page the comment was posted on) and, when replying to an existing comment, parentComment (the text of the comment being replied to). |
| eventId | String | Persistence-friendly identifier for this event type. |
| leadProfile | Profile | The profile associated with this event as a funnel lead, which is the profile that posted the comment. |
| post | Post | The post (comment, forum question or forum reply) the comment relates to. |
| relatedLead | Lead | The existing lead associated with this event, if any. |
| sourceProfile | Profile | The profile that posted the comment. |
| triggerItem1 | String | First trigger key value used by the trigger event system for matching. Holds the website's id. |
| triggerItem2 | String | Second trigger key value used by the trigger event system for matching. Holds the comment type. |
| triggerItem3 | String | Third trigger key value used by the trigger event system for matching. Not used by this event. |
| triggerItem4 | String | Fourth trigger key value used by the trigger event system for matching. Not used by this event. |
| triggerItem5 | String | Fifth trigger key value used by the trigger event system for matching. Not used by this event. |
| website | Website | The website the comment was posted on. |
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
getSourceProfile() · getEventId() · getWebsite() · getTriggerItem1() · getTriggerItem2() · getTriggerItem3() · getTriggerItem4() · getTriggerItem5() · getAttributes() · getLeadProfile() · getRelatedLead() · getPost()
getSourceProfile()
Returns: Profile
The profile that posted the comment.
getEventId()
Returns: String
Persistence-friendly identifier for this event type.
getWebsite()
Returns: Website
The website the comment was posted on.
getTriggerItem1()
Returns: String
First trigger key value used by the trigger event system for matching. Holds the website's id.
getTriggerItem2()
Returns: String
Second trigger key value used by the trigger event system for matching. Holds the comment type.
getTriggerItem3()
Returns: String
Third trigger key value used by the trigger event system for matching. Not used by this event.
getTriggerItem4()
Returns: String
Fourth trigger key value used by the trigger event system for matching. Not used by this event.
getTriggerItem5()
Returns: String
Fifth trigger key value used by the trigger event system for matching. Not used by this event.
getAttributes()
Returns: Map<String,Object>
Extra properties describing the event: comment (the posted comment text), pageUrl (the page the comment was posted on) and, when replying to an existing comment, parentComment (the text of the comment being replied to).
getLeadProfile()
Returns: Profile
The profile associated with this event as a funnel lead, which is the profile that posted the comment.
getRelatedLead()
Returns: Lead
The existing lead associated with this event, if any.
getPost()
Returns: Post
The post (comment, forum question or forum reply) the comment relates to.