Please
somebody could with this doubt
I neend obtain the memberId of one guest chat , I have only the conversationId but I do know how obtain this value
Hello,
Is this for WebChat v1 (Widget v1.0) or for WebChat v2 (Widget v1.1 and Wdiget v2.0)?
Regards,
Hi
Is for webchat v2
Hello,
As you know the conversationId, you can use one of the following 2 requests.
In Conversations API, you can use "Get conversation" - GET /api/v2/conversations/{conversationId}
You will retrieve the conversation context. The conversation context is available up to 90 days after the conversation ended (Conversations API)
In Analytics API, you can use "Get a conversation by id" - GET /api/v2/analytics/conversations/{conversationId}/details
You will retrieve the conversation details. The data is already available while the chat is active and remains available after as well (Analytics).
- With "Get conversation" - GET /api/v2/conversations/{conversationId}:
The memberId (for each participant) is what appears in the participant structure, in the chats array --> "id" attribute of the chat object.
As an example, for the memberId of the customer (if you need another participant, like agent, look in the agent's participant structure):
{
"id": "xxxxxxxxxxx",
"startTime": "2021-03-10T07:42:43.732Z",
"participants": [
{
"id": "yyyyyyyyyyy",
...
"purpose": "customer",
...
"chats": [
{
"state": "connected",
"id": "This is the memberId of my customer in the Chat session",
"segments": [
{
"startTime": "2021-03-10T07:42:43.732Z",
"type": "Interact",
"howEnded": "Disconnect"
}
],
"held": false,
"direction": "inbound",
"connectedTime": "2021-03-10T07:42:43.738Z",
"provider": "PureCloud Webchat v2",
"afterCallWorkRequired": false
}
],
...
},
...
],
...
}
- With "Get a conversation by id" - GET /api/v2/analytics/conversations/{conversationId}/details:
The memberId (for each participant) is what appears in the participant structure, in the sessions array --> "sessionId" attribute of the session object.
As an example, for the memberId of the customer (if you need another participant, like agent, look in the agent's participant structure):
{
"conversationId": "xxxxxxxxxxx",
"conversationStart": "2021-03-10T07:42:43.732Z",
"originatingDirection": "inbound",
...
"participants": [
{
"participantId": "yyyyyyyyyyy",
...
"purpose": "customer",
"sessions": [
{
"mediaType": "chat",
"sessionId": "This is the memberId of my customer in the Chat session",
"direction": "inbound",
"segments": [
{
"segmentStart": "2021-03-10T07:42:43.732Z",
"segmentType": "interact",
"conference": false
}
],
"metrics": [
{
"name": "nConnected",
"value": 1,
"emitDate": "2021-03-10T07:42:43.732Z"
}
],
"provider": "PureCloud Webchat v2"
}
]
},
...
]
}
Regards,
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.