We are noticing duplicate member-change events in the Websocket subscription set up with the Guest Chat API, when agents are switches between chat conversations.
E.g. one agents handles two chats. Every time the agent switches to/from the "other" chat, events like the two below is sent for each chat. Is there a point to these events?
They always say state: CONNECTED, so it's not like the chat that the agent put on hold gets state: HOLD or something. That the agent is CONNECTED is already implied because it happened as the agent joined the conversation.
So, these events only seems to spam the events. Is this is bug, a side effect, or per design and if so, what is the use case?
The only things that differs in the events are the metadata.correlationId
- what is that?
To recreate, I start a chat using the Guest Chat API and look at the websocket events sent out as agent switches between two chats.
Example events:
Agent putting chat on hold sends this event (state CONNECTED)
{
"topicName": "v2.conversations.chats.6a8e057a-d340-4d9f-aabb-66ed9ffc2d8b.members",
"version": "2",
"eventBody": {
"conversation": {
"id": "6a8e057a-d340-4d9f-aabb-66ed9ffc2d8b"
},
"member": {
"id": "1c5f7bbc-7d06-4b14-b0fc-3dca8b7010f9",
"state": "CONNECTED"
},
"timestamp": "2020-04-20T09:36:45.355Z"
},
"metadata": {
"CorrelationId": "3079a590-8f0a-47dd-ac4b-13e5fc7ade39",
"type": "member-change"
}
}
Agent focusing a chat sends this event (same state)
{
"topicName": "v2.conversations.chats.6a8e057a-d340-4d9f-aabb-66ed9ffc2d8b.members",
"version": "2",
"eventBody": {
"conversation": {
"id": "6a8e057a-d340-4d9f-aabb-66ed9ffc2d8b"
},
"member": {
"id": "1c5f7bbc-7d06-4b14-b0fc-3dca8b7010f9",
"state": "CONNECTED"
},
"timestamp": "2020-04-20T09:36:45.355Z"
},
"metadata": {
"CorrelationId": "9eafd16c-ae17-4dbf-b021-73bd84f5ea4c",
"type": "member-change"
}
}