Legacy Dev Forum Posts

 View Only

Sign Up

Differences in conversations and conversations.chats notifications messages

  • 1.  Differences in conversations and conversations.chats notifications messages

    Posted 06-05-2025 18:17

    Taylor_Locke | 2020-06-12 18:34:54 UTC | #1

    I am trying to decide between subscribing to

    v2.routing.queues.{id}.conversations

    or

    v2.routing.queues.{id}.conversations.chats

    via the notifications API. The messages that I'm receiving when generating AppFoundary events are

    9:22:13.527
    
    v2.routing.queues.0c57879e-fc96-440c-9e0b-e1973f88c0ef.conversations
    
    {
     "id": "2382cf8f-2cba-44a4-97c0-119df2cf0ac4",
     "participants": [
      {
       "id": "354a7626-e8e8-499b-a790-8d6cbc3a485c",
       "connectedTime": "2020-06-12T13:22:13.335Z",
       "name": "ronald reagan",
       "queueId": "0c57879e-fc96-440c-9e0b-e1973f88c0ef",
       "purpose": "customer",
       "address": "5ee38185000014b95f962c5b@guest.orgspan.com",
       "wrapupRequired": false,
       "wrapupExpected": false,
       "attributes": {
        "context.isFirefox": "false",
        "context.email": "",
        "context.isChrome": "true",
        "context.addressStreet": "promised land",
        "context.phoneNumber": "probably a 666 in there",
        "context.hasChromeExtension": "true",
        "context.customField2Label": "",
        "context.addressPostalCode": "",
        "context.addressCity": "",
        "context.firstName": "ronald",
        "context.customField3Label": "",
        "context.browserSupported": "true",
        "context.customField3": "",
        "context.customField2": "",
        "context.lastName": "reagan",
        "ivr.DistributionGroup": "0c57879e-fc96-440c-9e0b-e1973f88c0ef",
        "context.addressState": "",
        "context.customField1": "",
        "context.purecloud": "true",
        "context.customField1Label": ""
       },
       "chats": [
        {
         "state": "connected",
         "id": "bbb59fe9-0f77-413d-a934-a7593e3c8aed",
         "provider": "PureCloud Webchat",
         "roomId": "acd-68adfe8a-d81b-449f-a2fc-dd44f6333b20@conference.34889.orgspan.com",
         "held": false,
         "connectedTime": "2020-06-12T13:22:13.439Z",
         "additionalProperties": {}
        }
       ],
       "additionalProperties": {}
      },
      {
       "id": "09d75490-3ca1-41c2-b248-36a584175c77",
       "connectedTime": "2020-06-12T13:22:13.435Z",
       "name": "AppFoundry",
       "queueId": "0c57879e-fc96-440c-9e0b-e1973f88c0ef",
       "purpose": "acd",
       "wrapupRequired": false,
       "wrapupExpected": false,
       "conversationRoutingData": {
        "queue": {
         "id": "0c57879e-fc96-440c-9e0b-e1973f88c0ef"
        },
        "language": {},
        "priority": 0
       },
       "attributes": {},
       "chats": [
        {
         "state": "connected",
         "id": "a918fb62-2c2b-45ec-a37e-620dd75e42c6",
         "provider": "PureCloud Webchat",
         "roomId": "acd-68adfe8a-d81b-449f-a2fc-dd44f6333b20@conference.34889.orgspan.com",
         "held": false,
         "connectedTime": "2020-06-12T13:22:13.480Z",
         "additionalProperties": {}
        }
       ],
       "additionalProperties": {}
      }
     ],
     "recordingState": "none"
    }

    and

    9:22:13.529
    
    v2.routing.queues.0c57879e-fc96-440c-9e0b-e1973f88c0ef.conversations.chats
    {
     "participants": [
      {
       "roomId": "acd-68adfe8a-d81b-449f-a2fc-dd44f6333b20@conference.34889.orgspan.com",
       "id": "354a7626-e8e8-499b-a790-8d6cbc3a485c",
       "name": "ronald reagan",
       "address": "5ee38185000014b95f962c5b@guest.orgspan.com",
       "connectedTime": "2020-06-12T13:22:13.439Z",
       "purpose": "customer",
       "state": "connected",
       "held": false,
       "wrapupRequired": false,
       "queue": {
        "id": "0c57879e-fc96-440c-9e0b-e1973f88c0ef"
       },
       "attributes": {
        "context.isFirefox": "false",
        "context.email": "",
        "context.isChrome": "true",
        "context.addressStreet": "promised land",
        "context.phoneNumber": "probably a 666 in there",
        "context.hasChromeExtension": "true",
        "context.customField2Label": "",
        "context.addressPostalCode": "",
        "context.addressCity": "",
        "context.firstName": "ronald",
        "context.customField3Label": "",
        "context.browserSupported": "true",
        "context.customField3": "",
        "context.customField2": "",
        "context.lastName": "reagan",
        "ivr.DistributionGroup": "0c57879e-fc96-440c-9e0b-e1973f88c0ef",
        "context.addressState": "",
        "context.customField1": "",
        "context.purecloud": "true",
        "context.customField1Label": ""
       },
       "provider": "PureCloud Webchat"
      },
      {
       "roomId": "acd-68adfe8a-d81b-449f-a2fc-dd44f6333b20@conference.34889.orgspan.com",
       "id": "09d75490-3ca1-41c2-b248-36a584175c77",
       "name": "AppFoundry",
       "connectedTime": "2020-06-12T13:22:13.480Z",
       "purpose": "acd",
       "state": "connected",
       "held": false,
       "wrapupRequired": false,
       "queue": {
        "id": "0c57879e-fc96-440c-9e0b-e1973f88c0ef"
       },
       "attributes": {},
       "provider": "PureCloud Webchat",
       "conversationRoutingData": {
        "queue": {
         "id": "0c57879e-fc96-440c-9e0b-e1973f88c0ef"
        },
        "language": {},
        "priority": 0
       }
      }
     ],
     "id": "2382cf8f-2cba-44a4-97c0-119df2cf0ac4"
    }

    In general, it appears that all of the fields in the conversations message appear, albeit arranged differently, in the conversations.chats message. The exception being

    1. A connectedTime field appears in the conversations message that is some milliseconds sooner than the connectedTime fields in the conversations.chats message or the chats array in the conversations message.
    2. wrapupExpected appears in the conversations message, but not in the conversations.chats message.
    3. The chats array elements in the conversations message has an id that does not appear in any form in the conversations.chats message.

    Does anyone know the significance of these differences? What does the id in the chats array element of the conversations message identify? Would it be referenced by other notifications in some capacity?

    Thanks Taylor


    tim.smith | 2020-06-15 19:16:43 UTC | #2

    The notification schemas should generally match the associated API resources. For example GET /api/v2/conversations/{conversationId} or GET /api/v2/conversations/chats/{conversationId}. The schemas for the APIs have additional documentation regarding the values.

    chats.id is the communication/session ID for the media.


    Taylor_Locke | 2020-06-15 20:13:13 UTC | #3

    Thanks, Tim.

    Just a couple of follow up questions.

    When you say "generally match", is there something to the differences in the two examples above?

    In looking at the documentation, I'm reading the id field of the chats array in the conversations message as the unique identifier for the chat. However, this value is different than the unique identifier provided in the conversations.chats message (which also appears in the conversations message). Are these superfluous identifiers?


    tim.smith | 2020-06-16 13:05:59 UTC | #4

    Taylor_Locke, post:3, topic:8010
    When you say "generally match", is there something to the differences in the two examples above?

    Notification schemas and the response for the associated API are supposed to match exactly, but there may be instances where that isn't the case. Go by the documented schema for the notification as that should always be correct.

    Taylor_Locke, post:3, topic:8010
    In looking at the documentation, I'm reading the id field of the chats array in the conversations message as the unique identifier for the chat.

    Yes, but "the chat" is a thing that exists within a conversation, which has its own ID. The ID of the chat is the communication ID for that particular media instance, not the overall conversation ID.

    Taylor_Locke, post:3, topic:8010
    However, this value is different than the unique identifier provided in the conversations.chats message (which also appears in the conversations message). Are these superfluous identifiers?

    You generally don't need to know the communication or session ID for a piece of media; they only serve a purpose internally within Genesys Cloud. The IDs you'll interact with are the conversation ID and participant ID.


    Taylor_Locke | 2020-06-16 13:15:18 UTC | #5

    Thank you very much, Tim.


    system | 2020-07-17 13:25:15 UTC | #6

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


    This post was migrated from the old Developer Forum.

    ref: 8010