Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Find Flow Execution id of workflow.

    Posted 13 hours ago
    Edited by Riddhi Singh 13 hours ago

    Hi Team,'

    I am executing Workflow using Schedule Trigger daily. I want to store ExecutionID for tracking purpose. Any API available to get flow Execution ID within the workflow? 

    Regards,

    Riddhi


    #Architect

    ------------------------------
    Riddhi Singh
    .
    ------------------------------



  • 2.  RE: Find Flow Execution id of workflow.

    Posted 11 hours ago

    /api/v2/flows/instances/query will give you a list of execution IDs, you simply need to pass the flow ID in the body:

    {"query":[{"and":[{"key":"FlowId","operator":"eq","value":"FLOW_ID"}]}]}



    ------------------------------
    Savino Ricci
    Senior Technical Consultant
    ------------------------------



  • 3.  RE: Find Flow Execution id of workflow.

    Posted 8 hours ago

    Thanks Savino for your help.

    This API works, but What i see here it's not giving result in order. I want the latest execution id to be on the top so that I can extract it, but everytime it shows different order. 



    ------------------------------
    Riddhi Singh
    .
    ------------------------------



  • 4.  RE: Find Flow Execution id of workflow.

    Posted 6 hours ago

    Hi Riddhi, I took a look at the existing APIs and this doesn't seem to be currently possible.

    I also saw several threads from the past 2 years complaining about similar issues/needs. None of those threads offered a solution, so this doesn't seem possible currently.

    While checking the API mentioned by Savino I noticed that there is a different field in there that could be used to query this, which is "FlowStartDateTime", if you are able to run this API filtering with this field you could query for whatever was executed after XXXXX date (assuming you have the time in which the workflow has been last executed)... But unfortunately this field doesn't seem to work, at least for me.

    When I try to query using this field, I get a 400 response (Unauthorized) with the description: Attempting to query with unallowed capabilities

    So this field might not be allowed for public use or something like that, not sure.



    ------------------------------
    Marcello Jabur
    ------------------------------



  • 5.  RE: Find Flow Execution id of workflow.

    Posted 6 hours ago

    Hi Marcello,

    Yes, FlowStartDateTime doesn't seem to work for me as well, although it's mentioned that this can be used for filtering.



    ------------------------------
    Riddhi Singh
    .
    ------------------------------



  • 6.  RE: Find Flow Execution id of workflow.

    Posted 5 hours ago

    Hi Riddhi, to give you some more information, I found this Idea in the Ideas Portal:

    Workflow "Interactions" style Performance | Genesys Cloud Ideas Portal

    You can check in there multiple people complaining of basically the same issue, no way to monitor those workflow executions. In this Idea Genesys has said they have no current intention of implementing this... unfortunately.

    --------------

    Something similar can be found here:

    Make Workflow Execution Id available as a | Genesys Cloud Ideas Portal

    Genesys has also commented that they won't implement this.

    --------------



    ------------------------------
    Marcello Jabur
    ------------------------------