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 using an external provider
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 already set up in their own systems.
Currently, it is possible to integrate with the ERP Omie. So, if you use it, you can connect a generative AI chatbot to the information available in Omie to resolve potential customer issues.
Follow these steps:
- Access the Skills screen of the chatbot.
- Click on Add Skill.
- Select the Integration option and click Next.
- Choose the option Using a provider and follow the subsequent steps to create the new integration.
Step 1: Basic Information
Fill in the requested fields:
- Name: Assign a name to this integration, such as "Check Order".
- Command: Define the command to be executed, such as "Check Order Status".
Click Next to proceed to the next step.
Step 2: Select the Provider
Choose the system where the application to perform the action was built. With the integration, the chatbot will be able to perform the action as configured in the provider.
Currently, only Omie is available, but soon other providers like Sensedia will also be available.
Click Next to move to the next step.
Step 3: Select the Action to Be Performed
Select one of the available options to define the action the chatbot will perform whenever this skill is triggered. It is possible to:
- Check order status
- Check inventory
- Send an invoice
- List recent invoices
- Verify registration
Finally, click Create Skill to complete the process.
Done! Your skill has been added to the chatbot.
If you wish to edit it, click on the icon next to the skill to access the edit option.
Useful information about integration with external providers:
- For the chatbot to access ERP information, your Customer Cloud account must first be integrated with the provider. For more information, see Integrating Omie with Zenvia Customer Cloud.
- The chatbot will be able to access information such as inventory, prices, and the status of purchase/sale orders.
- Each skill must contain only one action from the Omie integration.