Introduction: #
Since the Leadrat CRM is used for data management, lead management and client relationship management, so in order to contact leads and initiate sales we need to configure IVR service to CRM so that calls can be initiated and received easily. To enable this functionality, it’s essential to integrate IVR services with the CRM via API
The integration with Service Providers facilitates seamless data exchange and transfer, enhances automation, and enables the business to extend the capabilities of the CRM. By using API, business can automate processes, synchronize data, and enhance their operational efficiency.
Prerequisites: #
- Log in to the CRM using the provided credentials.
- Ensure that the user has Admin access rights to initiate the API integration process.
- Access global configuration settings within the CRM interface.
Integration Procedure for Inbound IVR: #
- Obtain the API documentation from the service provider containing the inbound details i.e. payload parameters, method type, etc.
- Navigate to Global Config and select the IVR option for API integration.
- Click on “Add” to create a new IVR account.
- Select “Inbound” to specify that this configuration handles inbound call data.
- Service Provider Name: Enter the name of the service provider.
- Account Name: Enter a unique name for the inbound account in the CRM.
- Enable the virtual number option to add virtual numbers. Multiple virtual numbers can be associated with an account.
- Agency name and project can be assigned based on the virtual number.
- Choose the Payload method type according to the service provider’s guidelines, the way they will send call log information to our API.
a. GET Method:
Data sent as URL parameters.
b. POST Method:
Data sent in the body of the HTTP request, keeping parameters hidden from the URL.
10. Choose the Payload content type as specified by the service provider,
a. form-data
b. application/json
c. x-www-form-urlencoded
11.Specify the required Payload mapping according to the parameters that will be sent by the service provider for inbound calls:
"customermobilenumber": "#CustomerNumber#",
"virtualnumber": "#VirtualNumber#",
"agentnumber": "#AgentNumber#",
"timestamp of when call was started": "#StartStamp#",
"timestamp of when call was answered": "#AnswerStamp#",
"timestamp of when call was ended": "#EndStamp#",
"hang-upcause": "#HangupCause#",
"billsec": "#BillSec#",
"digitsdialed": "#DigitsDialed#",
"direction": "#Direction#",
"duration": "#Duration#",
"ivrduration": "#IvrDuration#",
"agentname": "#AgentName",
"callrecording": "#CallRecordingURL#",
"callstatus": "#CallStatus#",
"callid": "#CallId#",
"currenttime": "#CurrentTime#",
"sixteendigitid": "#NewSixteenDigitUniqueId#",
"useremail": "#UserEmail#"
Note: call id and customer number are required parameters.
14. Enable the option to include API key in the header, if it can be included in the request header.
15. Enable the option Set Primary to make this account primary to handle all inbound requests.
16. Click the “Download” button to automatically download an Excel file containing API information.
17. After integrating the inbound mapping, the excel file will be shared with the service providers to add it to their webhook.
18. Once the service provider successfully completes the integration on their end, leads will be automatically added/updated to the CRM.
API Details: #
The API details include:
A sample curl command for making HTTP POST Requ
curl --location --request POST https://connect.leadrat.com/api/v1/integration/IVR/common/body/test5 -H "API-Key: ZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" -H "Content-Type: application/json" -d '{
"customermobilenumber": "#CustomerNumber#",
"virtualnumber": "#VirtualNumber#",
"agentnumber": "#AgentNumber#",
"timestamp of when call was started": "#StartStamp#",
"timestamp of when call was answered": "#AnswerStamp#",
"timestamp of when call was ended": "#EndStamp#",
"hang-upcause": "#HangupCause#",
"billsec": "#BillSec#",
"digitsdialed": "#DigitsDialed#",
"direction": "#Direction#",
"duration": "#Duration#",
"ivrduration": "#IvrDuration#",
"agentname": "#AgentName",
"callrecording": "#CallRecordingURL#",
"callstatus": "#CallStatus#",
"callid": "#CallId#",
"currenttime": "#CurrentTime#",
"sixteendigitid": "#NewSixteenDigitUniqueId#",
"useremail": "#UserEmail#"
}'
- Integration manual for reference.
CRM Integration doc for reference
- Authentication type
API Key
- Success and failure response messages.
Failure: 400 Bad Request
Success:
{
"succeeded": true,
"message": null,
"errors": null,
"data": true
}
- CRM name
Leadrat
Integration Procedure for Inbound+Outbound IVR: #
Outbound: #
Obtain the API documentation from the service provider containing the inbound details.
2. Map all parameters received from the service provider’s API to the corresponding fields in the CRM.
3. Navigate to Global Config and select the IVR option for API integration.
4. Click on “Add” to create a new IVR account within the CRM interface.
5. Select “Inbound” to specify that this configuration handles inbound calls data.
6. Service Provider Name: Enter the name of the service provider.
7. Account Name: Enter a unique name for the inbound account in the CRM.
8. Enable the virtual number option to add the virtual number.
9. Agency name, project, and location are assigned based on the virtual number.
10. All agency-specific calls are assigned to a virtual number so that all qualified leads by agency are routed to CRM.
11. Choose the Payload method type according to the service provider’s guidelines, the way they want to share the data,
a. GET Method: Data sent as URL parameters
.
b. POST Method: Data sent in the body of the HTTP request, keeping parameters hidden from the URL.
12. Choose the Payload content type as specified by the service provider,
a. form-data
b. application/json
c. x-www-form-urlencoded
13. Specify the required Payload mapping for which the data is to be shared by the service provider’s integration account.:
customermobilenumber": "#CustomerNumber#",
"virtualnumber": "#VirtualNumber#",
"agentnumber": "#AgentNumber#",
"timestamp of when call was started": "#StartStamp#",
"timestamp of when call was answered": "#AnswerStamp#",
"timestamp of when call was ended": "#EndStamp#",
"hang-upcause": "#HangupCause#",
"billsec": "#BillSec#",
"digitsdialed": "#DigitsDialed#",
"direction": "#inbound#",
"duration": "#Duration#",
"ivrduration": "#IvrDuration#",
"agentname": "#AgentName",
"callrecording": "#CallRecordingURL#",
"callstatus": "#CallStatus#",
"callid": "#CallId#",
"currenttime": "#CurrentTime#",
"sixteendigitid": "#NewSixteenDigitUniqueId#",
"useremail": "#UserEmail#"
Note: Mandatory payloads are call id and customer number.
Payload mapping will be same for Inbound and outbound.
14. If required, enable the option to include the API key in the header.
15. If the account is set Primary, all inbound calls will directed to it.
16. Click the “Download” button to automatically download an Excel file containing API information.
Configuration for making Outbound calls: #
17. Choose the Payload method type according to the service provider’s guidelines, the way they want to share the data for outbound,
a. GET Method: Data sent as URL parameters.
b. POST Method: Data sent in the body of the HTTP request, keeping parameters hidden from the URL.
18. Choose the Payload content type as specified by the service provider for outbound,
a. form-data
b. application/json
c. x-www-form-urlencoded
19. Enter the Base URL of the API and resource endpoint.
20. The query parameters required for initiating the outbound call (If required),
a. Customer Number: Customermobilenumber.
b. Customer Name: Customer name.
c. Virtual Number:
Virtual Number (If required).
21. Add any Header Variables required by the API:
Example: Authorization: Bearer <API_KEY>
22. The body variables required for initiating the outbound call (if required),
a. Customer Number:
customerMobileNumber.
b. Customer Name:
customerName.
c.
Virtual Number:
virtualNumber (If required).
23. To Set this account Primary, please check the box “Set as Primary”.
24. Click on the “Download” button to automatically download an Excel file containing API information.
25. After integrating the inbound and outbound mapping, the excel file will be shared with the service providers to merge API in their webhook.
26. Once the service provider completes the integration on their end, agents will be able to initiate a call and the call information i.e. call recording, will get added to the CRM