API Connection: bot features

iAdvize allows you to deploy new conversational capabilities by using your data sources (delivery status information, product information, CRM data, personalized data available via APIs...) directly in your bot automation strategy.

Thanks to iAdvize's connected augmented intelligence, the bots will be able to handle simple, repetitive requests in full autonomy, allowing your respondents to focus on higher-value conversations that require their expertise.

What are the prerequisites?

- Work with a GraphQL API or Rest API
- Your API needs to return JSON payloads
- Ideally, minimum of API knowledge or include developers in this process of connecting your API to iAdvize and creating a bot scenario with an API connection

Benefits for your visitors

Visitors can get personal information from a bot, about their account, their orders or any other information your brand has on them that can be pulled from your company’s API.
For example: get the status of their latest order.


They can also get personalized product suggestions, from a bot, that will be pulled from the brand’s catalogue API and suggested to them based on criteria such as products from their previous purchases.
For example the top 3 bestsellers of the year in the Bluetooth headsets category, or the pump that fits the bicycle they purchased last month.



The bot can suggest to visitors relevant links to articles from your brand’s FAQ or knowledge base, replying to questions they asked.
For example, the bot could send a link to the article explaining how to retrieve their password.


Setting up your API connection

As an administrator Connect your API.
You can connect your API to the iAdvize platform, by going into the Automation section, API connection sub-section.



From there, configure “inputs” in your API connection: this is the information you’ll want to ask visitors in the bot scenario.
For example, their client ID.


NB. You can also define custom data as an input to your API connection.
Here's the nomenclature to follow in this case: customData.<my_custom_data_name>
ex : customData.cust_email

You can then provide a security token or password in order to safely connect to your API. They will be encrypted before we store them in the iAdvize database; after your API configuration is saved, only the last 4 characters will be displayed (as seen on the screenshot).


Then, you can enter the URL of your API and choose

- the GET method if you want to use data from your API
- the POST method if you want to send data to your API.
- the PUT method if you want to update data to your API.

If your API uses parameters in the URL, you can provide them here (see example on the screenshot with the parameter {order_id}). Please note that the format of the parameter can be different in your API.


If your API uses headers, you can provide the keys and values here.


If you want to send data to your API by setting up a POST API, you can provide your request body as JSON here.
Example: sending a customer’s email to your CRM.


Then, you can configure the extracted data that you will need, which is the information your bot will be able to return to visitors in its scenario.
Example: order status.



Then, test your API connection to make sure that everything is set up correctly!



NB. It may happen that an API request fails. Here are the reasons why the alternative action in the event of a failed request should be activated (non-exhaustive list):

There is no response from the connected API:
- URL incorrectly configured in the API connection
- The API needs an ID key

There is an API response but it is incorrectly configured in the API connection or the client API:
- JSON path incorrectly configured in API connection
- Empty variable

The visitor's request is in the wrong format:
- If the visitor's text does not match the configured response format (text, amount of money, distance, duration etc. )

Using your API connection in your bot scenario

Now that your API connection is fully working, you can use it in bot scenarios in order to ask visitors questions and have your bot reply to them automatically with personalized information from your API. For example: ask a visitor for its order ID and answer with the status of the order automatically.

To do this, you will need to use both the Connection card and the Rich content card in your bot scenario.



For more information:

- Set up a bot scenario

- Connect your bots to your apps