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?
- 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",
...
}
...
]
}
]
- 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": []
}
]