Topic spotting API for digital media

I am using this API for voice to get topic classification information and it requires the communicationId, which I don't see for digital media (chat, email, message). Can someone pls confirm hot to get topic information for media since it is now available via API?
Get /api/v2/speechandtextanalytics/conversations/{conversationId}/communications/{communicationId}/transcripturl

Thanks
Regards
Hichem

Hi Hichem,

The communicationId refers to the ID which should be attached to the conversation object. It is listed as id under most conversation types.

Thanks Ronan,

I can't really find the CommunicationId for chat conversations (only have it for voice).
Here's an example.
I get the details of the chat conversation with this API
1- GET/api/v2/conversations/chats/164aa9ba-47a4-4a41-8d45-ed0f809b616c
and I need to use conversationId and CommunicationId for a chat conversation to get the transcript containing topic spotting for the chat conversation
2- I tried this API as well but it didn't return any CommunicationId GET/api/v2/analytics/conversations/164aa9ba-47a4-4a41-8d45-ed0f809b616c/details

This is the API that is used to get topics for voice and was told it is the same to get topics for digital media: GET /api/v2/speechandtextanalytics/conversations/{conversationId}/communications/{communicationId}/transcripturl

This is what I get from the first API and I tried all Ids but can't get the topic for the chat, which was indicated as possible now. What would be the communicationId in this case and how to get the topics for a chat conversation?

{
"id": "164aa9ba-47a4-4a41-8d45-ed0f809b616c",
"participants": [
	{
		"id": "405fa81e-2331-4d82-bdb0-b80052e0eb8a",
		"name": "John Doe",
		"startTime": "2021-04-25T20:51:54.493Z",
		"connectedTime": "2021-04-25T20:51:54.501Z",
		"endTime": "2021-04-25T20:56:37.941Z",
		"purpose": "customer",
		"state": "disconnected",
		"disconnectType": "client",
		"held": false,
		"wrapupRequired": false,
		"queue": {
			"id": "784143ce-bee0-48f9-915b-e3332dfe0797",
			"selfUri": "/api/v2/routing/queues/784143ce-bee0-48f9-915b-e3332dfe0797"
		},
		"attributes": {
			"context._genesys_OS": "Windows",
			"context.email": "john.doe@customer.com",
			"context._genesys_browser": "Chrome",
			"context._genesys_referrer": "https://developer.mypurecloud.ie/developer-tools/",
			"context.addressStreet": "",
			"context.phoneNumber": "",
			"context._genesys_source": "web",
			"context.customField2Label": "Customer Type",
			"context.addressPostalCode": "",
			"context.addressCity": "",
			"context.firstName": "John",
			"context.customField3Label": "Products",
			"context.customField3": "multiple product user",
			"context.customField2": "Existing customer",
			"context.lastName": "Doe",
			"ivr.DistributionGroup": "784143ce-bee0-48f9-915b-e3332dfe0797",
			"context.subject": "Unable to pay invoice",
			"context._genesys_url": "https://developer.mypurecloud.ie/developer-tools/#/webchat",
			"context.addressState": "",
			"context._genesys_pageTitle": "Developer Tools",
			"context.customField1": "VIP",
			"context.customField1Label": "Customer Status"
		},
		"provider": "PureCloud Webchat v2"
	},
	{
		"id": "a4ca59ac-daf7-4322-90fd-a7ee6dca6e58",
		"name": "Customer Service",
		"startTime": "2021-04-25T20:51:54.495Z",
		"connectedTime": "2021-04-25T20:51:54.528Z",
		"endTime": "2021-04-25T20:52:04.757Z",
		"purpose": "acd",
		"state": "disconnected",
		"disconnectType": "transfer",
		"held": false,
		"wrapupRequired": false,
		"queue": {
			"id": "784143ce-bee0-48f9-915b-e3332dfe0797",
			"selfUri": "/api/v2/routing/queues/784143ce-bee0-48f9-915b-e3332dfe0797"
		},
		"attributes": {},
		"provider": "PureCloud Webchat v2",
		"conversationRoutingData": {
			"queue": {
				"id": "784143ce-bee0-48f9-915b-e3332dfe0797",
				"selfUri": "/api/v2/routing/queues/784143ce-bee0-48f9-915b-e3332dfe0797"
			},
			"priority": 2,
			"skills": [],
			"scoredAgents": []
		}
	},
	{
		"id": "94116c05-eef3-4add-a0d5-5cb7902f42e7",
		"startTime": "2021-04-25T20:51:54.579Z",
		"connectedTime": "2021-04-25T20:52:04.758Z",
		"endTime": "2021-04-25T20:56:37.942Z",
		"purpose": "agent",
		"state": "disconnected",
		"disconnectType": "peer",
		"held": false,
		"wrapupRequired": true,
		"wrapupPrompt": "timeout",
		"user": {
			"id": "d60ff553-263f-4179-87b9-49130fe4cce8",
			"selfUri": "/api/v2/users/d60ff553-263f-4179-87b9-49130fe4cce8"
		},
		"queue": {
			"id": "784143ce-bee0-48f9-915b-e3332dfe0797",
			"selfUri": "/api/v2/routing/queues/784143ce-bee0-48f9-915b-e3332dfe0797"
		},
		"attributes": {},
		"wrapupTimeoutMs": 120000,
		"alertingTimeoutMs": 30000,
		"provider": "PureCloud Webchat v2",
		"wrapup": {
			"code": "3c0842f2-2baf-4fb3-9b31-0c134c25d563",
			"notes": "",
			"tags": [],
			"durationSeconds": 8,
			"endTime": "2021-04-25T20:56:46.341Z"
		},
		"conversationRoutingData": {
			"priority": 0,
			"skills": [],
			"scoredAgents": []
		},
		"startAcwTime": "2021-04-25T20:56:37.942Z",
		"endAcwTime": "2021-04-25T20:56:46.341Z",
		"avatarImageUrl": "https://prod-euw1-inin-directory-service-profile.s3-eu-west-1.amazonaws.com/ec9f4108/cb6f/4c20/9404/670370dd9579.jpg"
	}
],
"otherMediaUris": [],
"selfUri": "/api/v2/conversations/chats/164aa9ba-47a4-4a41-8d45-ed0f809b616c"
   }

Have you successfully retrieved topics for digital conversations? what APIs do you use to get it? thanks a lot in advance

Hello Hichem,

You can use GET /api/v2/conversations/{conversationId} or GET /api/v2/analytics/conversations/{conversationId}/details to retrieve the communicationId for chat (or email, or message, or voice).

I think this is the same approach than the one I described here for voice.

I haven' practiced Topic spotting but I have just tried quickly with a chat session, and I was able to retrieve something via GET /api/v2/speechandtextanalytics/conversations/{conversationId}/communications/{communicationId}/transcripturl.

If you invoke GET /api/v2/conversations/{conversationId}:

  • for voice, this will correspond to the "id" of the call (call object in the "calls" array) in the customer's participant element.
  • for chat (what I just tried), this will be the "id" of the chat (chat object in the "chats" array) in the customer's participant element.
  • and I assume it is the same for email/message (didn't try).

If you invoke GET /api/v2/analytics/conversations/{conversationId}/details, this will correspond to the "sessionId" of the session (session object in "sessions" array, with "mediaType" = "voice" or "chat" or "message" or ....) in the customer's participant element.

Regards,

Merci Jerôme, works fine with the session Id indeed.
thanks a lot.
Cheers
Hichem

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