This Exotel connector enables a LeadSquared agent to have Incoming Call intimation, visualize the call details and provide Click2Call capabilities on the CRM portal. 


A seamless integration for an enhanced agent productivity and better experience, this also allows users to configure multiple telephony accounts on a single connector.


Use cases

  1. Integrate multiple instances/accounts of Exotel -( eg:  if multiple contact centers in different regions you can now configure each of them as separate tabs)

  2. Integrate multiple telephony providers –
    If customers are using more than one telephony service provider, they can now integrate all of them in one place.

Integration features

  • Click to Call - Place outbound calls to customers from LeadSquared directly.

  • Call pop-up - All calls take place in a call pop-up that has all information related to the call 

  • Call Log API - To pass LeadSquared UTC Call Log API URL

  • Call Timer API - This API is exposed to configure time based usage for click to call. This will enable users to make calls only during preset timings:


Prerequisites

In order to have a successful integration with LeadSquared account, you must complete the following tasks:


  1. Sign up for an Exotel Account

  2. Verify your account through phone or email

  3. Get your account KYC verified

  4. Purchase ExoPhone(VN) to be used by LeadSquared users/agents for outbound calls


Installation/ Configuration - LeadSquared portal

Navigate to Apps>Apps Marketplace on LeadSquared portal, search for the Universal Telephony Connector and click Install

    Add/ Modify connector

  1. Hover the cursor over the settingsSettings iconicon and click Configure.

  2. Click the Add New Connector button.

  3. Enter a name for the new connector, then click Add.


    

    Virtual Number


  • Copy the VN purchased from Exotel portal, add the same in the Virtual Number field ( prefix with country code followed by - eg: +91-)



    Call Route API


    While configuring the call Route URL in COC-auth config api, the user should use Lead Route V2 endpoint without         query params.



eg: Call route url for the above screenshot would be


 https://telephony-in21.leadsquared.com/1/api/Telephony/LeadRouteV2/247ce167766855cc81588d6c7bf92cd526/2ef86c44-06b8-41eb-a4e9-759ccc459e0a


    Agent Popup API



    Call Log API


    Preconfigured  - No changes to be done

 

    Click 2 Call

  • Custom Headers 

            Base64 value of Exotel API token/ key + AccSid (Exotel Acc ID)

(available on https://my.exotel.com/apisettings/site#api-credentials) )


  • HTTP Method - GET




COC-Config - Call timer/ API config ( Call this API to enable the connector/ to configure time based usage)


This API is exposed to configure the connector and schedule time based usage for click to call which will enable users to make calls only during preset timings. This API is responsible for configuring the time limit of each call made by LeadSquared.


  • Call_Timer = TRUE / FALSE. By default, it will be set to FALSE. If set to TRUE, then only honour following three parameters (else, ignore):

  • Call_Start_Timer - Time in format HH:MM:SS. Allow calling from this time on a day. Default Value = 00:00:00

  • Call_End_Timer - Time in format HH:MM:SS. Stop calling from this time on a day. Default Value = 23:59:59

  • Call_Allowed_Days - Array of strings to take input as [Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday]. By default allow all 7 days. 


POST COC-Config:


This endpoint is responsible for configuring the time limit of each call made by LeadSquared. This endpoint will be consumed by LeadSquared once in the initial phase

Sample HTTP Request:


curl --location --request POST https://api.cocreate.exotel.com/v1/coc-auth/{AccSid}/config


Request:


Header:

ContentType - application/json 

api-key - Exotel API-Key

api-token - Exotel API-Token


Body Parameters:

Field

Mandatory

Default

Description

callLogAPIURL

yes

nil

String; LSq UTC Call Log API URL

agentPopupURL

yes

nil

String; LSq UTC Agent Popup API URL

callRouteURL

yes

nil

String; LSq UTC Call Route API URL

isActive

no

true

String; (true/false) Whether the tenant/application is active or not

callStartTimer

no

00:00:00

String; Allow calling from this time on a day

callEndTimer

no

23:59:59

String; Stop calling from this time on a day

callAllowedDays

no

[“Monday”, “Tuesday”, “Wednesday”, “Thursday”, “Friday”, “Saturday”, “Sunday”]

[String]; Allowed days to make a call


enableOutboundPopup

notrue
[String]; (true/false) Enable Popup for outbound calls.

Query Parameters:


Field

Mandatory

Default

Description

app

yes

nil

Name of the application in lowercase (ex: leadsquared)

Sample Request:


{

 "isActive": "true",

 "leadsquared":{

 "callLogAPIURL": "https://telephony-in21.leadsquared.com/...",

 "callRouteURL" : "https://telephony-in21.leadsquared.com/...",

 "agentPopupURL" : "https://telephony-in21.leadsquared.com/..."

 "isActive": "true"

 }

}


Response:


Parameters:

Param

Mandatory

Description

Status

yes

Success/Error

Message

No

Error message, if any

Data

No

Response data


Sample Response:


{

 "Data": {

 "isActive": "true",

 "token":

"<token>..."

 },

 "Status": "Success"

}


HTTP Status Codes

Status Code

Description

200

Success

400

Invalid Input. More details found in response description

401

Unauthorised

500

Server error



GET COC-Config:


This endpoint is responsible for retrieving the configs of LeadSquared application.


HTTP Request:

curl --location --request GET 'https://api.cocreate.exotel.com/v1/coc-auth/{AccSid}/config


Request:


Header:

ContentType - application/json 

api-key - Exotel API-Key

api-token - Exotel API-Token

Parameter

Mandatory

Default

Description

app

yes

nil

Name of the application in lowercase (ex: leadsquared)


Response:


Parameters:

Param

Mandatory

Description

Status

yes

Success/Error

Message

No

Error message, if any

Data

No

Response data


Sample Response:

{

 "Data": {

 "isActive": "true",

 "leadsquared": {

 "agentPopupURL": "https://telephony-in21.leadsquared.com

/...",

 "callAllowedDays": [

 "Monday",

 "Tuesday",

 "Wednesday",

 "Thursday",

 "Friday",

 "Saturday",

 "Sunday"

 ],

 "callEndTimer": "23:59:59",

 "callLogAPIURL": "https://telephony-in21.leadsquared.com

/...",

 "callRouteURL": "https://telephony-in21.leadsquared.com

/...",

 "callStartTimer": "00:00:00"

 "isActive": "true"

 },

 "token": "<token>"

 },

 "Status": "Success"

}


HTTP Status Codes

Status Code

Description

200

Success

400

Invalid Input. More details found in response description

401

Unauthorised

500

Server error


Call flow configuration - Exotel portal

  1. Login to Exotel acc(https://my.exotel.com/)

  2. Navigate to Admin panel >> App Bazar

  3. Click on Custom Apps (+ Create) to add a new flow



  1. Add an ‘App Name’ and create a new flow

  2. Call Start >> Add a Connect applet to begin the call flow



  1. Connect Applet:


  • Configure DialWhom section with ‘Dial phone number(s) returned by URL’

PrimaryURL: https://api.cocreate.exotel.com/v1/leadsquared/inbound/call/dialwhom?AccSid={AccSID}




  • Create popup - To enable pop up on Leadsquared portal

https://api.cocreate.exotel.com/v1/leadsquared/inbound/call/popup?AccSid={AccSID}


    

  • After the call conversation ends - Add Passthru applet 

  • If nobody answers - Add Passthru applet



  1. Passthru Applet (Call conversation ends)

  1. Passthru Applet (If nobody answers)

  • Passthru URL -

https://api.cocreate.exotel.com/v1/leadsquared/inbound/call/passthru?AccSid=xxxx

  • Make Passthru asynchronous (☑)