This article describes how to send data via HTTP POST along with dynamic "Replacement Variable" values configured in the operation.
Get the example process used below from the Process Library here.
You need to build a POST request for a generic RESTful web application using an HTTP Client connector, however you also need to set dynamic values for replacement variables defined within the HTTP Client Operation. The replacement variables could be defined for HTTP Headers or portions of the Resource Path.
For example, you need to POST a document payload to a REST endpoint but also pass dynamic values for the query parameters like this:
Use a Set Properties shape before the Connector shape to set dynamic document properties whose names match the replacement variables defined in the HTTP Operation component. The dynamic document property name must match the name exactly (e.g. case sensitive) of the replacement variable.
IMPORTANT: Do NOT use the Parameters tab on the Connector shape to set the replacement variable values. This will disregard the document data payload passed to the Connector shape and effectively send a blank payload to the endpoint.
- Create and configure an HTTP Client Connection for the base URL: https://www.mycoolapp.com/crm
- Create and configure an HTTP Client Operation with a mix of static and replacement variable elements to build out the remainder of the URL Resource Path. Note the two replacement variables, HTTP_SUBSIDIARY and HTTP_REGION.
- Use a Set Properties shape before the Connector to set values for the two replacement variables using dynamic document properties. The property names must match the replacement variable name exactly.
When the process executes, the final endpoint will assembled from the base URL defined in the Connection component and the Resource Path elements including the dynamic replacement variables defined in the Operation component. The document data passed to the Connector shape will be POSTed as the request payload.