Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
getConversationLog() for LWC for Lightning Experience
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
| Name | Type | Description |
|---|---|---|
| recordId | String | The 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.
| Name | Type | Description |
|---|---|---|
| messages | Array 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.
| Name | Type | Description |
|---|---|---|
| content | String | The text content of a message in the conversation log. |
| name | String | The name of the user who sent the message in the conversation log. This name appears exactly as it is displayed in the conversation. |
| type | String | The type of message that was received, such as AGENT or END_USER. |
| timestamp | String | The date and time the message was received. |