...
The Ringotel integration for CRM follows the workflow outlined below:
Authentication
Authentications can be based on the OAuth 2.0 Web Server Flow using the client_id and client_secret. Alternatively, Basic or Bearer authentication can be used.
...
Code Block | ||
---|---|---|
| ||
"auth": { "type": "Basic", "username": "$Username$", "password": "$Password$" }, |
API
The API object defines the requests (“hooks“) that are triggered at different stages of the workflow.
Users
Provides the list of CRM users to map with the Ringotel users. Each user needs to have unique identifier (ID).
...
Code Block | ||
---|---|---|
| ||
"Users": { "request_method": "GET", "request_path": "/query?q=SELECT Id,FirstName,LastName,Email,Phone FROM User", "response_map": { "records": [ { "Id": "$user_id$", "FirstName": "$firstname$", "LastName": "$lastname$", "Email": "$email$", "Phone": "$phone$" } ] } } |
...
Contacts
Returns the list of contacts and their properties.
...
Code Block | ||
---|---|---|
| ||
"Contacts": { "request_method": "GET", "request_path": "/query?q=SELECT Id,FirstName,LastName,Email,Phone,Account.Name,MobilePhone,Title FROM Contact", "response_map": { "records": [ { "Id": "$contact_id$", "FirstName": "$firstname$", "LastName": "$lastname$", "Email": "$email$", "Phone": "$phone$", "MobilePhone": "$mobile$", "Account":{ "Name":"$company_name$" }, "Title": "$job_title$" } ] } } |
Organizations
Returns the list of accounts and their properties.
...
Code Block | ||
---|---|---|
| ||
"Organizations": { "request_method": "GET", "request_path": "/query?q=SELECT Id, Name FROM Account", "response_map": { "records": [ { "Id": "$company_id$", "Name":"$company_name$" } ] } } |
FindContact
Is used to identify caller on incoming/outgoing call. Must return a specific contact identified by the phone number.
...
Code Block | ||
---|---|---|
| ||
"FindContact": { "request_method": "GET", "request_path": "/query?q=SELECT Id,FirstName,LastName,Email,Phone,Account.Name,MobilePhone,Title FROM Contact WHERE Phone LIKE '%$phone$' OR MobilePhone LIKE '%$phone$'", "response_map": { "records": [ { "Id": "$contact_id$", "FirstName": "$firstname$", "LastName": "$lastname$", "Email": "$email$", "Phone": "$phone$", "MobilePhone": "$mobile$", "Account":{ "Name":"$company_name$" }, "Title": "$job_title$" } ] } } |
CreateContact
Creates a new contact with properties.
...
Code Block | ||
---|---|---|
| ||
"CreateContact": { "request_method": "POST", "request_path": "/sobjects/Contact", "request_parameters": { "FirstName": "$firstname$", "LastName": "$lastname$ ", "Email": "$email$", "Phone": "$phone$", "AccountId": "$company$" }, "response_map": { "id": "$contact_id$" } } |
UpdateContact
Updates a specific contact identified by ID with the new properties.
...
Code Block | ||
---|---|---|
| ||
"UpdateContact": { "request_method": "PATCH", "request_path": "/sobjects/Contact/$contact_id$", "request_parameters": { "FirstName": "$firstname$", "LastName": "$lastname$", "Email": "$email$", "Phone": "$phone$", "AccountId": "$company$" }, "response_map": { "id": "$contact_id$" } } |
CreateActivity
Creates a new call activity with its properties.
...
Code Block | ||
---|---|---|
| ||
"CreateActivity": { "request_method": "POST", "request_path": "/sobjects/Task/", "request_parameters": { "Subject":"$call_title$", "OwnerId":"$user_id$", "WhoId":"$contact_id$", "CallType":"$activity_type$" }, "response_map": { "id": "$activity_id$" } } |
UpdateActivity
Updates CRM activity identified by activity ID.
...
Code Block | ||
---|---|---|
| ||
"UpdateActivity": { "request_method": "PATCH", "request_path": "/sobjects/Task/$activity_id$", "request_parameters": { "Subject": "$subject$", "Description": "$comment$" } } |
StopCallActivity
Changes the status of a specific activity (identified by activity ID).
...
Code Block | ||
---|---|---|
| ||
"StopCallActivity": { "request_method": "PATCH", "request_path": "/sobjects/Task/$activity_id$", "request_parameters": { "Status":"Completed", "CallDurationInSeconds": "$call_duration_millis$" } } |
UpdateCallRecording
Uploads and attaches a call recording file to a specific activity (identified by ID).
...