The External Web Call action allows you to initiate an HTTP or HTTPS request to another system. It could be used to post new records to your internal systems, look up data about a customer in your database, kick off automated workflows, and more!
HTTP headers can be used to pass additional information to the API endpoint along with the request and are typically used to add metadata to the request. The accepted headers are based on what is configured in the API endpoint and should be present in the API documentation.
Username and Password
These fields support basic authentication in the event that it is required for access to the API endpoint. Token-based authentication can also be supported by adding a custom header to the request.
This field allows the user to indicate what action should be performed by the API when the request is received. Currently, POST and GET are available to support submitting information and extracting information, respectively. More methods will be added to this list later.
With this field, the user can set the duration of time (in seconds) that SmartFlows should wait for the API response before failing the request. The default is set to 10 seconds. A best practice is to keep this to a short time window to prevent consuming capacity unnecessarily. Most requests will be returned in less than a second.
URL of Service
This field is where the user will enter the URL of the API endpoint. Variables can be used inside URLs to target specific objects.
Extract JSON/XML responses into named variables. When a request is sent, the entire response is collected in a variable called “EXTCALL_6.responsebody”. User-configured response variables, however, offer more granularity and allow the user to extract a subset of the response. For example, if the user is interested in extracting a value named “orderStatus” from their API, they can add a response variable with that name to the external web call action. The name must be a literal match to the name sent by the API.
The extracted data is then stored in a SmartFlows variable of the same name. This variable can then be invoked in later parts of the flow using the following syntax:
This variable will also appear in the Available Variables section of the action configuration panel in subsequent actions, where it can be used in messages, text-to-speech, analytics, or even other web calls.
The external web call action creates several variables.
The entire response from the external API.
The response code generated from the API (e.g. 200 for success, 400 for bad request, 404 not found, etc.)
User-configured response variables
Any key in the API that matches a named response variable on the web call action will allow its corresponding value to be stored in the response variable. See the section above on response variables for more information.