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
------------------------------