Combining the callable flow capability with the flow template capability is practical when you already have the use case of a callable flow (with or without a custom input schema) and want it to be customizable per workspace deployment.
Note: As with non-callable flow templates, once a flow template is synced and deployed to a customer workspace, it will not receive updates from the integration template. If you need to make a change in the workspace, you must copy the flow steps to manually update the workspace flow.
You must have a functional integration feature with a flow to complete these steps. You must also have already made a flow callable in your dev environment. For instructions and requirements, see Make a Flow Callable.
In your integration feature, scroll to the Flow Templates section and select Add Flow Template.
The Add/Create Flow Template window opens.
Use the Workspace dropdown to select your dev workspace.
Select the check box next to the callable flow you created and select Save.
Your callable flow is displayed in the Flow Templates section.
In your integration feature, select your main flow.
The flow opens.
Add a new Call a Flow step where appropriate, select the flow template you previously added.
Here is an example schema to start with.
When passing data back to a parent flow from a callable flow, you must use the Stop Flow step. Use the Result Details section of this step to define what is sent back to the parent flow. This section can function like a Map step if you add a property and the Select Array Map. You can also create a single property and then write code in the value to determine what you want to pass back.
It is best practice to create a property called result, then build it to the desired shape. The above example sends an object back to the parent flow. You can then reference these values in subsequent steps using flow.step('call-a-flow-step-id').output.result.success.
Was this helpful? Give us feedback.