Ada CX is a customer service chatbot platform that enables businesses to create AI-powered chatbots for seamless customer interactions.

Welcome to the ADA documentation for Dashbot! Integrating Dashbot into your ADA application is quick and easy.

Obtain ADA API Key

Before you can retrieve data from ADA, you need to have an ADA API key, which allows you to authenticate your requests. For further details you can hop into the ADA documentation here

In the Ada dashboard, go to Settings > Integrations > API Integrations.

Beside the name of the API, click Configure.

Click Generate a new Access Token.

Copy the API Access Token. Keep it in a safe place, as you won’t be able to access it again.

If you misplace your token, click the Generate a new Access Token button to get a new one. When you do this, it invalidates the previous token. Please note that for authentication, ADA uses a bearer token.

ADA Integration with NPM

Retrieve Data from ADA

With your ADA API key in hand, you can now fetch conversation data or message data from ADA. This data can include messages, user interactions, or any relevant information you wish to analyze with Dashbot.

Here's an example using Node.js and the axios HTTP client to make the GET request:

const axios = require('axios');

// Replace 'your_ada_api_key' with your actual ADA API key
const ADA_API_KEY = 'your_ada_api_key';
const ADA_API_URL = 'GET /api/data_api/v1.2/conversations?created_since=2022-03-16T17:59:28.201000&page_size=100'; // Adjust with the appropriate endpoint

axios.get(ADA_API_URL, {
  headers: { 'Authorization': `Bearer ${ADA_API_KEY}` }
})
.then(response => {
  const data = response.data;
  console.log('Data retrieved from ADA:', data);
  // Proceed to format this data for Dashbot and send it in the next step
})
.catch(error => console.error('Error fetching data from ADA:', error));

Ensure you replace 'ADA_API_KEY' with your actual Kore.ai API key and Bot ID. Be sure to adjust the date fields in the endpoint URL as well. Be sure to adjust the date fields in the endpoint URL as well.

Post Data to Dashbot

After successfully retrieving data from ADA, the next step is to format this data according to Dashbot's specifications and send it to Dashbot's Universal API.

const DASHBOT_API_KEY = 'your_dashbot_api_key'; // Replace with your Dashbot API key
const DASHBOT_API_URL = `https://tracker.dashbot.io/track?platform=universal&v=11.1.0-rest&type=incoming&apiKey=${DASHBOT_API_KEY}`;

function postDataToDashbot(dataFromAda) {
  // Example: formatting ADA data for Dashbot
  const formattedData = dataFromAda.messages.map(message => ({
    text: message.text,
    userId: message.userId
    // Add more properties as needed
  }));

  // Sending each message to Dashbot
  formattedData.forEach(message => {
    axios.post(DASHBOT_API_URL, message)
      .then(() => console.log('Data sent to Dashbot'))
      .catch(error => console.error('Error posting data to Dashbot:', error));
  });
}

// Assuming `data` is what we retrieved from ADA
postDataToDashbot(data);

Ensure you replace 'your_ada_api_key' and 'your_dashbot_api_key' with your actual ADA and Dashbot API keys. Adjust the ADA_API_URL and data formatting according to the structure of the data you're retrieving and the requirements of Dashbot's API.