documentation logo
All you’ll ever need to know about Declarative Webhooks and how to get started.

Pages

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&paramname2=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.

URL encoding input parameters

When sending input parameters from a Salesforce Flow, any parameter value that contains special characters must be URL-encoded. Characters such as ? (question mark), = (equals), % (percent) or & (ampersand) have special meaning in URLs, and leaving them unencoded can cause the request to be parsed incorrectly.

If you are manually encoding values, use the following replacements:

  • Replace & with %26
  • Replace ? with %3F
  • Replace = with %3D
  • Replace % with %25

If you are constructing the parameter string using a Flow formula, the safest and simplest approach is to use Salesforce’s built-in URLENCODE function. This ensures all special characters are handled correctly.

Example: “name=” & {!URLENCODE($Record.LastName)} & “&email=” & {!URLENCODE($Record.Email)}

Using URLENCODE helps prevent malformed requests and avoids subtle errors caused by unexpected characters in your data.