Mobile Cloud Calling

1. Feature Overview

The LeadSquared Mobile Cloud Calling connector allows you to make calls to your leads over the internet, through the LeadSquared mobile app. The features of this connector are –

  • You can enable mobile cloud calling through your existing telephony provider, by configuring APIs.
  • You can initiate cloud calling to your leads via your mobile app. This will eliminate your dependency on patchy mobile network coverage and other connectivity issues.
  • View lead details when a virtual call is received or initiated via the mobile app.
  • Track virtual missed calls, received via the mobile app. Also, record calls with 100% reliable call recordings and dispositions.
Note:

  • At a given instance, you can install and use only one of the LeadSquared Cloud Calling – India connector or the LeadSquared Mobile Cloud Calling connector. You cannot use both the connectors together on your account.
  • Using this connector, you will only be able to place cloud calls through the LeadSquared mobile app.

 

2. Prerequisites

  • You must be the Administrator of your LeadSquared account.
  • Your account plan must support telephony integration.
  • There’s an API dependency on your Telephony Provider. Before configuring the connector, there are certain additional APIs required from your Telephony Provider. Please write to support@leadsquared.com, or reach out to your telephony partner account representative to make sure if the integration is possible with their telephony provider. Please refer to Click to Call Set-up, Incoming Agent Pop-up and List All DID Numbers sections to know more. (The APIs for Ozonetel are available. Please refer to the Sample APIs For Ozonetel section to know more).
  • You must have the updated LeadSquared Apps on your mobile devices –
  • This is a paid feature. To enable it on your account, write to support@leadsquared.com or reach out to your Customer Success Executive.

Your telephony partner must provide the following APIs, to integrate with the Generic Mobile Cloud Calling connector. These APIs are part of the prerequisites.

1. Click2Call – GET/POST API for Click2Call (The GET as well as POST format will work)

This API will ensure that a cloud call is placed successfully from your user to your lead, from the LeadSquared mobile app.

Sample API –

Method – GET/POST
https://<Base API URL>/click2call?api_key=XXXX&username=XXXX&agentID=@{User:TelephonyAgentId,}&campaignName=@VirtualNumber&customerNumber=@CustomerNumber

Success Response{"status":"success", “message”: “call initiated successfully” "monitorUcid":"9179160xxxxx","callStartTime":"2020-xx-xx xx:xx:xx"}

Response
If DND: {“status”: “error”,”message”: “Customer number is in DND”}
Customer number format should be +91-95XXXXXX or 95XXXXXXX (Without country code).

 

2. Get Incoming Call session by Agent Number (for the Agent Pop-up API)

This API retrieves the lead’s mobile number from which an incoming call is received on your user’s mobile device. This enables LeadSquared to show an agent pop-up, from where your users can capture the lead’s details.

Sample API –

Method – GET/POST

Input Parameters –

  • Authentication credentials (apiKey or userName)
  • agentPhoneNumber (In request parameter, the agent Phone Number can be passed to API as a query parameter or in the request body)

Request: https://<Base API URL>PullAPI?apiKey=KKxxxxxxx&userName=demouser&agentPhoneNumber=984xxxxxxx

Success Response: {“status”:”success”,”customerNumber”:”984xxxxxx”,”monitorUcid”:”9179160xxxxx”,”callStartTime”:”2020-xx-xx xx:xx:xx”}

Note: The Success Response should contain the customerNumber on which the call is received.

Response

  • If the userName field is empty: { “status”: “error”,”message”: “userName should not be empty”}
  • If the apiKey field is empty: { “status”: “error”,”message”: “apiKey should not be empty”}
  • If the agentPhoneNumber field is empty: { “status”: “error”,”message”: “agentPhoneNumber should not be empty”}
  • If invalid userName or apiKey: { “status”: “error”,”message”: “userName or apiKey is Invalid”}
  • If invalid agentPhoneNumber: { “status”: “error”,”message”: Invalid Agent Phone Number”}
  • If maxLimit Exceeded: { “status”: “error”,”message”: “max limit exceeded”}
  • If No Data Found: {“status”:”error”,”message”:”There is no call at this moment with this Agent PhoneNumber”}

 

3. List of All DID/Virtual numbers for a Particular Account

We will be calling this API to sync all the DID number on our platform with a defined frequency, for example, once every 4 hours.

GET/POST: https://<Base API URL>/LeadSquare/PullDIDNumbers.php

Response: {“status”:”success”,”did_list”:[“984xxxxxx”, “94544545XX”]}

 

3. How it Works

  1. Install the Mobile Cloud Calling connector
  2. Set-up the Click To Call API
  3. Set-up the Incoming Agent Pop-up API
  4. Set-up the List All DID Numbers API
  5. Place a cloud call to your lead

 

4. Installation

  1. On the main menu, navigate to Apps>Apps Marketplace and search for Mobile Cloud Calling connector.
    • Alternatively, you can find the connector on the left panel, listed under Mobile.
  2. Click Install.
  3. Once the connector is installed, hover your cursor over the settings icon, and click Configure.
  4. On the Prerequisites screen, depending on your requirements, you can choose either Mobile App Calling – Both Default and Cloud Calling Enabled or Mobile App Calling – Only Cloud Calling Enabled.
    • Mobile App Calling – Both Default and Cloud Calling Enabled – From the LeadSquared mobile app, you can place cloud calls as well as regular calls through your service provider (such as Airtel, Vodafone, etc).
    • Mobile App Calling – Only Cloud Calling Enabled – From the LeadSquared mobile app, you can only place cloud calls.
  5. Then, from the User Field Containing Virtual Number(DID) dropdown, select the custom user field that contains the DID number. To know how to create user custom fields to add virtual numbers for your users, see Manage User Custom Fields.
  6. Once you’re done, click Next.

LeadSquared Cloud Calling Connector

 

5. Click to Call Set-up

You must then configure the Click to Call API. This API is called when your users tap the CloudCall option on the LeadSquared mobile app. This API will ensure that the call is placed successfully to the lead, from your user.

Below is an example of the sample API request and response –

  • Request (Method – GET) –https://telephonyProvider.leadsquared.com/CallManagement.svc/InitiateCall?AccessKey=@{User:AccessKey,}&SecretKey=@{User:SecretKey,}&LeadID=@{Lead:ProspectID,}&LeadPhone=@{Lead:Phone,}&LeadMobile=@{Lead:Mobile,}&AgentPhone=@{User:PhoneMobile,}&UserID=@{User:UserId,}
  • Response – {"status": "success", "data": "Call initiated successfully"}
Note: Only GET and POST methods are supported while configuring the API.

To set-up the Click to Call API, you must complete the following steps –

5.1 API Configuration

  1. On the Configure Mobile Cloud Calling pop-up, navigate to the Click to Call Set-up screen.
  2. From the dropdown, select the HTTP method.
  3. Enter the API request URL in the Enter request URL box.
    • You can use mail merge parameters in the API as shown in the example above.
  4. Map the query parameters to the relevant values (lead or user fields). To do so, for that particular Key-Value pair, under Actions, click . Then, click the value, and from the dropdown, select the relevant value. Once you’re done, click Google.
    • To delete an existing Key-Value pair, against the corresponding pair, under Actions, click .
    • To discard configuring a Key-Value pair, click Cross.
  5. To add a new Key-Value pair to the API request URL, click the Add New button.
  6. Once you’re done, click Go to Test API.

LeadSquared Cloud Calling Connector

 

5.2 Test API

Test the mail merge parameters that are present in the API, by providing sample values for each parameter. This is to ensure the API’s behaviour is correct when actual LeadSquared data is mapped to it in the live environment. To test the API –

  1. For each mail merge Input Test Data fields, provide a relevant sample value.
  2. Then, click Test and Map Response. This will automatically test the API and map the responses.

To make changes to the API, and to add or remove parameters, click Back to API Request.

LeadSquared Cloud Calling Connector

 

5.3 Response Mapping

To help LeadSquared make sense of the API response, map the response parameters as data, success, or errors. This will help the system identify success or error responses.

To configure and map the responses –

  1. To map a response, click the Add Mapping button.
  2. Under the Key and Value fields, enter relevant key-value responses.
    • To delete an existing Key-Value pair, against the corresponding pair, under Actions, click .
  3. Then, from the Mapping dropdown, select the correct outcome for that particular response. You can choose Consider as Success, Consider as Error or Consider as Data.
  4. To map additional responses, click the Add Mapping button.
  5. Once you’re done, click Save.
Note: Only APIs using JSON format are supported.

LeadSquared Cloud Calling Connector

 

6. Incoming Agent Pop-up

After the Click to Call API is set up, you must configure the Incoming Agent Pop-up API. This API is called when an incoming call is received on a user’s mobile device. It retrieves the lead’s mobile number from which the call is being made. Since only a virtual number is seen on the user’s (and lead’s) mobile phone when a call is being made, this API is necessary to help the user identify the lead who’s making the enquiry.

Below is an example of the sample API request and response –

  • Request (Method – GET) –
    https://providerapi/LeadSquared/PullAPI.php?apiKey=KKxxxxxxx&userName=demouser&agentPhoneNumber={{Agent_Number}}
  • Response – {"status":"success","customerNumber":"984xxxxxx","monitorUcid":"9179160xxxxx","callStartTime":"2020-xx-xx xx:xx:xx"}

The steps to configure the API, test the API and map the responses are the same as the steps for the Click to Call API. Please refer to the Click to Call Set-up section to carry out these steps.

 

7. List All DID Numbers

This API ensures that the user sees the Agent Pop-up only for calls received through the DID Number associated with their account. Since lead calls will be routed through the DID Number, the Agenet Pop-up will show up only for calls made by leads. This will prevent calls from non-leads, and other non-critical calls, from taking up your users time. This will also ensure that the API is deployed only for calls received from authorized DID/virtual numbers, and will reduce the overall load time, by not being deployed for calls being received from other numbers.

Below is an example of the sample API request and response –

  • Request (Method – GET) – https://providerapi/LeadSquare/DIDNumbers?apiKey=KKxxxxxxx
  • Response – {"status":"success","did_list":["984xxxxxx", "94544545XX"]}

The steps to configure the API, test the API and map the responses are the same as the steps for the Click to Call API. Please refer to the Click to Call Set-up section to carry out these steps.

 

8. Initiate Cloud Call

Once you’ve installed and configured the connector, your users can make and receive cloud calls. The following steps are uniform across Android and iOS devices.

  1. Open the LeadSquared mobile app, and navigate to the Leads screen.
  2. For the lead you want to call, tap on the lead, or swipe the lead card.
  3. On the Lead Details page, tap the icon, or tap the lead’s phone number.
  4. From the options, tap Cloud Call Lead, and wait for the call to initiate.
  5. Once the call is completed, the call details are available on the Activity History tab.

LeadSquared Cloud Calling Connector

Once the call is completed, an outbound call activity is created on the Lead Activity History screen.

LeadSquared Cloud Calling Connector

 

9. Set-Up for Ozonetel

Sample APIs for Ozonetel are listed below. To get the APIs, along with your “api_key” and “username”, please reach out to your Ozonetel support executive.

Before starting the API configuration, you must ensure the following two custom user fields are available on your LeadSquared account –

  • “Ozonetel Username”
  • “Virtual Number Campaign” (Ozonetel Campaign).

LeadSquared Cloud Calling Connector

Make a note of the schema names of the fields for the fields created (ie mx_Custom_9 and mx_Custom_8 in the above example). This would be required while configuring the Click2Call API. To know how to create user custom fields, see Manage User Custom Fields.

You find your Ozonetel Agent ID and Ozonetel Virtual Number, navigate to My Profile>Settings>Profile>My Profile.

LeadSquared Cloud Calling Connector

PropertyDescription
Ozonetel Agent IDThe Ozonetel Agent ID of the agent, that was used to log-in to the agent portal.
Ozonetel Virtual NumberThe Virtual Number/Campaign Name through which the cloud call will be initiated.
Note: The data in the Ozonetel Agent ID and Ozonetel Virtual Number fields have to be populated by an admin or a user for each agent who’s using the Mobile Cloud Calling functionality.

Connector Set-up

  1. Follow the steps listed in Installation, to set-up and install the connector.
  2. Select the user field which would be used as the “Campaign Name”, and click Save.
  3. Navigate to Click to Call Set-up.

 

1) Click2Call API Set-up

Navigate to Click2Call API Set-up screen to configure the Ozonetel Click2Call API. There are two methods by which you can configure the Ozonetel Click2Call API –

  • Agent Manual Dial API
    For Click2Call to work with Manual Dial API, you must be logged into your Ozonetel account, and the user status must be marked as “Ready”, and the user must be online, for the campaign used. If you don’t want the user to log-in to Ozonetel account, please refer to the Offline Ozonetel API set-up for more details.

LeadSquared Cloud Calling Connector

Method – GET

https://api1.cloudagent.in/CAServices/AgentManualDial.php?api_key=xxxxx&username=lead_squared&agentID=@{User:TelephonyAgentId,}&campaignName=@VirtualNumber&customerNumber=@CustomerNumber

ParameterDescriptionMapping
api_keyYour Ozonetel API key. To obtain this, please log in to your Ozonetel account, or reach out to your Ozonetel support executive.To add the API key, click , and type in the API key.
usernameThe username listed on your Ozonetel account.To add a username, click , and type in the username.
agentIDThe telephony agent ID of your LeadSquared user.Map the agentID to the user field that contains the Agent username, which in the example listed above is “@{User:mx_Custom_9}”.
campaignNameThe Ozonetel virtual DID number linked to your LeadSquared account.Map this variable to “@VirtualNumber”, which in turn picks up the campaignName from the user field (which is Ozonetel Virtual Number in the example listed above).
customerNumberThe customer’s (lead’s) phone number to which the virtual call is being placed.Map this variable to the “@CustomerNumber ” option. The phone number is passed with country code, in the “+91-XXXX” format, via this variable, when Click2Call is placed.

 

  • Phone Manual Dial API
    As an alternative, you can use the below API to place a call manually. Here, your user won’t be required to log in to their Ozonetel account. To enable this API for your account, please contact your Ozonetel Account representative for more details.

Method – GET

https://api1.cloudagent.in/CAServices/PhoneManualDial.php?apiKey=XXXXX&userName=XXXX&custNumber=XXXX&phoneName=XXX&did=XXXX

ParameterDescriptionMapping
api_keyYour Ozonetel API key. To obtain this, please log in to your Ozonetel account, or reach out to your Ozonetel support executive.To add the API key, click , and type in the API key.
usernameThe username listed on your Ozonetel account.To add a username, click , and type in the username.
didThe number from which calls are dialed out.Map this variable to “@VirtualNumber”, which in turn picks up the campaignName from the user field (which is Ozonetel Virtual Number in the example listed above).
phoneNameName of the offline agent to which Outbound calls are to be assignedMap the phoneName to the user field that contains the phoneName username, which is in the example listed above is “@{User:mx_Custom_10}”.
customerNumberThe customer’s (lead’s) phone number to which the virtual call is being placed.Map this variable to the “@CustomerNumber ” option. The phone number is passed with country code, in the “+91-XXXX” format, via this variable, when Click2Call is placed.

Notes:

  • You can use our Offline Click2call API (PhoneManual dial) in order to remove the need to log in to our toolbar/agent panel. This API triggers a call to Agent’s mobile number and customer number.
  • The callback URL will remain the same. Campaign=Offline is one of the key params we can observe in the logs.
  • Auto dialers can be set Offline from Admin and it dials to the agent’s mobile number configured in the Skill.
  • If a customer calls back, we can set up an Offline Inbound Campaign, and route the call to the available number in the Skill.

For more information, please refer to Ozonetel API Document.

 

Response Mapping for the Ozonetel Click2Call API –

LeadSquared Cloud Calling Connector

KeyValueMapping
NonJSONqueued successfullyConsider As Success

 

2) Incoming Agent Pop-up

Navigate to the Incoming Agent Pop-up screen to configure the Ozonetel Incoming Agent Pop-up API.

Method – GET

https://api1.cloudagent.in/CAServices/LeadSquare/PullAPI.php?userName=lead_squared&apiKey=xxxxx&agentPhoneNumber=@AssociatedPhoneNumberWithoutCountryCode

LeadSquared Cloud Calling Connector

ParameterDescriptionMapping
api_keyYour Ozonetel API key. To obtain this, please log in to your Ozonetel account, or reach out to your Ozonetel support executive.To add the API key, click , and type in the API key.
usernameThe username listed on your Ozonetel account.To add a username, click , and type in the username.
agentPhoneNumberThe LeadSquared user’s Ozonetel agent phone number.From the dropdown, map the agentPhoneNumber to the user field that contains the Agent phone number, which in the example listed above is “@AssociatedPhoneNumberWithoutCountryCode”.

 

Response Mapping for the Incoming Agent Pop-up API –

LeadSquared Cloud Calling Connector

KeyValueMapping
customerNumber“”Consider As Data
statussuccessConsider As Success
statuserrorConsider As Error

 

3) List All DID Numbers

Navigate to the List All DID Numbers screen to configure the Ozonetel List All DID Numbers API.

Method – GET

https://api1.cloudagent.in/CAServices/DID/RunningDIDs.php?userName=lead_squared&apiKey=xxxxx

LeadSquared Cloud Calling Connector

ParameterDescriptionMapping 
usernameThe username listed on your Ozonetel account.To add a username, click , and type in the username.
api_keyYour Ozonetel API key. To obtain this, please log in to your Ozonetel account, or reach out to your Ozonetel support executive.To add the API key, click , and type in the API key.

 

Response Mapping for the List All DID Numbers API –

LeadSquared Cloud Calling Connector

KeyValueMapping
statussuccessConsider As Success
data“”Consider As Data

Any Questions?

Did you find this article helpful? Please let us know any feedback you may have in the comments section below. We’d love to hear from you and help you out!

 

Was this Helpful?