Hello everyone,
We have used a Bot Flow before the Transfer to ACD action in our Inbound Message Flow for Web Messaging.
In that Bot Flow we make webservice requests to an external custom ChatBot. This ChatBot can send asynchronous multiple responses at any time.
However webservice request mechanism in the Bot Flow works upon request/response sequence whereas our requirement is writing to the customer as a Bot message at any time when a message comes from our ChatBot even when there isn't any other request by the customer or in the flow after starting the chat messaging.
I think we need to have a websocket connection in the Bot Flow to listen continuously from the external ChatBot or a Web Messaging API to be able to call any time to send a message to the customer on behalf of the Bot for an existing conversation.
There is an API as I've seen such as,
POST /api/v2/conversations/messages/{conversationId}/communications/{communicationId}/messages
Is that API provides sending messages on behalf of the Bot at any time when a conversation is started by an authenticated or unauthenticated customer.
With that API request I need to provide conversationId and communicationId parameters.
I already know conversationId but couldn't find the communicationId as it's name in conversation details requested to
GET /api/v2/analytics/conversations/{conversationId}/details
or
GET /api/v2/conversations/{conversationId}
However, I tried all the Id's such as sessionId, Id, externalContactId etc. I've found in the conversation details but I get "CommunicationId not found" error response from the API request.
Can you please help me to find a solution.
Regards,