Need Websocket Events for the following API

We are using our chat bot where we using this API to initiate a conversation and the conversation is initiating form this API.

https://api.mypurecloud.jp/api/v2/webchat/guest/conversations

We need events which can invoke when :

  1. Closing of the chat from the agent side with wrap-up codes
  2. Passing of parameters for prelogin & post login status and displaying to agent

Body:
{
"organizationId": "f2602543-bda3-425f-8625-90efc59a01a3",
"deploymentId": "f1995573-5fb5-42e1-9034-546d3f038340",
"routingTarget": {
"targetType": "queue",
"targetAddress":"TonikSDK"
},

"memberInfo": {
"displayName": "Joe Dirt",
"avatarImageUrl": " ",
"customFields": {
"lastName": "Joe",
"firstName": "Dirt",
"email": "joe.dirt@example.com",
"phoneNumber": "+12223334444",
"Subject": "arbitrary data",
"another_field": "more arbitrary data"
}
}
}

Welcome to our developer forum! You can request this feature here on our ideas portal: https://genesyscloud.ideas.aha.io/

Hello,

"1. Closing of the chat from the agent side with wrap-up codes"

When a participant (e.g. the workflow, the queue, an agent, ...) disconnects from the chat, a member-change event with $.eventBody.member.state = "DISCONNECTED" is raised/sent over the Guest Chat WebSocket.
The member-change event does not contain the role of the participant (if the participant is an agent or someone/something else).
It means that when a participant joins (member-join event sent over the WebSocket), you have to leverage the GET /api/v2/webchat/guest/conversations/{conversationId}/members/{memberId} request in Guest Chat API to retrieve details about the member/participant and know if he is an agent or not, or the GET /api/v2/webchat/guest/conversations/{conversationId}/members request to retrieve details about all participants.

The Wrap-Up code selected by the agent is not propagated over Guest Chat API/WebSocket.

"2. Passing of parameters for prelogin & post login status and displaying to agent"

I am not totally sure I understand what you mean.
But passing parameters (participant data - key/value pairs) is only possible when creating a new chat with POST /api/v2/webchat/guest/conversations.
You just need to define/add them under the customFields structure.

These data are then propagated to the conversation context as participant data ("context." prefix added to the custom field attribute name).
See this blog article on how to leverage this data in an Architect flow, a Script, in Interaction Details tab.

Update of parameters (update of participant data) after the creation of the chat is not supported over the Guest Chat API.

Regards,

Thank you for the reply Jerome.

Regards
Akhil

We are facing a problem, that agent is able to get the messages from customer but customer is not receiving the messages from agent.
api using : https://api.mypurecloud.jp/api/v2/webchat/guest/conversations

we are looking for solution.

Thanks in Advance.

Hello,

Messages from Genesys Cloud (Workflow, agent) to the Customer are carried over the Guest Chat WebSocket.
On each message from an agent, you will get a "message" event (metadata.type = "message") on the WebSocket.
So if you are properly maintaining the websocket connected, you should catch them on the WebSocket.
See here for info on the message event.

Regards,

Need Wrap up Event

Help me with an event that triggers when the disposition wrap up has given by the agent.
api using : https://api.mypurecloud.jp/api/v2/webchat/guest/conversations

we are looking for solution.

Thanks in Advance.

There isn't an event for that. The full list of events you will receive is documented here: https://developer.genesys.cloud/api/digital/webchat/guestchat#events. You can request new features and share your use case at https://genesyscloud.ideas.aha.io/.

Hello Tim,

Then how to identify that the chat has been ended by agent?
Help me on this please.

Thanks in Advance

The bodyType: 'member-leave' event is documented in the list of events at the link above.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.