lightning__conversationEndUserMessage

Messaging event triggered when the customer sends a new message. In Enhanced Messaging channels, this event is triggered only for text messages. This event is not triggered for messages with files or rich content. To work with Enhanced Messaging channels, the session must be active and the Enhanced Conversation Component must be visible on the page.

NameTypeDescription
recordIdStringThe ID of the work record that’s associated with the current conversation.
contentStringThe message sent by the customer.
nameStringThe name of the user who sent the message. This name matches the username displayed in the conversation log.
timestampDate/TimeThe date and time the message was received.

To listen to the lightning__conversationEndUserMessage event, import the Lightning Message Service features from lightning/messageService and pass the event to the subscribe() method.

Component code:

Controller code: