How does the BlinkChat Integration Block work?

What is the Integrations block for?

The BotConversa Integration Block is used to make REQUESTS to external APIs within your own botconversa flow.

In practical terms, all integrations that will be performed within the conversation flow itself can use the integration block, since it performs the request during the execution of the flow and returns the data for the flow to continue. (Example: during the flow, ask for the contact's zip code, perform a query in an API and return the contact's street name).

What are the existing integration methods?

In an API integration, HTTP URLs are used, that is, data can be sent and received through these links. To do this, there are methods present within the integration block, which must be selected according to the API documentation of the software you want to integrate. These methods are:

GET: Receive some external data into the BotConversa.

POST: Send data from BotConversa to other software via API.

PUT: Used to update some information completely

PATCH: Used to update some information partially

DELETE: Dedicated method for deleting information or settings.

Remembering that, to carry out any integration and know which method to use, you must have the API documentation for the tool you want to integrate with BotConversa.

What is the structure of the integration block?

- Headers:

This is a very important field, as it is in this field that parameters and authentication keys will be used, and the user agent can be informed. It is important to note that the use of this field is directly linked to the API documentation of a system; you should carefully observe all the details of what should be used in the Request Header.

Integration Block Header Field

- Body:

When you need to send data from a client (such as a web browser) to your API, you send it as a request body. The request body is the information sent by the client to your API. You can send custom fields from the user, the bot, and also the system, such as phone numbers, emails, and others, in the request body.

Integration Block Body Field

- Response

The response field is basically the return of your API request, through it you will receive a success message when you also receive your data from a GET request, which you can map later in the Response Mapping tab, as you will see below.

Integration Block Response Field

- Response Mapping:

This field in the integration block is one of the most important, as it is where your request will be mapped to BotConversa, allowing you to use this information in your flows. Basically, you must select which index you want to save from your response and then select the custom field in the company. In the example below, we are taking the Bairro response from the API request and saving it in the Bairro custom field within BotConversa:

Integration Block Response Mapping Field

Integration Block Outputs:

In the BotConversa integration block, there are 2 outputs, the TOP output being the successful response. In other words, the top output of the block is executed only when the request is made and has a response, while the bottom output is executed instantly, continuing the flow.

Important: The top output has a time-out of 10 seconds, that is, if the integration block does not receive a response within 10 seconds, the flow will continue without the information.

Integration Block Outputs

Was this article helpful?