Skip to content

Connect to API Node

This node lets you make synchronous or asynchronous requests using SOAP or REST API calls.

You can query or get information from an external system by defining a service request that includes configuring the APIs and passing the parameters.

Configure the Node

General Settings

Click the General Settings icon and configure the following:
General Settings

  1. A Custom Name to identify the node.
  2. Select an API Type from the following options:
    1. REST: A REST API conforms to the constraints of the REST API architecture and allows interaction with RESTful web services.
    2. SOAP: A SOAP API uses the Simple Object Access Protocol (SOAP), which is a messaging protocol for interchanging data in a decentralized and distributed environment.
  3. Select an Integration Type from the following options:
    1. Synchronous: The API returns resources, data, or services immediately.
    2. Asynchronous: The API returns resources, data, or services later based on the number of seconds you select. The default selection is 20s, and the available options range from 8s to 20s.
  4. Under Request Definition, configure the API request. Define the GET, PUT, POST, or DELETE service request, along with the API call and parameters to pass. To create a new request, click + Define Request.
    Request Definition

Define your API request by following the steps outlined in Define and Test an API Request, available below.

  1. Under Access Using URL Connector, select “URLs are behind a firewall and a connector has been set up” if the API must be accessed using a configured URL connector.
    Access Using URL Connector

Define and Test an API Request

To define and test your API request, follow these steps:

  • In the Request Definition section within the API node’s General Settings, click + Define Request.
  • The Define Request window opens: Define Request
  • Select the GET, PUT, POST, PATCH, or DELETE call from the list. Method
  • Paste your API call URL in the text field and click Test. cURL
  • Your API call runs successfully if all the inputs provided are valid. Otherwise, an error message is displayed.
  • Provide the details for the Header Key and Value pair. You can add a new pair by typing it in the empty fields. You can delete a pair by clicking the Delete (Bin) icon next to it. Headers

  • Click Test Request and paste the request body code in the text field. The text editor provides the following options:

    • Format JSON data with indentation and line feeds,
    • Compact JSON data by removing white spaces,
    • Sort contents,
    • Filter, sort, or transform contents,
    • Repair JSON,
    • Undo the last action,
    • Redo action.
      Test Request
  • Click Save after you’ve tested the API successfully.

Connection Rules

  • Click the Connection Rules icon and select the actions that you want the node to trigger when the API call is successful and when the API call fails.
  • For On Success, the selected Go to node defines how the bot handles a successful API call.
  • For On Failure, the selected Go to node defines how the bot handles a failed API Call. Connection Rules

Error Handling

Use this section to handle system errors during customer interactions. Error Handling

  • Your Message to User: The message that will be played or displayed to the customer. Select one of the following options from under Choose your message type:

    • Text to speech: This option allows you to transcribe text to speech. Type the text to be transcribed in the textbox or select an already configured message.

      • Click + Create New to create a new prompt for the text-to-speech message type. Enter a name for your message and type its contents.
      • Define multiple message types for the prompt message to be played to the customer by clicking + Add Another. In this case, one message will be randomly selected and played during runtime.
        Text to Speech
    • Audio File: You can type a new message to be played to the customer in the text field or click + Upload New to upload an audio file (.mp3 or .wav format) with the message to be played; Audio File

    • Link: Click + Create New to add the text of the message you want to play to the customer and insert the URL of an audio file in .mp3 or .wav format. Click + Add Another to add another message URL.
      Link
    • Go to node: Select the node to which you want to direct the error handling flow and define the system behavior. You can create a new node by selecting a node type or identifying and selecting an existing node.