Events: Message

Learn about the types of message-based events.

There are three types of message based events:

  • message-published - each time a message is published on an external network. There are several distinct cases to be aware of with this event:
    • If a message is published immediately, it will appear as expected on message-published.
    • If a message is natively scheduled, an event will trigger in message-sent-to-network as soon as the data is sent to the social network. Once the scheduled publish time is past and the message goes live, a second event will be sent via message-published.
    • If a message is scheduled to be published at a later date through Khoros Marketing, the event will be sent to message-published at the publish date and time, not at the time of message creation/scheduling.
  • message-sent-to-network - the moment the data is saved onto the social network for future publishing.
  • message-needs-approval - when a message’s state updates to needs approval.

Payload

Field

Type

sfEntityType

string

id

string

content

Content object follows one of four schemas:

titlestring
labelsarray[object]
servicestring
targetAccountIdsarray[string]
organicVisibilitystring
delegationStatusstring
publicationResultsarray[object]
scheduledPublishDateinteger
notesarray[object]
linksobject

Content (One of these four)

Status

FieldTypeDescription
sfEntityTypestring**Example:** Status
textstringThe text of the message.

ImageShare

FieldType
sfEntityTypestring**Example:** ImageShare
captionstring
temporaryImageUrlstring**Format:** uri
temporaryThumbnailUrlstring Format: uri

ImageShareList

FieldType
sfEntityTypestring**Example:** ImageShareList
captionstring
imagesarray[object]

images Object

FieldType
sfEntityTypestring Example: ImageShare
captionstring
temporaryImageUrlstring Format: uri
temporaryThumbnailUrlstring Format: uri

Video

FieldType
sfEntityTypestring Example: Video
videoTitlestring
descriptionstring
tagsstring
categorystring

publicationResults Object

FieldTypeDescription
sfEntityTypestring Example: PublicationResult
accountIdinteger**Format:** int64The Khoros Marketing internal ID of the account to be used when the message is published.
serviceIdstringThe ID of the published message on the Social Service. Note: Only present after publishing.
statusstringThe current state of the message.
datePublishedinteger**Format:** int64The date and time when the message is currently slated to be published in seconds since epoch.

notes Object

FieldTypeDescription
idinteger**Format:** int64The internal ID of the note within Khoros Marketing.
textstringThe content of the note.
createdByDisplayNamestringThe name of the user who created the original note.
createdDateinteger**Format:** int64The date and time the note was originally created in seconds since epoch.
lastModifiedByUserIdinteger**Format:** int64The Khoros Marketing internal id of the user who last modified this note.
lastModifiedDateinteger**Format:** int64The date and time of when this note was most recently updated in seconds since epoch.

links Object

FieldTypeDescription
messageLinkstringDirect link to the message within Khoros Marketing.