Genesys Cloud - Main

 View Only

Sign Up

Expand all | Collapse all

How to make conversations API return consistent and repeatable results?

  Thread closed by the administrator, not accepting new replies.
  • 1.  How to make conversations API return consistent and repeatable results?

    Posted 05-29-2025 14:27
    No replies, thread closed.

    I have a data pipeline that is gathering data from the Conversation Details API in regular 30-minute intervals. We have many conversations coming in for our organization, so I need to loop through multiple pages of size 100 to gather all conversations that occur in a 30-minute interval. I'm able to make API calls in batches of 4, so if I need to gather 12 pages of conversations, my data pipeline will make calls for page 1-4 simultaneously, then page 5-8 once the previous pages have finished loading, and then pages 9-12. I'm currently applying the conversation start ascending parameter when calling the API, in hopes that this would keep each conversation in-place while I'm moving through each batch of pages, but this is not achieving the desired outcome.

    I'm often running into issues where a conversation has updated information in the middle of a batch run, and this is pushing around the conversations that are shown on each page. For example, I can specify an interval of 12:00-12:30 and loop through 8 pages. Pages 1-4 are called in parallel and inserted into my SQL database table, with conversation ID as a primary key. However, an earlier conversation from 8:00 gains some updated information during this run, and when calling pages 5-8, this early conversation now is placed on page 1, and pushes all other conversations down by 1. This results in a conversation that was initially inserted into my database from page 4 on row 100 to page 5 row 1, and now it shows up as a duplicate. The updated information from the 8:00 conversation is not going to get updated in my database because I already called page 1 from this interval. I'm concerned there is additional data loss due to this problem that I'm not even accounting for.

    How do I get the conversations API to return consistent results? I.e., I get the same exact same conversations in the exact same order for a specified interval, page size, and page number every single time, regardless of when I make the API call and however much information is updated in the conversations during the interval. Any suggestions are appreciated.

    Thanks,

    Bill


    #AnalyticsAPI

    ------------------------------
    William Radovich
    ------------------------------


  • 2.  RE: How to make conversations API return consistent and repeatable results?

    Posted 05-29-2025 21:38
    No replies, thread closed.

    I know it doesnt answer your question, but I think you would be better off using Genesys events for the real time update and then using the batchAPI to check/fill in the gaps



    ------------------------------
    Benjamin Giosis-Stone
    ------------------------------



  • 3.  RE: How to make conversations API return consistent and repeatable results?

    Posted 05-30-2025 15:51
    No replies, thread closed.

    Do you have any resources for Genesys events and Batch API?

    I was wondering if sorting by conversationEnd could be a workaround, but I don't know if this will still be susceptible to jumbling up of conversations and I don't know if it will exclude all interactions that haven't ended yet



    ------------------------------
    William Radovich
    ------------------------------



  • 4.  RE: How to make conversations API return consistent and repeatable results?

    Posted 05-31-2025 10:08
    No replies, thread closed.

    Hello all

    I have a similar problem, but no one has yet been able to tell me a schedule to ensure data consistency.

    Thanks

    Regards



    ------------------------------
    Soraya Granda Segovia
    m
    ------------------------------



  • 5.  RE: How to make conversations API return consistent and repeatable results?

    Posted 06-02-2025 14:45
    No replies, thread closed.

    Which specific API are you using to gather the data?



    ------------------------------
    George Ganahl GCCX-AI, GCP, GCSME, ICCE, ICHD, etc.
    Technical Adoption Champion
    Genesys
    ------------------------------



  • 6.  RE: How to make conversations API return consistent and repeatable results?

    Posted 06-02-2025 16:43
    No replies, thread closed.

    https://developer.genesys.cloud/devapps/api-explorer#post-api-v2-analytics-conversations-details-query

    Here's an example of the parameters I'd be sending:

    {
      "paging": {
        "pageSize": 100,
        "pageNumber": 1
      },
      "interval": "2024-07-31T00:00:00/2024-08-06T00:00:00",
      "order": "asc",
      "orderBy": "conversationStart"
    }



    ------------------------------
    William Radovich
    ------------------------------



  • 7.  RE: How to make conversations API return consistent and repeatable results?

    Posted 06-02-2025 18:02
    No replies, thread closed.

    You may want to add
    {
      "conversationFilters": [
        {
          "type": "and",
          "predicates": [
            {
              "type": "dimension",
              "dimension": "conversationEnd",
              "operator": "exists"
            }
          ]
        }
      ]
    }

    to that query so you only capture conversations that have ended.

    Even with that, though, you'll have some conversations that cross intervals and you probably won't capture that data properly. 



    ------------------------------
    George Ganahl GCCX-AI, GCP, GCSME, ICCE, ICHD, etc.
    Technical Adoption Champion
    Genesys
    ------------------------------



  • 8.  RE: How to make conversations API return consistent and repeatable results?

    Posted 06-04-2025 09:31
    Edited by System 10-28-2025 09:52
    No replies, thread closed.

    My concern with that approach is that my data won't have any conversations that are still ongoing, which could prove troublesome since my client wants as close to real-time reporting as possible with the Conversation Details data I'm using. It'd be preferable to eliminate my pipeline errors and just have some of these conversations be delayed, but if I'm still going to see errors it seems like I'm still at a dead end. I'll have to just try it out and see if the pipeline errors go away



    ------------------------------
    William Radovich
    ------------------------------



  • 9.  RE: How to make conversations API return consistent and repeatable results?

    Posted 06-04-2025 10:30
    No replies, thread closed.

    If you want real time data you need to use EventBridge and capture it from the notifications...that's what A3S Real Time does. And eMite. And other customers I've worked with.



    ------------------------------
    Gcp Ganahl GCCX-AI, GCP, GCSME, ICCE, ICHD, etc.
    Technical Adoption Champion
    Genesys
    ------------------------------



  • 10.  RE: How to make conversations API return consistent and repeatable results?

    Posted 06-06-2025 10:24
    No replies, thread closed.

    Unfortunately my organization is Azure-exclusive. Is there anything similar to EventBridge you know of that Genesys provides real-time data updates for in Azure?



    ------------------------------
    William Radovich
    ------------------------------



  • 11.  RE: How to make conversations API return consistent and repeatable results?
    Best Answer

    Posted 06-09-2025 07:14
    No replies, thread closed.

    You can use Websockets instead

    https://developer.genesys.cloud/notificationsalerts/notifications/



    ------------------------------
    George Ganahl GCCX-AI, GCP, GCSME, ICCE, ICHD, etc.
    Technical Adoption Champion
    Genesys
    2024 Community Member of the Year
    ------------------------------



  • 12.  RE: How to make conversations API return consistent and repeatable results?

    Posted 07-16-2025 09:48
    No replies, thread closed.

    Hello George,

    My call center receives about 10k calls/day. With most conversation analytics topics seeming like you need to specify conversation IDs, and the limit of subscribing to 20 channels per user, I don't understand how this would be able to resolve my issue. Is there a certain topic I should be looking for to compliment the conversation details API my data pipeline is based on and handle the call volume my organization deals with?



    ------------------------------
    William Radovich
    ------------------------------



  • 13.  RE: How to make conversations API return consistent and repeatable results?

    Posted 07-18-2025 16:41
    No replies, thread closed.

    You don't subscribe to individual conversationIds - that's just for API Explorer. But...I don't know for sure what it would look like in your situation. 

    You can experiment a bit using the Blueprint: https://developer.genesys.cloud/blueprints/genesys-cloud-dotnet-sdk-analytics-api/

    Rather than reinventing the wheel, you might look at something like PureInsights' real time dashboard if that's an option for you



    ------------------------------
    George Ganahl GCCX-AI, GCP, GCSME, ICCE, ICHD, etc.
    Technical Adoption Champion
    Genesys
    2024 Community Member of the Year
    ------------------------------