Original Message:
Sent: 10-20-2023 09:50
From: Eduardo Muro
Subject: Web Messaging - Get Conversation Id using Message Id
Thanks Jan!!!
------------------------------
Eduardo Muro
Evolutio Cloud Enabler, S.A.
Original Message:
Sent: 10-20-2023 09:42
From: Jan Heinonen
Subject: Web Messaging - Get Conversation Id using Message Id
You'd might wanna post this in the developer forum https://developer.genesys.cloud/forum/
Although I'm very curious I that have the ability to test this at the moment :)
------------------------------
Jan Heinonen
Contact Center Specialist
GlobalConnect AB
Original Message:
Sent: 10-20-2023 06:59
From: Eduardo Muro
Subject: Web Messaging - Get Conversation Id using Message Id
Hi,
In fact, that "id" is another "message id".
This is a real message what i receive from Genesys Cloud with WebMessaging Guest API:
{
"type":"message"
"class":"StructuredMessage"
"code":200
"body":
{
"text":"Byeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee!"
"direction":"Inbound"
"id":"313c085e01f37d9759833bf35bd707ed"
"channel":
{
"time":"2023-10-20T08:10:11.450Z"
"messageId":"5f8e8e4e-932b-4a82-9946-8bd8751dd8db"
"metadata":
{
"customAttributes":
{
"name":"John"
"department":"sales"
"property_type":"apartment"
"device":"mobile"
"customerAccountId":"6b98eae4-7189-46ba-8cd9-3e360951408d"
"customerName":"John Doe"
"displayName":"Dow"
"firstName":"Don"
"lastName":"John"
"email":"test@company.com"
"phoneNumber":"0034666666666"
}
}
}
"type":"Text"
"metadata":{"correlationId":"a24ed148-0342-4704-b95f-45a4fec656d8"}
}
}
But if I subscribe to the Queue start Customer Events I receive an event where you can see that that "id" is inside the "messages/message" section:
{
"participants": [
{
"messages": [
{
"message": {
"id": "313c085e01f37d9759833bf35bd707ed"
},
"messageTime": "2023-10-20T08:10:12.069Z",
"messageSegmentCount": 1,
"messageStatus": "received",
"messageMetadata": {
"type": "Text"
}
}
],
"type": "webmessaging",
"id": "e1d3a3d6-7600-4b03-b3c4-442eafc7a814",
"connectedTime": "2023-10-20T08:10:12.082Z",
"purpose": "customer",
"state": "connected",
"initialState": "connected",
"direction": "inbound",
"held": false,
"wrapupRequired": false,
"queue": {
"id": "903acbf6-012f-4652-a117-af56eaf2ceaa"
},
"attributes": {
"name":"John"
"department":"sales"
"property_type":"apartment"
"device":"mobile"
"customerAccountId":"6b98eae4-7189-46ba-8cd9-3e360951408d"
"customerName":"John Doe"
"displayName":"Dow"
"firstName":"Don"
"lastName":"John"
"email":"test@company.com"
"phoneNumber":"0034666666666"
},
"provider": "PureCloud Messaging",
"peer": "31ab34d2-6666-4e96-996d-e8f3f2265e10",
"mediaRoles": [
"full"
]
},
{
"messages": [
{
"message": {
"id": "d2bc11cc6972847a44189980a740c621"
},
"messageTime": "2023-10-20T08:10:12.694Z",
"messageSegmentCount": 1,
"messageStatus": "sent",
"messageMetadata": {
"type": "Text"
}
}
],
"type": "webmessaging",
"id": "aeda09d7-dde3-4943-8328-84e0807be250",
"connectedTime": "2023-10-20T08:10:12.114Z",
"endTime": "2023-10-20T08:10:12.876Z",
"purpose": "workflow",
"state": "disconnected",
"initialState": "connected",
"direction": "inbound",
"disconnectType": "transfer",
"held": false,
"wrapupRequired": false,
"attributes": {},
"provider": "PureCloud Messaging",
"peer": "f9cd8987-74b9-4011-a6ec-4cac83d5b50c"
},
{
"type": "webmessaging",
"id": "a5661f62-0ae7-474e-b211-c41632b52721",
"connectedTime": "2023-10-20T08:10:12.969Z",
"purpose": "acd",
"state": "connected",
"initialState": "connected",
"direction": "inbound",
"held": false,
"wrapupRequired": false,
"queue": {
"id": "903acbf6-012f-4652-a117-af56eaf2ceaa"
},
"attributes": {},
"provider": "PureCloud Messaging",
"conversationRoutingData": {
"queue": {
"id": "903acbf6-012f-4652-a117-af56eaf2ceaa"
},
"language": {},
"priority": 0
},
"peer": "f9cd8987-74b9-4011-a6ec-4cac83d5b50c"
}
],
"id": "67ae9a26-a87b-4688-a5bd-74b56d1b8e79"
}
Regards
------------------------------
Eduardo Muro
Evolutio Cloud Enabler, S.A.
Original Message:
Sent: 10-20-2023 06:35
From: Jan Heinonen
Subject: Web Messaging - Get Conversation Id using Message Id
Hello Eduardo,
I've only used the Javascript APIs but I would assume that ID in the response is the conversationId, or this is not the case?
{ "type": "response", "class": "StructuredMessage", "code": 200, "body": { "text": "This is the message from the client", "direction": "Inbound", "id": "00000000-0000-0000-0000-000000000000", "channel": { "time": "2020-09-30T22:53:34.962Z", "messageId": "00000000-0000-0000-0000-000000000000" }, "type": "Text", "content": [], "metadata": { "correlationId": "00000000-0000-0000-0000-000000000000" } }}
------------------------------
Jan Heinonen
Contact Center Specialist
GlobalConnect AB
Original Message:
Sent: 10-20-2023 05:46
From: Eduardo Muro
Subject: Web Messaging - Get Conversation Id using Message Id
Hi,
I have migrated from WebChat Guest API ("https://developer.genesys.cloud/commdigital/digital/webchat/guestchat") to WebMessaging Guest API ("https://developer.genesys.cloud/commdigital/digital/webmessaging/websocketapi"). With WebChat Guest API I had/received information about "conversation Id" from Genesys Cloud. But when I have migrated to WebMessaging Guest API I have discovered that Genesys Cloud doesn't send this information in the websocket events, I only receive the "message id".
My question is if is it possible to get the "conversation id" using the "message id" consulting any Genesys Cloud API (messaging, conversation, analytics,....)?
Thanks
#DigitalChannels
#Integrations
------------------------------
Eduardo Muro
Evolutio Cloud Enabler, S.A.
------------------------------