Creation of webchat

Hi friends.
I have a question about the init a flow to create a webchat conversation and get the communicationId to send messages.

I executed POST https://api.mypurecloud.com/api/v2/conversations/chats

body:
{
"queueId": "cad354a6-e712-46a7-a81e-c4b15a304a70",
"provider": "TESTING",
"attributes": {},
"customerName": "TEST"
}

After, i want to see the details of conversation
GET
https://api.mypurecloud.com/api/v2/analytics/conversations/c6d0b6e0-5dc5-42d6-9bad-9ca89c21b2zb/details

Response:
{
"conversationId": "c6d0b6e0-5dc5-42d6-9bad-9ca89c21b2db",
"conversationStart": "2022-02-18T19:05:50.383Z",
"divisionIds": [
"3e7d3a76-edcf-420b-918e-d5ac0707046f"
],
"originatingDirection": "inbound",
"participants": [
{
"participantId": "18fc13a0-c8a8-4f73-838a-53fdabf34f85",
"participantName": "TEST",
"purpose": "external",
"sessions": [
{
"direction": "inbound",
"mediaType": "chat",
"provider": "TESTING",
"roomId": "NONE",
"sessionId": "ac7564a3-9e4a-4f2e-b5f9-74e0fcf0b7d5",
"metrics": [
{
"emitDate": "2022-02-18T19:05:50.383Z",
"name": "nConnected",
"value": 1
}
],
"segments": [
{
"conference": false,
"segmentStart": "2022-02-18T19:05:50.383Z",
"segmentType": "interact"
}
]
}
]
},
{
"participantId": "f911ba2e-8414-4166-b5e3-64f2c2a64245",
"participantName": "Prueba_Wsp",
"purpose": "acd",
"sessions": [
{
"agentBullseyeRing": 1,
"direction": "inbound",
"mediaType": "chat",
"peerId": "ac7564a3-9e4a-4f2e-b5f9-74e0fcf0b7d5",
"provider": "TESTING",
"remote": "TEST",
"requestedRoutings": [
"Standard"
],
"roomId": "NONE",
"routingRing": 1,
"selectedAgentId": "1ce7a1f6-e0a6-46f5-ab5a-337db79aaffe",
"sessionId": "70afc839-9761-4b3e-967b-96310d8e30a3",
"usedRouting": "Standard",
"metrics": [
{
"emitDate": "2022-02-18T19:05:50.385Z",
"name": "nOffered",
"value": 1
},
{
"emitDate": "2022-02-18T19:05:59.543Z",
"name": "tAcd",
"value": 9158
}
],
"segments": [
{
"conference": false,
"disconnectType": "transfer",
"queueId": "cad354a6-e712-46a7-a83e-c4b15a304a70",
"segmentEnd": "2022-02-18T19:05:59.543Z",
"segmentStart": "2022-02-18T19:05:50.385Z",
"segmentType": "interact"
}
]
}
]
},
{
"participantId": "81ffae90-9ad1-4b1c-9d97-3ab29a93c8a5",
"purpose": "agent",
"userId": "1ce7a1f6-e0a6-46f5-ab5a-337db79aaffe",
"sessions": [
{
"agentBullseyeRing": 1,
"direction": "inbound",
"mediaType": "chat",
"peerId": "ac7564a3-9e4a-4f2e-b5f9-74e0fcf0b7d5",
"provider": "TESTING",
"remote": "TEST",
"requestedRoutings": [
"Standard"
],
"roomId": "NONE",
"routingRing": 1,
"selectedAgentId": "1ce7a1f6-e0a6-46f5-ab5a-337db79aaffe",
"sessionId": "a07449cc-4dcc-4c44-b421-fc5ec490bb47",
"usedRouting": "Standard",
"metrics": [
{
"emitDate": "2022-02-18T19:05:59.539Z",
"name": "tAlert",
"value": 9058
},
{
"emitDate": "2022-02-18T19:05:59.539Z",
"name": "tAnswered",
"value": 9158
}
],
"segments": [
{
"conference": false,
"queueId": "cad354a6-e712-46a7-a83e-c4b15a304a70",
"segmentEnd": "2022-02-18T19:05:59.539Z",
"segmentStart": "2022-02-18T19:05:50.481Z",
"segmentType": "alert"
},
{
"conference": false,
"queueId": "cad354a6-e712-46a7-a83e-c4b15a304a70",
"segmentStart": "2022-02-18T19:05:59.539Z",
"segmentType": "interact"
}
]
}
]
}
]
}

The participant i sent as a customer "TEST", their purpouse is 'external'
[
"participantId": "18fc13a0-c8a8-4f73-838a-53fdabf34f85",
"participantName": "TEST",
"purpose": "external", ...
]
¿What should you do to make your purpose 'customer' ?
Execute another endpoints to create contact ? or what is missing ?

Thanks!!

The main distinction that transforms an external participant to customer is when the participant routes through ACD. This would be why your initial outbound chat is starting as external. The conversation sample you have hasn't ended yet so the initial external participant details will show as external in their current state, but once that end event comes through for that participant analytics will see that it has been through ACD and will swap the participant to customer. If it never went through ACD, it would remain external. This could be useful to identify the initial "customer" vs additional "external" participants added via conferencing that didn't go through ACD.

Depending on your needs, that distinction may be useful or they can be used interchangeably.

Hi ralegner.

Thanks for your response! ^^

Please help me

What would be the next endpoint(s) I should run to continue the webchat flow?

PS: My intention is to have a webchat flow (only routing), not call, not conference, not emails, I just need webchat (send text, receive text or json etc).

Hello,

What you are creating with /api/v2/conversations/chats is not a webchat.
It is a 3rd party webchat conversation.
3rd party webchat could be compared to a task/workitem of type chat that you want to distribute to a Contact Center Agent (via an ACD Queue). It does NOT include exchange of messages.

If you want to create a chat conversation between a guest and Genesys Cloud:
For a WebChat conversation (synchronous chat), use the Guest Chat API and websocket.
For web messaging (new protocol for chat - asynchronous chat), you would use Web messaging Guest API and websocket.
If it is for a server-to-server integration, you could also use Open messaging. It is also for asynchronous chat like web messaging, but is leveraging webhooks.

Regards,

Thanks Jerome !! :wink:

I think I need to use Open Messaging for their leveraging webhooks.
Do you know if Open Messaging interact to queues? Do you know the flow of endpoints for use this method ?

I know the flow for the most part, it's just that it's still not clear to me with which endpoint I assign the conversation to a queue, with which endpoint the agent present in the queue accepts the conversation and with which endpoint the agent replies a message.

Do you know that endpoints?

Thanks!!!

Hello,

With Genesys Cloud, ACD conversations (call, callback, email, chat, message, ....) can always be distributed to a Contact Center Agent via an ACD Queue. Open Messsaging creates conversations of media type = message and follows that principle like other media types.

Open Messaging, per configuration, is associated with an Architect Inbound Message flow (Admin UI - Routing - Message Routing).
This will be the first entity triggered in a new Open Messaging conversation.
The Architect Inbound Message flow will then determine what to do with this conversation - send pre-defined messages, connect to a chat/message bot, ..., or distribute the conversation to a Contact Center Agent via an ACD Queue.

You should take a look at this: About open messaging - Genesys Cloud Resource Center
And check in your Genesys Cloud environment how the configuration looks like.

Regards,

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