Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  How to get flowInstanceId from conversationId using API

    Posted 04-28-2025 08:49

    In Genesys Cloud, is there an API or method to obtain all the flowInstanceIds that were traversed during a call using a conversationId?

    I would like to create a mechanism to save all the flow execution data associated with a given conversationId.

    I came across the following API, which seemed relevant:
    /api/v2/analytics/conversations/{conversationId}/details

    However, while I found the flowId in the response, there was no mention of the flowInstanceId.

    Could you provide guidance on how to achieve this?


    #Architect
    #PlatformAPI

    ------------------------------
    Naoki Ono
    ------------------------------


  • 2.  RE: How to get flowInstanceId from conversationId using API

    Posted 04-29-2025 14:50

    Hi Naoki,

    Here's how you can obtain flowInstanceIds and execution data for a given conversationId:

    1. Use POST /api/v2/flows/instances/query to query flow instances by conversationId.

    2. From the response, extract the flowInstanceIds.

    3. For each flowInstanceId, use GET /api/v2/flows/instances/{instanceId} to initiate a job that generates a downloadable URI for the execution data.

    4. Monitor the job status and retrieve the execution data once the job is complete.

    You can test these APIs in the Genesys Cloud API Explorer (https://developer.genesys.cloud/devapps/api-explorer) before implementing them in your code.

    There are other Architect-related endpoints that might be useful for your project. I recommend exploring the API Explorer to find additional relevant endpoints for your specific requirements.



    ------------------------------
    Ewomazino Onokpise
    Software Engineer
    ------------------------------



  • 3.  RE: How to get flowInstanceId from conversationId using API

    Posted 05-02-2025 06:30

    Hi,Ewomazino

    Thank you so much!
    The issue has been successfully resolved thanks to you!



    ------------------------------
    Naoki Ono
    ------------------------------