Versions Compared
Version | Old Version 10 | New Version 11 |
---|---|---|
Changes made by | ||
Saved on |
Key
- This line was added.
- This line was removed.
- Formatting was changed.
1. AI Bot Overview
Ascendo predictive service can be used as a backend to any Chatbot. Essentially the AI bot can use the learned responses to help with its own automatic responses to end customer queries.
2. Purpose
This document details how to integrate AI bot into the customer environment. Also, provides details on how to provide entitlement information to Ascendo on invoking AI bot.
Prerequisites:
Sign up as a customer on Ascendo Application
Go through the Admin process in Ascendo to create Business Unit
Set up Data Integration or upload data for Ascendo Self Learning in the admin portal.
Once data upload, need to map your data with Ascendo. Under Mapping menu
Get AIBot API Key from Support Channel → AI Bot.
3. Implementation Details
3.1 Integrating AI Bot
In order to use the AI bot in a different website as a widget, create an iframe with the given URL.
3.1.2 Code Snippet
The following code has been implemented in angular and can be easily converted to any other language. ( represents your organization name in the following code. For example, if your organization name is acme, replace all <org_name> with your organisation name(acme))
Code Block |
---|
<div id="chatbot-div-active" *ngIf="is_chatbot_active===true"> <iframe src="https://<org_name>.aibot.ascendo.ai/<email>?api_key=<api_key>" class="chat-iframe" title="chatbot"></iframe> </div> <div id="chatbot-div-not-active"> <div *ngIf="is_chatbot_active===false"> <button mat-fab (click)="is_chatbot_active=true;" style="color:#ffffff; background-color:#1a73e8;"> </button> </div> <div *ngIf="is_chatbot_active===true"> <button mat-fab (click)="is_chatbot_active=false;" style="color:#ffffff;background-color:#1a73e8;"> </button> </div> </div> <style type="text/css"> #chatbot-div-active{ box-sizing: border-box; position: fixed; right: 2rem; bottom:88px; z-index: 5; width:320px; max-width: 90vw; height:500px; }.chat-iframe { box-sizing: border-box; width: 100%; height:100%; background: transparent; border:none; } #chatbot-div-not-active{ box-sizing: border-box; position: fixed; right:2rem; bottom: 1rem; z-index: 5; } </style> |
Note: <email>
should be the end customer email if your organization knows the person that has logged in. If it is not available, they need to enter null.
iframe src="https://<org name>.aibot.ascendo.ai/null?api_key=<api_key>"
3.2 Entitlement Integration
Customers can optionally provide the entitlement details for a given user. This section provides the details of the API.
3.2.1 API overview
Go to https://asc.apis.ascendo.ai/docs and under the “User” label you will find a POST API . This API provides the information on the user information for the current chat session. Prior to that, we are required to provide the specific Ascendo customer info and the corresponding API key. For example, Ascendo customer “Acme” will have its own unique uuid and API key. These will be available under the Admin Portal. The API then will provide the information on the customer email and the name.
3.2.2 Getting the UUID and API Key
Log into Ascendo and go to the Admin settings. Within the settings, click on the API key info.
Step 1: Click on the settings - this is available for the Admin users on the top right corner of the page.
Step 2: Under Integration Settings, on the menu on the left, click on API keys. Get the customer uuid(organization identifier).For getting the api keyType ‘ai_bot’ in API KeyLabel fields to generate API Key and click on Generate.
This customer uuid and API key will be required in the POST API.
3.2.3 Post API
Use the POST method to update the user details. API Link:
https://asc.apis.ascendo.ai/api/v1/user/{customer_uuid}/update_subscription?api_key={ai_bot_api_key}
Parameters:
customer_uuid - from the admin portal
api_key - from the admin portal
Request body(Contains the information about the end customer)
email - the email of your end customer
is_subscribed:
true
if the end customer has subscribed to your enterprise services to give them priority while handling their issues.
false
otherwise.
username-represents the end customer that is initiating the chat(eg-John Doe)
Response:
status : successful
Skip to:
Method 1
Method 2