NOTE: This connector only supports domestic calling. If you want to enable international calling, please ask your account manager to reach out to coc@exotel.com


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 enhanced agent productivity and better experience, 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 centres 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 into 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 the 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

  5. Lead must be created in LeadSquared CRM


Installation/ Configuration - LeadSquared portal

Navigate to Apps>Apps Marketplace on the 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 the Exotel portal, add the same in the Virtual Number field ( prefix with country code followed by - eg: +91-)



COC-Config - Connector config / Call timer


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 the 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 of the 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. 


This can be configured via the Leadsquared app available on https://my.exotel.com/{AccSID}/apps#available-apps




Note: API key token Base 64 value will be fetched only on clicking 'update'. The same value needs to be copied onto Leadsquared connector Click2call settings.


Call Route URL


To be copied from Leadsquared connector >> Lead Route V2 and configured under Call route URL on Exotel >> App Bazaar >> Leadsquared connector(UTC)






Kindly configure the LeadRouteV2 URL. Do not use Call Route API which is depreciated. Only configure the URL without query parameters (?caller_id=<phonenumber of caller/lead>&agentInfo=<pass true to retrieve entire agent information>) as mentioned

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 URL


To be copied from Leadsquared UTC connector >> Agent pop-up API and configured under  Pop-up URL on Exotel >> App Bazaar >> Leadsquared connector(UTC)




    

Call Log URL


To be copied from Leadsquared UTC connector >> Call Log API and configured under Call log URL on Exotel >> App Bazaar >> Leadsquared connector(UTC)

 

Click 2 Call

  • Custom Headers 

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

(available on the Leadsquared app on Exotel Appbazaar)


  • HTTP Method - GET





POST COC-Config( optional):


This endpoint is responsible for enabling the LeadSquared integration( already invoked by the connector app, no need to call separately):


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

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 the 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 the 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 (☑)





The above call flow setup can only handle calls from existing leads that are created and available in LeadSquared. To handle new callers whose data is not available in LeadSquared, please add the below to the existing call flow. The idea is to route the new callers to the groups available in Exotel if we don’t receive any lead owner numbers from LeadSquared and we will send those call details to LeadSquared based on which they can create a lead in LeadSquared post-call completion.


  1. Place the 2nd connect applet in the “We didn't dial anyone...” section as mentioned below. 

  2. In Dial Whom of 2nd connect applet, choose a group to dial.

  3. You can also route the calls to a common customer care number by doing below where 1234567890 is the customer care number instead of providing a group.



  4. Configure both agent popup and passthru with the below URLs as same as it’s configured in the 1st connect applet to send popup data and call logs to Leadsquared. 


Create popup - To enable pop up on the Leadsquared portal

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





Passthru Applet (Call conversation ends)


Passthru URL - https://api.cocreate.exotel.com/v1/leadsquared/inbound/call/passthru?AccSid={AccSID}


Make Passthru asynchronous (☑)



Passthru Applet (If nobody answers)


Passthru URL - https://api.cocreate.exotel.com/v1/leadsquared/inbound/call/passthru?AccSid={AccSID}


Make Passthru asynchronous (☑)



If you have any questions or concerns, please connect with us using the chat widget on your Exotel Dashboard or Whatsapp us on 08088919888.