This skill allows the chatbot to integrate with an external system to perform a specific action.
Some examples of these actions include retrieving user information, checking order statuses, or generating documents such as invoices.
Example of use
Imagine your client needs to check if there’s an open order. You can configure the chatbot to connect to the order management system via API.
The chatbot asks for the client’s ID (CPF), makes a request to check for open orders, and automatically returns the information.
In this article:
- Add integration skill manually
- Add integration skill with OMIE
- Add integration skill with Sensedia
Practical example tutorial
This skill offers two ways to create a new integration: manually or using a provider.
Next, see how to configure both options.
New integration using manual configuration
Access the Skills screen of the chatbot.
- .Click on Add skill
Select the Integration option and click Next.
Choose the option Manual configuration and follow the steps below to create the new integration.
Step 1: Basic data
Fill in the requested fields:
- Name: Give this integration a name, such as "Check order".
- Command: Define the command that will be executed, such as "Check order status".
- 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.
- 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.
- URL: Enter the URL of the Endpoint of the external system that will be called. Example: https://api.sistemaexemplo.com/pedidos.
You can also include parameters within the URL. To do this, use the format {{parameterName}}
. This means you can define specific values for these parameters right below, in the URL Parameters section.
This functionality is useful when you need to customize the URL to make it more detailed. For example, if you need to pass specific information, such as an order ID, you can set this up and then insert those values into the URL exactly where needed. Your URL would look something like https://api.examplesystem.com/orders/{{orderId}}.
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.
New integration using a provider
In this option, you configure the chatbot to perform actions through integration with external applications that have already been configured in their own systems.
Currently, it’s possible to integrate with Omie and Sensedia. So, if you use them, you can connect an IAG chatbot to data available in these two tools to help solve your customers' issues.
Follow the steps:
Access the Chatbot Skills screen.
Click on Add skill.
Select the Integration option and click Next.
Click on Using a provider.
Choose your preferred system. Currently, Omie and Sensedia are available.
Click Continue to proceed.
Next, follow the tutorial for the chosen provider.
Integration with Omie
If you use Omie, you can connect an IAG chatbot to the information in this ERP so that the chatbot can resolve common customer issues.
Follow the steps:
Step 1: Basic information
Fill in the requested fields:
Name: Give this integration a name, like "Check order".
Command: Define the command that will be executed, such as "Check order status".
Click Next to proceed.
Step 2: Select the action to be executed
Choose one of the available options to define the action the chatbot will perform when this skill is triggered. The available actions are:
Order status check
Stock check
Send payment slip
List recent payment slips
Customer registration verification
Finally, click Create skill. Done! Your skill has been added to the chatbot.
To edit it, click the three-dot icon next to the skill.
Integration with Sensedia
If you use Sensedia’s global API solutions, you can integrate and select which of the APIs registered on the platform will be used in the IAG Chatbot to better serve your customers.
Follow the steps:
Step 1: Connect with Sensedia
Fill in the required fields:
Token: Enter the token retrieved from the Sensedia platform.
URL: Insert the endpoint to query the APIs.
Step 2: Enter basic data
Skill name: Define a name for the skill.
Activation command: Choose the command that will activate this skill during conversations.
Step 3: Select the API to be executed
Choose an environment.
Select an API group.
Choose the specific API to be used by the chatbot.
If necessary, define the request parameters: URL, header, and body.
Field values can be:
Fixed: Enter a static value.
Variable: Define which data the chatbot should ask the user during the conversation.
To add more fields, click Add field.
Step 4: Test the integration
Run a test to ensure the integration works.
Review the response data and select which attributes should be used by the skill.
By default, all response attributes are selected. Uncheck those you don’t want to use.
Step 5: Handle the response
Lastly, define how the chatbot should handle the selected attributes in the AI journey. You have three options:
Only confirm the result: The chatbot simply confirms the response. Example: If there is an open order, the chatbot replies confirming that.
Send as file: If the response contains a file link (e.g., a payment slip), the chatbot can provide it to the user.
Send as a text message: The chatbot can send a message with the returned attributes. Example: “Your order #12345 is in progress.”
Click Add skill to finish. Done! Your skill has been added to the chatbot.
To edit it, click the iconde + next to the skill.
Useful information about integration with external providers
For the chatbot to access ERP information, your Customer Cloud account must be integrated with the provider first. For more details, see Integrate Omie with Zenvia Customer Cloud.
The chatbot will be able to access information such as stock, prices, and purchase/sales order status.
Each skill should contain only one action from the Omie integration.