Legacy Dev Forum Posts

 View Only

Sign Up

Extract the "divisions" section in Conversations API

  • 1.  Extract the "divisions" section in Conversations API

    Posted 06-05-2025 18:15

    Luigi | 2019-07-10 13:17:38 UTC | #1

    Hello.

    I am working with an organization that makes strong use of divisions to segregate different federations in the same environment. Given the ID of a specific conversation, I need to get the divisions of all the objects (e.g., agents, queues) involved in the calls. If I perform the following request:

    GET /api/v2/conversations/<ID>

    I get the JSON structure below as the response:

    { "id": ID, "startTime": ..., "endTime": ..., "address": ..., "participants": [...], "recordingState": ..., "divisions": [ { "division": {...}, "entities": [...] }, ... ], "selfUri": ... }

    The problem is that I am actually querying from a Java application, and even in the latest available SDK (i.e., version 62.0.0) the com.mypurecloud.sdk.v2.model.Conversation object does not have a getDivisions() method to extract the highlighted information. As a workaround, I am using the conversations API by calling the method getConversationWithHttpInfo(<ID>) and by parsing the divisions section by hand from the raw body of the response.

    Am I missing something or is there a lack in the Conversation object?

    Thank you in advance for the support.

    Luigi


    tim.smith | 2019-07-10 13:26:09 UTC | #2

    Looks like the division property was missed and wasn't made public with the release of the divisions feature. I've submitted a fix, but it won't be reflected in the SDKs until the next API deploy in 1-2 weeks. Thanks for reporting!


    Luigi | 2019-07-10 13:30:07 UTC | #3

    Thanks to you. Since my workaround is currently working I can wait for your fix.

    Greetings, Luigi


    system | 2019-08-10 13:30:12 UTC | #4

    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: 5533