1. Initialize Channel Integration Framework context.
2. Run the API to get conversationid details.
3. Run an API call to send messages by using conversationid as a parameter.

The integration first needs an initialized Channel Integration Framework context because VanArsdel is operating an external CCaaS provider through the Dynamics 365 representative desktop. The active interaction must then be identified so the integration can target the correct conversation rather than relying on an unrelated session identifier.
Dynamics 365 exposes an Omnichannel JavaScript API containing getConversationId, which retrieves the unique identifier of the current conversation, and sendMessageToConversation, which sends a programmatic message to a conversation. Microsoft documents conversationId as the identifier used to target a particular conversation; when supplied, sendMessageToConversation directs the message to that interaction.
This distinction is important because a representative can operate multiple sessions. Conversation identity is the reliable interaction-level identifier required by the API. Supplying both sessionid and conversationid is not the documented signature for sendMessageToConversation. Therefore, after the framework context is established, retrieve the conversation identifier and use that identifier when issuing the message operation.
Study Guide reference: Configure the Dynamics 365 Contact Center representative experience - > Extend the representative experience by using APIs and productivity capabilities.
Submit