2

Remote lookup field overview

Kissflow plans:
 
โœ“ Basic โœ“ Enterprise

The Remote lookup field is a useful to get data from external systems into your form. 

With the ability to specify URLs, request types, headers, and data extraction methods, you can create workflows that interact with external systems and bring in the data you need to drive your business processes.

Field properties

In addition to the standard field properties (Name, Field type, Required?, Field ID, and Help text), you can configure the below additional properties. 

URL

Iput the endpoint to receive or send data.

The + button in the URL allows you to insert values to form fields dynamically. For example, if you have added a field like Process ID to your form and want its value passed through the URL, click the + button, select the appropriate field, and insert the URL.

This same method also applies when adding dynamic values to a JSON payload.

Request type

Define whether you are retrieving data (GET) from the entered URL or sending data (POST) to it.

Headers

Provide additional information about a request or response.  Use it to specify the type of content being sent or received, authenticate the user, authorize access to a resource, or cache the response.

Each header consists of a key-value pair, where the key is the header's name and the value is the header's value.

Here are some examples of common HTTP Headers:

  • Content-Type: Specifies the format of the content being sent or received. For example, application/JSON indicates that the content is in JSON format.

  • Authorization: Authenticates the user. For example, Bearer YOUR_API_KEY indicates that the user is authenticated using an API key.

  • Accept: Specifies the types of content that the client is willing to receive. For example, application/JSON indicates that the client is willing to receive JSON responses.

Body

Define the additional key-value pairs expected by the remote lookup service.

What is the format of the response data you are working with?

Specify the response data format you are working with, which can be JSON, XML, or plain text.

JSON/XML path of value in result

Specify the JSON/XML path for extracting specific values from the output received from the endpoint. For example, $.data.Name to retrieve the Name element from the JSON response. You can also use $ in the path to extract the entire JSON response.

What kind of data are you working with?

This field appears only when you choose JSON or XML as the response format. It allows you to choose the type of data you are working with. For example, if Name is Stephen Strange, choose Text.

How should the result be chosen?

This field also appears only when you choose JSON or XML as the response format. You can specify if you want the values to be auto-populated in the remote lookup field, or in a drop-down format.

Using remote lookup data

Remote lookup field data can be extracted and used in fields and formulas to update other form field values.

Number field - Remotelookup_Fieldname.extractNumber(path, index) 

Text field - Remotelookup_Fieldname.extractText(path, index) 

Where,

  • Path refers to the text value in the output received.
  • Index refers to the position of the selected value.

Example of path and index

Consider a JSON response representing weather information:

{

  "weather": [

    {"main": "Clear", "temp": 25},

    {"main": "Rainy", "temp": 18},

    {"main": "Cloudy", "temp": 22}

  ]

}

Path:

 `"$.weather[*].main"`

Explanation:

This path points to the "main" attribute within the "weather" array. It selects all occurrences of "main" within the array.

Resultant output:

The output extracted using the path would be a list of weather conditions: `["Clear", "Rainy", "Cloudy"]`.

Index: `2`

Explanation: 

The index refers to the position within an array. For example, if you choose index 2, you are selecting the third element in the array (arrays usually start counting from 0).

Resultant output:

The output extracted using the index `2` would be the weather information for the third occurrence: `{"main": "Cloudy", "temp": 22}