Hi,
I am developing an agent chat assistant to provide response suggestions based on this article (https://developer.mypurecloud.com/blueprints/chat-assistant-blueprint/), and we are using chat widgets to integrate chats on our site, and I was able to run my setup, it works fine with version 2 widget deployment in the developer tool, but unable to test it with version 1 widget deployment.
It seems the notification subscription for topic v2.users.{0}.chats and v2.conversations.chats.{0}.messages can be subscribed successfully, but no events can be received from the WS channel except Heatbeat when testing with version 1 widget deployment.
And the postConversationsChatCommunicationMessages method of the platform client conversation API returns 404 (chat.error.not.found)
var message = "a message from agent"
const platformClient = require('platformClient');
const conversationsApi = new platformClient.ConversationsApi();
conversationsApi.postConversationsChatCommunicationMessages(
conversationId,
agentCommunicateId,
{"body": message, "bodyType": "standard"}
)
The agentCommunicateId was retrieved from conversation participant.chats[0].id which purpose is agent.
The same code works fine with version 2.0 widgets.
I have read this article as well:
https://developer.mypurecloud.com/blog/2020-02-19-agent-chat-assistant/index.html
I've noticed that it has an important note at the end of this article to state that ensures using Version 1.1, Third Party, Version 2, but don't know why.
Thanks,
Mark