1. Bicom Systems
  2. Solution home
  3. PBXware
  4. HOWTOs

CRM :: Zoho CRM

TABLE OF CONTENTS


Zoho Setup

The following document explains how to integrate Hubspot CRM with PBXware. 



A Zoho admin should create an API Client (Register application). To register the application, the admin should do the following:

  1. Go to the site: accounts.zoho.com/developerconsole


    -Click on Get Started:
  2. Click 'Add Client ID' and select the Server-base Applications
  3. Enter the 'Client Name', 'Domain', and 'Redirect URL'
  4. Click 'Create'
  5. Note down the 'Client ID'



After administrators populate everything, the CRM configuration on the PBXware should look like:


The 'Redirect URL' should be as follows: https://{PBX_IP_ADDRESS_OR_HOSTNAME}/{TENANT_NUMBER}/crmiservice/api/generate_tokens

NOTE: If the system is Call Center (CC), the TENANT_NUMBER is 1.


Configure the CRM Integration Service with the following options:

  • enable-button.png

Pressing the toggle button will enable or disable the service.

(E.g. On/Off)

  • CRM Type

Select one of the CRM services supported by PBXware.

(E.g. Zoho)

  • Page URL:

Enter a page URL

(E.g. https://crm.zoho.com/crm, https://crm.zoho.eu/crm, or https://crm.zoho.in/crm)

NOTE: Please note that the format of 'Page URL' may look different depending on the Data Center to which a certain Zoho instance belongs to. Users can check it from the URL on the homepage after logging in into their Zoho CRM account.

(E.g. If the URL is https://crm.zoho.eu/crm/org20073677472/tab/Home/begin, then the Page URL should be https://crm.zoho.eu/crm.)

  • Redirect URL:

Redirect URL entered in the Zoho API Client

  • Client ID:

Client ID obtained from the Zoho API Client

  • Client Secret:

Client Secret obtained from the Zoho API Client
.

Generate Tokens
-Log in to your CRM before starting: https://crm.zoho.com/

-Click on Generate Tokens

When setting the configuration in PBXware GUI for the first time, users have to click the “Generate Tokens” button.

This action will generate a Refresh Token which will later be used to generate Access tokens for users.

  • save-to-enable-button.png

'Save to enable' button will appear which indicates that a user has to populate all fields on the page and 'Save' settings.

  • test-button.png

After populating all fields and saving the settings, the 'Test' button will appear.

Upon clicking the button, users will be prompted to a different pop-up window where they can enter the CRM account information in order to test the configuration.

  • Username:

Provide the CRM account's username. This is the username of Zoho account, the email from Account section.

  • Password:

Provide the CRM account's password.

  • Caller ID:

Caller ID to search for a customer (optional).

  • Log Call:

Setting 'Log call' to 'Yes' will create a log inside CRM.

(E.g. Yes/No)

After providing all the necessary information, press 'Run' and the CRM Integration test will be started.


Log options

Users can enable the CRM default log options that each gloCOM instance is going to use. In addition, each gloCOM instance can set its own log options if needed.

The default log options are:

  • Log inbound calls

(E.g. Yes/No/Not Set)

  • Log outbound calls

(E.g. Yes/No/Not Set)

  • Log answered calls

(E.g. Yes/No/Not Set)

  • Log unanswered calls

(E.g. Yes/No/Not Set)

Upload Call Record

upload_call_record_crm_setup.png


This option controls whether the call record is uploaded after each call:

  • Yes: The call record will be uploaded to the CRM, as determined by the Default Call Record Type
    setting.
  • No: The call record will not be uploaded.
  • Not Set: No action is taken; the call record is not uploaded.


Default Call Record Type

default_call_record_type_crm.pngWhen Upload Call Record is set to "Yes," this setting defines how the record is accessed:

  • Recording File: The call recording file is uploaded to the CRM and can be found in the call details
    section. Users can download or play the record directly.
  • Link to Call Record: A link to the call record is provided.
    Users must click the link and log into their OSC (Online Self Care) to access the call record and call
    recording.

NOTE: Extension owners from the same tenant, even if they were not participants in the call, can click on the link and access the call record and call recording in their OSC. However, users from a different tenant will not be able to access the call record via the link.

These options allow users to manage how the call record is stored and accessed in their CRM.


CRM Behavior options

Users can tailor the creation of new Leads, Contacts, or Accounts based on the detection of caller ID information.

  • With 'Create a new item if it doesn't exist' enabled: If the caller ID is unknown, the system will initiate the creation page corresponding to the 'Default module' selected in the CRM settings. For instance, if 'Leads' is selected, the system will display a new Lead creation page.
  • With 'Create a new item if it doesn't exist' disabled: If the caller ID is unknown, the CRM remains inactive to avoid creating unnecessary records. However, if the caller ID is recognized, the system directly opens the page associated with the existing Lead, Contact, or Account.

This configuration allows users to customize the CRM's response to different caller ID scenarios, enhancing the efficiency of contact management and ensuring relevant data capture.

  • Default module
    zendesk_behavior_options_default.png


    Select one of the modules supported by CRM.
  • (E.g. Leads)

  • Create a new item if it doesn't exist:
    behavior_options_create_new_.png
  • (E.g. Yes/No/Not Set)



gloCOM Configuration

For the gloCOM setup, the username should be the e-mail address of the Zoho account. A password field can be left empty.


After successful integration, contacts should appear:


CRM integration within the application can be checked in CRM logs which are located under Tools -> Diagnostic logs -> CRM. 


Reported Zoho issues

Issue 1:
Zoho CRM Lead and Call Log generating

Issue with Zoho CRM where when a new lead is created through the GUI Test it is not being found in the subsequent test. Instead a new lead is generated with the same number.

Another issue reported is that when a Lead is created through the GUI or gloCOM application call, a subsequent call placed towards the lead is not being logged on the CRM side. Lead is found and popup is opened, but the call does not generate.

This issue is only relevant for case when ‘Behavior Options’ settings ‘Create a new item if it doesn't exist’ is set to ‘Yes’ . Problem is with /calllog endpoint for call logging on first call from unknown number when ‘new item’ gets created in CRM, gloCOM doesn’t send enough information so crmiservice fails, but, when second call arrives, contact already exists, so gloCOM gets enough data that will be sent to crmiservice later-on, so call log will work on second call anyways.


CRM Log:

2024-08-26 7:17:36 - DEBUG --> Route - POST  /calllog returns: {"id":null,"httpcode":"400","description":"Bad json payload"} 


Fixed in PBXware v7.4

Issue 2:

ZOHO integration issue


The problem is that the access token is only valid for one hour, causing it to expire every 60 minutes, requiring the generation of a new one.


2023-05-17 13:12:44 - INFO --> ZohoConnector - Connecting to Zoho CRM...

2023-05-17 13:12:44 - INFO --> ZohoConnector - Load data from database.

2023-05-17 13:12:44 - INFO --> ZohoConnector - Search Users

2023-05-17 13:12:45 - DEBUG --> ZohoConnector - https://www.zohoapis.com/crm/v2/users?type=ActiveUsers&page=1&per_page=200

2023-05-17 13:12:45 - ERROR --> ZohoConnector - Error: call to URL https://www.zohoapis.com/crm/v2/users?type=ActiveUsers&page=1&per_page=200 failed with status 401, response {"code":"INVALID_TOKEN","details":{},"message":"invalid oauth token","status":"error"}, curl_error

2023-05-17 13:12:45 - VARS --> string(47) "Error: There are no active users in the system."

2023-05-17 13:12:45 - VARS --> string(55) "Error: Couldn't find user with specified e-mail address"


Fixed in v6.7.6 and v7 versions



CRM log files and configuration

Log files for CRM service can be found on the following path: 

/opt/pbxware/pw/var/log/crmservice/crmservice.log
HTML

CRM logs are quite straightforward, and usually, they contain information about errors, and we can conclude are those errors on the PBXware or CRM side. 


Example:

2025-02-03 12:49:33 - DEBUG --> ZohoConnector - https://www.zohoapis.eu/crm/v2/users?type=ActiveUsers&page=1&per_page=200 

2025-02-03 12:49:33 - ERROR --> ZohoConnector - Error: call to URL https://www.zohoapis.eu/crm/v2/users?type=ActiveUsers&page=1&per_page=200 failed with status 401, response {"code":"INVALID_TOKEN","details":{},"message":"invalid oauth token","status":"error"}

  string(23) "https://crm.zoho.eu/crm"

2025-02-03 12:49:44 - DEBUG --> Route - GET  /crm returns: {"name":"Zoho","version":"14","url":"https:\/\/crm.zoho.eu\/crm"} 

  string(23) "https://crm.zoho.eu/crm"

    string(23) "https://crm.zoho.eu/crm"

    ["zohocodes":"ZohoConnector":private]=>

2025-02-03 12:49:44 - DEBUG --> ZohoConnector - https://www.zohoapis.eu/crm/v2/users?type=ActiveUsers&page=1&per_page=200 

2025-02-03 12:49:44 - ERROR --> ZohoConnector - Error: call to URL https://www.zohoapis.eu/crm/v2/users?type=ActiveUsers&page=1&per_page=200 failed with status 401, response {"code":"INVALID_TOKEN","details":{},"message":"invalid oauth token","status":"error"}


In this example, we can see the log and error output indicating issues with authentication and invalid tokens.


Also, the logging level for CRM could be increased, by editing the CRM configuration file: 

vim or nano /opt/pbxware/pw/etc/crmiservice/crmiservice.conf
HTML

Set CASHE_RESULTS=0 and LOG_LEVEL=1.