Feature Availability
Vtiger Editions: One Pilot | One Growth | One Professional | One Enterprise
To know more about feature limits, click here.
Introduction
Effective call management is essential for businesses to maintain seamless communication with their clients.
Vtiger CRM offers a powerful solution through its Generic Phone Calls API, enabling users to effortlessly handle incoming calls and update call records.
A Generic Phone Call API lets you add phone call features to your CRM. It offers methods to start, manage, and handle calls, like making or receiving calls, call controls (answering, hanging up), call recording, accessing call details and updating call records.
You can use Postman to send Generic Phone calls API requests. But before that, you must configure a Generic gateway in the Phone Configuration in the CRM settings.
Benefits
The following are the benefits of using Generic Phone call APIs:
- Simplifies adding phone call features to CRM systems, reducing development time.
- Customizable solution adaptable to CRM workflows and requirements.
- Handles large call volumes within CRM environments efficiently.
- Reduces development and maintenance costs compared to custom CRM call solutions.
In this article, you will learn about:
- Configuring phone settings
- Sending requests from Postman
- Request examples.
Key Terminology
| Key Term | Definition |
| Phone Gateway | A phone gateway is a feature in Vtiger CRM that facilitates communication by integrating telephony services. |
| Postman | Postman is a popular API development tool used for testing, documenting, and sharing APIs. |
| API | Application Programming Interface (API) is a set of rules and protocols that allows different software applications to communicate with each other. |
| Endpoint | In the context of web services and APIs, an endpoint is a specific URL that represents a resource or service provided by a server. |
| UUID | A universally unique identifier (UUID) is a 128-bit identifier standard used in software development to uniquely identify information or entities without requiring centralized coordination. |
Configuring Phone Settings
Follow these steps to configure the Generic gateway for phone calls:
- Log in to the CRM.
- Click the User Menu in the top-right corner of the screen.
- Click Settings. The Settings page opens.
- Select Phone Configuration under Extensions.
- Click Add Gateway.
- Select Generic from the drop-down.
- Enter or select the following details:
- Gateway: Select the required gateway from the available gateway list.
- Gateway Status: Choose the status to enable or disable the selected gateway.
- Label: Enter a name or label to identify the gateway easily.
- Default Gateway: Select to set the selected gateway as the default gateway.
- Vtiger Secret Key: Copy and paste the Vtiger Secret Key into a notepad.
- Click Save.
Sending a Request From Postman
Once you configure a Generic gateway for phone calls, you must send a request from Postman to create or update Phone call records.
Follow these steps to send a request from Postman to your Vtiger instance:
- Log in to your Postman account.
- Click Send an API Request.
- Select the POST method from the drop-down.
- Enter the Endpoint as follows - (https://your_vtiger_domain/modules/PhoneCalls/callbacks/Generic.php)
- Click the Header tab.
- Enter or select information for the following -
- Key: Enter the key as (X-VTIGER-SECRET).
- Value: Paste the copied Vtiger Secret Key.
- Click the Params tab.
- Enter the required parameters depending on the request. Refer to the Request examples in the next section.
- Click Send.
Request Examples
The following are the request examples to perform certain actions during a phone call to update the Phone call record.
Call Initiation
To initiate a call, send the request with the following parameters:
| Parameter | Description |
| from | The number from which the call has come. |
| to | The number to which the call has come. |
| event | call_initiated |
| call_id | This will be stored in the source UUID and later help in updating the call record. |
| direction | inbound |
If the number of the inbound call matches a contact's number in the Office Phone Number field, then the phone call record is created for the contact.
Call Connected
If a call is initiated and you want to update the Status field of the call as In progress and update Handled By field, you can send the request with the following parameters.
| Parameter | Description |
| from | The number from which the call has come. |
| to | The number to which the call has come, the system will search the Users module to find the user having this number in the Office Phone field. |
| event | call_connected |
| call_id | UUID of the phone call record |
This request will find existing phone call records using the Call ID, update the Status as In Progress, and update the Handled by field using the number in the To field.
Call Recording
If you want to update the call recording link in a phone call record, then send a request with the following parameters.
| Parameter | Description |
| call_id | UUID of the phone call record |
| recordingurl | Specify the URL of the recording |
| event | call_recording |
Call Transfer
If a call is transferred from one user to another and you want to update the Handled By field in a phone call record of the contact who received the call, then send the request with the following parameters:
| Parameter | Description |
| event | call_transfer |
| call_id | UUID of the phone call record |
| transferred_number | Pass the number of the user who picked up the call after the transfer |
Call Status Update
After a call is completed and the status needs to be updated, send a request with the following parameters:
| Parameter | Description |
| event | call_hangup |
| call_id | UUID of the phone call record |
| hangup_reason | no_answer or busy or completed or any other Value |
To update a phone call record based on the Hang up Reason field, send a request with the following parameters:
| Parameter | Description |
| hangup_reason | Call status |
| no_answer | hangup |
| busy | busy |
| completed | completed |
| any_other_state | any_other_state |
References