Determining Conversation Channel Type via API

We have configured our system so that a conversation will be 1:1 with a channel type. We are trying to determine how we should identify the channel of the conversation via APIs.

The following are two options we have identified. Are both options appropriate to make this determination? Is there a better approach not considered here?

  1. Use https://developer.genesys.cloud/routing/conversations/conversations-apis#get-api-v2-analytics-conversations--conversationId--details to look at a participants.sessions.mediatype value.
           "participants": [
              {
                  "participantId": "",
                  "sessions": [
                      {
                          ...
                          "mediaType": "email",
                          ...
                      }
                      ...
                  ]
              }
          ]
  1. Use https://developer.genesys.cloud/routing/conversations/conversations-apis#get-api-v2-conversations--conversationId- to look at the participants.[calls/chats/emails/messages] to see which of those arrays is not empty (e.g. if emails[] is not empty, conversation is an email).
          "participants": [
              {
                  "id": "",
                  ...
                  "calls": [],
                  "chats": [],
                  "emails": [],
                  "messages": []
              }
          ]

Hi @mh2523
I think the first approach is your best bet.
You can see the list of available media types here

Or get them using the API

Thanks for the reply Jacob, we'll plan to use that approach then.

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