Genesys Cloud - Main

 View Only

Sign Up

Expand all | Collapse all

Can a Data Action Execute a Salesforce Autolaunched Flow and Return Its Output?

  • 1.  Can a Data Action Execute a Salesforce Autolaunched Flow and Return Its Output?

    Posted 12 hours ago

    Hi everyone,

    I have a question regarding the Salesforce integration with Genesys Cloud.

    Is it possible to use a Data Action to execute a Salesforce Autolaunched Flow and retrieve the Flow's output values back into Architect?

    My use case is that I need to execute some business logic in Salesforce, and I'd like to centralize this logic in an Autolaunched Flow instead of implementing it directly in Apex or multiple Data Actions.

    Has anyone successfully implemented this approach?

    • Can a Data Action invoke an Autolaunched Flow directly?
    • If yes, how can the Flow outputs be returned to Architect?
    • If not, what would be the recommended approach to achieve this? (Apex REST endpoint, Invocable Apex, Platform Events, etc.)

    I'd appreciate any recommendations or examples from anyone who has implemented something similar.

    Thank you!


    #API/Integrations
    #Routing(ACD/IVR)

    ------------------------------
    Ragheb Gmira
    Consultant IT
    ------------------------------


  • 2.  RE: Can a Data Action Execute a Salesforce Autolaunched Flow and Return Its Output?

    Posted 8 hours ago

    Hi Ragheb,

    I haven't implemented this myself, but I came across the Salesforce documentation below, which appears to support exactly this use case.

    From my understanding, Salesforce allows an Autolaunched Flow to be invoked directly via the REST API using the invocable actions endpoint:

    POST /services/data/vXX.X/actions/custom/flow/{FLOW_API_NAME}

    If that's the case, it looks like a Genesys Cloud Custom Data Action could call this endpoint directly. The Flow can accept input variables (marked Available for Input) and return output variables (marked Available for Output), which could then be mapped back into Architect through the Data Action response configuration.

    This seems like a clean way to centralise business logic in a Salesforce Flow without needing an Apex REST wrapper, although I haven't personally tested this integration.

    Salesforce documentation:
    https://help.salesforce.com/s/articleView?language=en_US&id=platform.flow_distribute_system_rest.htm&type=5

    Hopefully this helps, and I'd be interested to hear from anyone who has implemented this approach in Genesys Cloud.



    ------------------------------
    Phaneendra
    Technical Solutions Consultant
    ------------------------------