The Advanced version of the Send Webhook Action expands on the Basic version (described above) to provide support for entering URL and query parameters. To trigger the deployment of a webhook message to an external system:
-
In the "Edit Triggered Action" pop-up window, from the "Action Type" drop-down menu, select Send Webhook (Advanced).
-
From the "Method" drop-down menu, select an HTTP method. The platform supports GET, POST, PUT, andDELETE.
-
In the "URL" field, enter the URL for the Webhook endpoint.
-
The "URL Parameters" section is used to enter Path parameters that appear within the endpoint URL, but before any Query parameters (that is, before the question mark). To define Path parameters, click add within the "URL Parameters" section. The platform adds a new row for defining a key / value pair.
-
Check enabled (this check box is checked by default).
-
In the "Name" field, enter the name of the parameter.
-
In the "Value" field, enter a value, or optionally use a Groovy calculated function to select or derive a value. If using a calculated function, uncheck static.
-
Repeat the above steps as needed to define additional Path parameters.
-
The "Query Parameters" section is used to enter Query parameters that appear after a question mark (?) in the endpoint. Each parameter is listed one right after the other with an ampersand (&) separating them. To define Query parameters, click add within the "Query Parameters" section. The platform adds a new row for defining a key / value pair.
-
Check enabled (this check box is checked by default).
-
In the "Name" field, enter the name of the parameter.
-
In the "Value" field, enter a value, or optionally use a Groovy calculated function to select or derive a value. If using a calculated function, uncheck static.
-
Repeat the above steps as needed to define additional Query parameters.
Note: Query parameters must be included within the URL field above. The syntax is to use a percentage sign (%) followed by the "Name" in curly brackets. For example: https://api.eccmp.com/services2/api/SearchRecords?crm_id=%{id}
-
Header parameters are included in the request header. Usually, the header includes authorization parameters. To define Header parameters, click add within the "Request Header" section. The platform adds a new row for defining a key / value pair.
-
Check enabled (this check box is checked by default).
-
In the "Name" field, enter the name of the parameter.
-
In the "Value" field, enter a value, or optionally use a Groovy calculated function to select or derive a value. If using a calculated function, uncheck static.
-
Repeat the above steps as needed to define additional Header parameters.
Frequently, Webhook calls include a JSON object in the request body, consisting of one or more key /value pairs. When defining the Request Body parameters, the platform allows you to enter these key / value pairs directly into the user interface. Optionally, you can also enter the "raw" JSON object. If you don't submit the raw JSON object, the platform submits the request as form data.
Please note that in order to include double-quotes in a JSON value, you must escape the double-quote with a backslash. For example:
{"test": "<strong style=\"font-style: italic\">Hello World</strong>"}
-
To enter the Request Body parameters, within the "Form Data / Request Body" section, click add. The platform adds a new row for defining a key / value pair.
-
Check enabled (this check box is checked by default).
-
In the "Name" field, enter the name of the parameter.
-
In the "Value" field, enter a value, or optionally use a Groovy calculated function to select or derive a value. If using a calculated function, uncheck static.
-
Repeat the above steps as needed to define additional Request Body parameters.
-
Optionally, enter the raw JSON object within the Request Body field.
-
Click save.