Avaya Cloud Office is a comprehensive unified communications platform designed to streamline business communications with advanced features such as voice, video, messaging, and collaboration tools.

Welcome to the Slack documentation for Dashbot! Integrating Dashbot into your Slack bot is quick and easy.

If you have any questions, comments, or suggestions, please feel free to contact us.

  1. Login to Avaya Cloud Services at https://accounts.avayacloud.com.
  2. Click on Manage Companies and click on the existing company name.
  3. Select the API tab.
    • If there is an existing key with its Role set to IPOFFICE key:
      • Click View/Edit and use the menu controls to either download the values as a CSV file, or to copy and paste the values to a temporary document on your PC.
    • If there is no existing key with its Role set to IPOFFICE key:
      • Click Add API key+. Set the role to IPOFFICE and click Add API key.
      • Click View/Edit and use the menu controls to either download the values as a CSV file, or to copy and paste the values to a temporary document on your PC.

Get Messages from Avaya Cloud

To retrieve messages from Avaya Cloud, you'll use the "List SMS" API endpoint. Here's a basic example of how to do this:

  1. Endpoint: https://docs.avayacloud.com/aspx/rest#list-sms
  2. Method: GET
  3. Headers:
    • Authorization: Bearer {Your_Avaya_API_Key}
  4. Parameters: Customize your request based on the query parameters supported by the Avaya API, such as startDate, endDate, or phoneNumber.

Example Request to Avaya Cloud:

import requests

url = "<https://api.avayacloud.com/messaging/v1/sms>"
headers = {
    "Authorization": "Bearer {Your_Avaya_API_Key}"
}
response = requests.get(url, headers=headers)
messages = response.json()

Post Messages to Dashbot

After retrieving messages from Avaya Cloud, you can forward them to Dashbot using its Universal REST API.

  1. Endpoint: https://tracker.dashbot.io/track?platform=universal&v=11.1.0-rest&type=incoming&apiKey={Your_Dashbot_API_Key}
  2. Method: POST
  3. Headers:
    • Content-Type: application/json
  4. Body: The body of the request should include the messages retrieved from Avaya Cloud, formatted according to Dashbot's requirements. You'll likely need to transform the Avaya Cloud message format to match what Dashbot expects.

Example Request to Dashbot

dashbot_url = "<https://tracker.dashbot.io/track>"
params = {
    "platform": "universal",
    "v": "11.1.0-rest",
    "type": "incoming",
    "apiKey": "{Your_Dashbot_API_Key}"
}
# Example payload - transform this based on the actual message format and Dashbot requirements
payload = {
    "text": "Hello from Avaya Cloud!",
    "userId": "user123"
}

response = requests.post(dashbot_url, params=params, json=payload)
print(response.status_code)

Example JSON Payload to Dashbot

When you have extracted the data from Avaya, here is how you might format the JSON payload for Dashbot:

jsonCopy code
{
  "text": "Hello, how can I assist you today?",
  "userId": "user123456"
}