Hi, Humans. How may we help you?

07. Add Integration Skill to the AI Chatbot
6 min
Created by Ligia Sarmento on 9/16/2024 3:35 PM
Updated by Ligia Sarmento on 9/24/2024 3:39 PM

In this new feature, you can define a context to send or request information available in external systems, as well as request services from them using API calls.


Some examples of these actions are querying user information, checking order statuses or generating documents such as bills of exchange. By setting up an integration, you can customize how and when the chatbot makes these requests, as well as how it should handle the responses it receives, enhancing the customer service experience.

Example of use

Imagine that your customer needs to check if there is an open order. Using this new feature, you can configure the chatbot to connect to the order management system via API. The chatbot asks for the customer's CPF, makes the call to check for open orders and returns the information automatically.

Practical example tutorial

  1. Access the Skills screen of the chatbot.

  2. .
  3. Click on Add skill 

  4. Select the Integration option and click Next.

  5. Choose the option Manual configuration and follow the steps below to create the new integration.

Step 1: Basic data

Fill in the requested fields:

  1. Name: Give this integration a name, such as "Check order".
  2. Command: Define the command that will be executed, such as "Check order status".
  3. Click Next to go to the next step.

Step 2: Parameterizing the API call

Now, you will configure the API call that the chatbot will make.

  1. Método: Choose the appropriate method (GET, POST, PUT or DELETE), depending on the request that will be made. For example, to search for information, the GET method is usually used.
  2. URL: Enter the URL of the Endpoint of the external system that will be called. Example: https://api.sistemaexemplo.com/pedidos.
  3. Head & Garlic: Click Add field and enter the information to set up the request header:
  • Field: Add the necessary fields to the request header, such as CPF or authentication token.
  • Value: Set whether the value will be fix or variant. If this is variable, create an instruction for the chatbot. Example: If the field é CPF, the instruction would be something like "Ask the user for the CPF". 

4. Body: Click on Add field and enter the information to configure the request body:

  • Field: Add the necessary fields in the body of the request, such as Request Number.
  • Value:  Set again whether the value will be fixed or variable, depending on the logic used in the header.

5. Click Next to go to the next step.


Step 3: Test the API call

In this step, you can test whether the integration is working correctly.

Click on Run test for the system to make the API call and display the response, which can be: 

🟢 200 OK: Means that the test was successful and the system displays the returned attributes, such as Name, CPF, Address. Enable or disable which attributes you want to use to handle the return (step 4 below). 

🔴403 – Authentication error": It means that the test was not successful. The system will display the error if it exists for correction.


Step 4: Handle feedback

Lastly, you define what will be done with the data in the AI chatbot's journey, choosing how it should treat the attributes selected in the previous step.

You have three options:

  • Confirm the result of the call: The chatbot can only confirm the answer. Example: If the customer has an open order, the chatbot can reply with a message confirming that there is an open order.

  • Send as file: If the reply contains a link to a file (such as a boleto), the chatbot can make this file available to the user.

  • Send as text message: The chatbot can generate a message with the returned attributes. Example: The chatbot can inform you of the order number and status, such as "Your order #12345 is in progress."

Finally, conclude with Create skill

Done! Your skill is already added to the chatbot.

If you want to edit it, click on the ícone to the side of the skill and you will have this option.

Did this article solve your doubts?
Recently viewed