Integration
When you want to provide users with information stored on your server, you can easily do so through our API Integration module.
Step - 1: Create an API
Create New API
Refer to the Integration tab from Dashboard Sidebar and click on Add New API (Provide a name to the API as applicable for future reference).
Select Method
You can select two types of methods:
GET Method: You should select this if you don’t want all the customer data. Here you can add a header and a parameter to your API.
POST Method: You should select this if you want all the customer data. You will get the information of the customer that has triggered this. You can add a header and additional parameters to your API as well.
Select Output Type
You can show the desired data through different blocks:
Text Block: Data is shown as plain text.
Image Block: Data is shown as an image.
Gallery Block: Data is shown in the form of a Gallery carousel (best suited to showcase products).
Button Block: Data is shown in the form of buttons for users to press and access.
Quick Reply Block: Data is shown on the floating buttons for users to press and access.
Step - 2: Call the API in Chatbot Builder
Create a Sequence
Create a Sequence from the Builder.
Create a Block
Add the necessary Block in the Sequence.
Call API in the Block
Text Block: When you add a Text Block
use <<
on the text field and you’ll see a list of all the APIs you have created. Select the desired one.
Image Block: When you add an Image Block
, you’ll see the option Create an API image block
. Click it and you’ll see the list of APIs. Select the suitable one.
Gallery Block: When you add a Gallery Block
, you’ll see the option Create an API Gallery Item
. Press on it and you’ll see the list of APIs. Select the suitable one.
Button Block: When you add a Button Block
, you’ll see the option Create an API button
. Press on it and you’ll see the list of APIs. Select the suitable one.
Quick Reply Block: When you add a Quick Reply Block
, you’ll see the option Create an API button
. Press on it and you’ll see the list of APIs. Select the suitable one.
Step - 3: Receive data at your API Endpoint
If you use a POST request, your API endpoint will receive the following data of the customer who triggered the API:
Step - 4: Return Data in the API response
To trigger any specific block in response, return data in the following structure: