Genesys Cloud - Main

 View Only

Sign Up

  • 1.  API data pull -- what's the best function to call to replicate the Interactions report?

    Posted 7 days ago

            Hey!

            I currently pull data from Genesys via the Interactions report, having it sent via email attachment and consuming it on the far end.  But I'd like to convert that to an API call.  

            I've worked out all the automation to make an API call from my target destination, but I don't know which API Operation to use to get that basic call-history set of data to start off the process.  There isn't operations labeled "Interactions" or "calls".  I see "conversations" but that seems too broad.

            For someone that has done this before, how much assembly after the call am I going to have to do?  Pulling the complete report is awfully nice via the report scheduler.  How difficult is it for me to get a basic call list, Date, Direction, Duration, ANI, Conversation ID, Caller ID, IVR time, from API calls?

            I will very much appreciate anyone that can point me in the right direction.  Getting Azure to play nice doing this stuff was a bugger.  I'm hoping Genesys offers the basics relatively simply.

                                 J.


    #API/Integrations

    ------------------------------
    John Edwards
    ------------------------------


  • 2.  RE: API data pull -- what's the best function to call to replicate the Interactions report?
    Best Answer

    Posted 7 days ago

    Hello John,

    If you have not done so already, I would highly recommend taking a look at our API Explorer. There are a ton of API endpoints that you can use on there but you may want to check out these two

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

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

    I would start with the Analytics Query Builder in the API Explorer. This lets you build queries without code and generates the JSON structure for you to use. An example may start with the following, looking for the past day of conversations


    {
      "interval": "2026-08-17T00:00:00.000Z/2026-08-18T00:00:00.000Z",
      "order": "desc",
      "orderBy": "conversationStart",
      "paging": {
        "pageSize": 100,
        "pageNumber": 1
      }
    }

    Then, you could add a filter to check for voice calls

    "segmentFilters": [
      {
        "type": "and",
        "predicates": [
          { "dimension": "mediaType", "value": "voice" }
        ]
      }
    ]

    Once you have the response, you should be able to find most of the information under Conversation > Participants > Sessions > Segments. This should have your phone numbers (ANI/DNIS), durations, etc. that you can parse out of the JSON response.



    ------------------------------
    Jason Kleitz
    Online Community Manager/Moderator
    ------------------------------



  • 3.  RE: API data pull -- what's the best function to call to replicate the Interactions report?

    Posted 6 days ago

    Thank you for tuning me in!  I'll go after those and see if I can get them to give up what I'm looking for.

    This is via an https call, but I've been able to pass arguments easily enough for my concept-of-operations work.  Let's see if I can get Azure Synapse pipelines to provide the proper format for the more complicated stuff.

    The API Explorer is not exactly overwhelmed by practical examples of usage.  I've had to go through a fair amount of trial and error simply because there isn't concrete examples showing how to do what I'm looking to do.  The doc could use a little more plushing up.



    ------------------------------
    John Edwards
    ------------------------------



  • 4.  RE: API data pull -- what's the best function to call to replicate the Interactions report?

    Posted 5 days ago

    By the way, thank you for that one example of placing a filter on the data pull.  That has made a huge difference in the work.  The json generator on the API web pages is perplexing as hell, but I'm able to use your single filtering example to hand-code what I need for my R&D, and then maybe use it to decipher the weird user interface on the API pages.  But I think I may be able to simply hand-code what I need on my own and this point and can leave the API pages behind save for the url they call.



    ------------------------------
    John Edwards
    ------------------------------



  • 5.  RE: API data pull -- what's the best function to call to replicate the Interactions report?

    Posted 4 days ago

    So, there is a huge amount of extraneous material in the output from this routine.  Is this the closest Genesys gets to the standard reports it delivers from the reporting portal?  There's no API routines that do rollup or summary reporting?  This detailed granularity and the level of hierarchy will make it difficult to dependably pull the proper pieces from all the different permutations of phonecall that come into the system.  I'm not looking for anything particularly unexpected, more or less the contents from the Interactions report via the Genesys reporting tool.

    I can go after this with the suggested API calls above (and I've looked at the others as well) but I'm going to have to inform my customer that it will take me hundreds of hours to reproduce the basic metrics that we need (and can get) from the canned Genesys reports.  That's costly to them.  But I can't ship any sensitive data via the canned Genesys reports because their email delivery option is an insecure channel.

    If this is the best that's offered then I'll present it to them for feedback.  But if there's anything more straightforward then I'm open to recommendations.  Anybody have a different option that I should be considering?



    ------------------------------
    John Edwards
    ------------------------------