Skip to main content

chat-message-sent-v1 Event

The chat-message-sent-v1 event is triggered when the agent sends a chat message during an active chat interaction.

Properties

Object containing the following properties:

PropertyDescriptionType
interactionId (*)Unique identifier of the interactionstring
message (*)The chat message that was sentObject — see ChatMessage below
schemaVersion (*)Current schema version of the event'1.0.0'

(*) Required.

ChatMessage Properties

PropertyDescriptionType
id (*)Unique message identifierstring
timestamp (*)Message creation timestamp (epoch ms)number
type (*)Message typestring
rawMessage (*)Raw message contentstring | Record<string, string>
lastUpdatedTimestampTimestamp of last update (epoch ms)number
botNameName of the bot if message is from a botstring
msgStatusMessage delivery statusstring
attachmentsFile attachmentsArray of Attachment
translatedMessageTranslated content if translation is enabledstring | null
originalMessageOriginal content before translationstring
displayNameSender display namestring
authorAuthor detailsObject with id, email, name
variablesCustom variablesRecord<string, string>
resentWhether the message was resentboolean
isBotWhether the message originated from a botboolean
isDeletedWhether the message was deletedboolean

Event Emission

The chat-message-sent-v1 event is emitted by the Agent Workspace MFE whenever the agent sends a message in an active chat interaction.

Listeners

The event is consumed by third-party integrators that need to track or log outbound chat messages sent by the agent.

Additional Information

Sample event payload:

{
"interactionId": "interaction-12345",
"message": {
"id": "msg-abc123",
"timestamp": 1746522286592,
"type": "text",
"rawMessage": "Hello, how can I help you today?",
"displayName": "Agent Name",
"author": {
"id": "agent-001",
"email": "agent@example.com",
"name": "Agent Name"
}
},
"schemaVersion": "1.0.0"
}