getConversationLog() for LWC for Lightning Experience

Retrieves the conversation log. This method works only in Lightning console apps.

This method returns up to 200 entries from the point the user scrolled to in the transcript. Rich content from bots, for example, messaging components with a question with choices, are not supported.

Arguments 

NameTypeDescription
recordIdStringThe ID of the record for the Messaging session.

Response 

Returns a Promise. Success resolves to a messages response object. The Promise is rejected if there’s an error.

NameTypeDescription
messagesArray of message objects.An array of message objects containing all of the messages from the conversation log.

message 

The message object containing a single message from the conversation log.

NameTypeDescription
contentStringThe text content of a message in the conversation log.
nameStringThe name of the user who sent the message in the conversation log. This name appears exactly as it is displayed in the conversation.
typeStringThe type of message that was received, such as AGENT or END_USER.
timestampStringThe date and time the message was received.