Classification level: 🟢 C1-Public

Version: 2.3

Last update data: 09/03/2022

Updated by: calldesk technical team

What is calldesk copilot?

The Copilot developed by calldesk is a product allowing agents to save crucial time. In fact, the Copilot is generally coupled with a voicebot making it possible to retrieve information (name, first name, address, reason for the call, etc.), upstream of a transfer to a call center.

By using the Copilot API, you can retrieve the information requested by the voice agent, in order to integrate them into your CRM or the agent banner. calldesk also has a headband that can be integrated into the vast majority of current softphones, so this represents an all-in-one solution, which does not require development.

The agent, therefore, saves time by avoiding having to ask for the same information again for each call. He is then able to concentrate on the real problem of the caller.

API integration

Introduction

calldesk provides an API endpoint allowing to retrieve the information of a given call, in order to display them in the agent banner. This API uses the OAuth2 protocol for authentication management. It is therefore necessary to retrieve an authentication token, which will be used to make requests to the API.

Global overview

  1. The Client IS makes a request on the calldesk authentication server, in order to obtain an authentication token.

  2. The authentication server checks the validity of the request parameters, and provides an authentication token.

  3. The Client IS makes a request on the Copilot API, using the authentication token

  4. The Copilot API checks the validity and access rights assigned to the token.

  5. If the token is valid, and has sufficient access rights, the Copilot API returns the call information.

  6. If the token is invalid, or does not have sufficient access rights, the Copilot API returns an error.

Security - Auth token retrieval

<aside> 💡 https://copilot-auth.calldesk.fr/oauth2/token?grant_type=client_credentials

</aside>

<aside> 💡 curl -X POST --user clientId:clientSecret 'https://copilot-auth.calldesk.fr/oauth2/token?grant_type=client_credentials' -H 'Content-Type: application/x-www-form-urlencoded'

</aside>

var request = require("request");

var options = { method: 'POST',
  url: '<https://copilot-auth.calldesk.fr/oauth2/token>',
  qs: { grant_type: 'client_credentials' },
  headers: 
   { 'Cache-Control': 'no-cache',
     Authorization: 'Basic <your token>',
     'Content-Type': 'application/x-www-form-urlencoded' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});