Using Input Parameters
Input parameters are variables that you can define in a callout template, which you can use to send values from a flow and map them into URL, headers or request body of a call.
Defining input parameters
To define input parameters, go to a callout template and check the Input Parameters tab, next to the Response Actions tab.
You can add as many parameters as you need and define default values for them (if needed).
Make sure to save the changes, then we can map them to the call.
Mapping input parameters
To map the input parameters into the URL, use the {!$Parameter.parameter_name} format to merge the value of the parameter into the URL. See example below.
To merge the parameter into the header, use the same merge format as in the URL. See the example below.
To map the Input Parameter into the request body, when defining the request node, make sure to select the “Input Parameter” option in the “Value Source” input.
Then select the desired Input Parameter to use and save the node.
Sending input parameters values from flow
Now that we defined how the input parameters are used in the template, let’s see how we can send them from a flow. The parameters are sent in a paramname1=paramvalue1¶mname2=paramvalue2 format, so the best way to create that format in a flow is through a formula. So, when defining your flow, create a formula, similar to the one below.
Then, in the Declarative Webhooks’ “Invoke Callout” action, you can provide the formula with the input parameters and the template will use them to make the call.