You are here:
Configure Custom Logic in an Asynchronous Flow
When you configure the Decompose Sales Transaction and Orchestrate Sales Transaction invocable actions in an asynchronous request, the decomposition process runs in the background. Pause the flow until decomposition is finished before executing the custom logic and the Orchestrate Sales Transaction invocable action.
- Create a Autolaunched Flow (No Trigger).
- Add the Decompose Sales Transaction invocable action to the flow.
-
Set intakeRequestType to
Asynchronous. -
Choose one of the following methods to process the Sales Transaction Decomposition
Event platform event:
- To pause until the event occurs, add a Wait for Conditions element within the decomposition flow path.
- To launch when the event is published, add a platform event-triggered flow.
For high-volume, concurrent scenarios, use an after-insert Apex trigger, and separate the custom logic and Orchestrate Sales Transaction invocable action into its own flow - Add your custom logic in the flow path that runs after a successful Sales Transaction Decomposition Event result.
- Add the Orchestrate Sales Transaction invocable action to the flow.
-
Set intakeRequestType to
Asynchronous. - Save and activate the flow.
