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 toneeds approval
.
Payload
Field | Type |
---|---|
sfEntityType | string |
id | string |
content | Content object follows one of four schemas: |
title | string |
labels | array[object] |
service | string |
targetAccountIds | array[string] |
organicVisibility | string |
delegationStatus | string |
publicationResults | array[object] |
scheduledPublishDate | integer |
notes | array[object] |
links | object |
Content (One of these four)
Status
Field | Type | Description |
---|---|---|
sfEntityType | string**Example:** Status | |
text | string | The text of the message. |
ImageShare
Field | Type |
---|---|
sfEntityType | string**Example:** ImageShare |
caption | string |
temporaryImageUrl | string**Format:** uri |
temporaryThumbnailUrl | string Format: uri |
ImageShareList
Field | Type |
---|---|
sfEntityType | string**Example:** ImageShareList |
caption | string |
images | array[object] |
images Object
Field | Type |
---|---|
sfEntityType | string Example: ImageShare |
caption | string |
temporaryImageUrl | string Format: uri |
temporaryThumbnailUrl | string Format: uri |
Video
Field | Type |
---|---|
sfEntityType | string Example: Video |
videoTitle | string |
description | string |
tags | string |
category | string |
publicationResults Object
Field | Type | Description |
---|---|---|
sfEntityType | string Example: PublicationResult | |
accountId | integer**Format:** int64 | The Khoros Marketing internal ID of the account to be used when the message is published. |
serviceId | string | The ID of the published message on the Social Service. Note: Only present after publishing. |
status | string | The current state of the message. |
datePublished | integer**Format:** int64 | The date and time when the message is currently slated to be published in seconds since epoch. |
notes Object
Field | Type | Description |
---|---|---|
id | integer**Format:** int64 | The internal ID of the note within Khoros Marketing. |
text | string | The content of the note. |
createdByDisplayName | string | The name of the user who created the original note. |
createdDate | integer**Format:** int64 | The date and time the note was originally created in seconds since epoch. |
lastModifiedByUserId | integer**Format:** int64 | The Khoros Marketing internal id of the user who last modified this note. |
lastModifiedDate | integer**Format:** int64 | The date and time of when this note was most recently updated in seconds since epoch. |
links Object
Field | Type | Description |
---|---|---|
messageLink | string | Direct link to the message within Khoros Marketing. |
Updated over 1 year ago