ZOHO integration guide not working

Status
Not open for further replies.

HopelessNoob

Free User
Joined
Nov 28, 2020
Messages
3
Reaction score
0
Hello. Followed this integration guide https://www.3cx.com/docs/pbx-crm-integration-zoho/
and it's not working in my case.

entering the number that I created in a test contact an here's the output:

Started scenario with empty id
Started Auth
Request text: https://accounts.zoho.com/oauth/v2/token
Request form value refresh_token set to 1000.bcbd8dfd3f7d7ff4c0c70cd4a76a4616.34ed6d72d2ccf74caca079864cf618fa
Request form value grant_type set to refresh_token
Request form value client_id set to 1000.R9S2WIYK2JEM98JIWF6JOSECOIQTLE
Request form value client_secret set to 74ca68f1aabb0dfb58d4d4fae929b0cb0680639757
Response text: {"access_token":"1000.c93a9a3145e01b9b1e916ae4b7268e78.cc0c8eb9590333dc37fdfea895b3c344","api_domain":"https://www.zohoapis.com","token_type":"Bearer","expires_in":3600}
Response finished
Variable AccessToken set to 1000.c93a9a3145e01b9b1e916ae4b7268e78.cc0c8eb9590333dc37fdfea895b3c344
Variable ApiDomain set to https://www.zohoapis.com
Finished Auth
Request text: https://www.zohoapis.com/crm/v2/Contacts/search?criteria=((Phone:equals:111) or (Mobile:equals:111) or (Home_Phone:equals:111) or (Other_Phone:equals:111) or (Fax:equals:111))&fields=Account_Name,id,First_Name,Last_Name,Phone,Mobile,Home_Phone,Asst_Phone,Other_Phone,Email,Fax
System.Exception: Server returned a non successful status code - HTTPStatusCode=BadRequest - Reason= - Content={"code":"INVALID_QUERY","details":{"reason":"the field is not available for search","api_name":"Home_Phone"},"message":"invalid query formed","status":"error"}

at CrmIntegration.ScenarioProcessorBase.ProcessRequest(ScenarioRequest request, IValueManager customManager, HttpClient client, CancellationToken token)
at CrmIntegration.ScenarioProcessorBase.ProcessScenario(ProtocolScenario scenario, IValueManager customManager, CancellationToken token)
at CrmIntegration.ScenarioProcessorBase.Execute(ProtocolScenario scenario, CancellationToken token)
at CrmIntegration.CrmProcessor.GetContactInfoFromCrm(String contactNumber, String destinationEmail, Boolean createIfNotFound, CancellationToken token)

Please help. Need to integrate our 3CX with zoho to make calls from crm :D
 
Your Contact object in Zoho is missing fields.

JSON:
{"reason":"the field is not available for search","api_name":"Home_Phone"}
 
Please help. Need to integrate our 3CX with zoho to make calls from crm :D
That can be done easily with the browser extension. The CRM integration just takes care of finding contacts/leads/accounts and log the calls.
 
Still not working.

Added the field to contact and the problem still remains

As I understood from your previous post - I can't directly call from CRM, right?
 
if it's not working, just delete the API client you've created and make a new one so there's no confusion. Also note that Zoho changed their API setup recently but I think you're ok with OAuth2

Set it up again and let us know what stage you get to and what errors you see if any...
 
Let's clarify something first. As @Frederick Marcoux explained, the CRM integration you're trying to configure will not provide outbound call functionality. This integration will basically do the following:
1) When you receive an inbound call from an external number, it will search the caller number in Zoho.
2) If a contact/lead/account is found, the link will be passed on to the Web Client, so it can popup the contact record on the agent's PC. If the number doesn't exist, the integration can automatically create a new contact for you.
3) When the call ends, a new activity will be created on the contact's record with the details of the call.

If you want to make calls from Zoho, you should use the click to call browser extensions:
https://www.3cx.com/phone-system/click-to-call/

This is independent from the integration described above. So if you just need to make calls, use the extension, no need to configure the integration at all.
 
Here is the second try. Sorry, I cant read and understand the api so i'll paste the whole message.

@edossantos if only the incoming call and the lookup will work - that will be at least something for us than nothing.

being able not to call directly from zoho, instead from extension is a disadvantage, but not so critical for now.

Here is the test result


Started scenario with empty id
Started Auth
Request text: https://accounts.zoho.com/oauth/v2/token
Request form value refresh_token set to 1000.2bb772f41b51e7157de0bc09c8e6484e.87758142563c420c27c920b698d8553d
Request form value grant_type set to refresh_token
Request form value client_id set to 1000.BGACEPVQQGGLZMMVA6QMJXFZJGX9IF
Request form value client_secret set to f3b128d1620b62bbd4e28e6d10ac60911787fada57
Response text: {"access_token":"1000.1345ea04624d186ac7cc9e408b3f19c4.2e558625a94c539d87a32c2faff9a852","api_domain":"https://www.zohoapis.com","token_type":"Bearer","expires_in":3600}
Response finished
Variable AccessToken set to 1000.1345ea04624d186ac7cc9e408b3f19c4.2e558625a94c539d87a32c2faff9a852
Variable ApiDomain set to https://www.zohoapis.com
Finished Auth
Request text: https://www.zohoapis.com/crm/v2/Contacts/search?criteria=((Phone:equals:111) or (Mobile:equals:111) or (Home_Phone:equals:111) or (Other_Phone:equals:111) or (Fax:equals:111))&fields=Account_Name,id,First_Name,Last_Name,Phone,Mobile,Home_Phone,Asst_Phone,Other_Phone,Email,Fax
System.Exception: Server returned a non successful status code - HTTPStatusCode=BadRequest - Reason= - Content={"code":"INVALID_QUERY","details":{"reason":"the field is not available for search","api_name":"Home_Phone"},"message":"invalid query formed","status":"error"}

at CrmIntegration.ScenarioProcessorBase.ProcessRequest(ScenarioRequest request, IValueManager customManager, HttpClient client, CancellationToken token)
at CrmIntegration.ScenarioProcessorBase.ProcessScenario(ProtocolScenario scenario, IValueManager customManager, CancellationToken token)
at CrmIntegration.ScenarioProcessorBase.Execute(ProtocolScenario scenario, CancellationToken token)
at CrmIntegration.CrmProcessor.GetContactInfoFromCrm(String contactNumber, String destinationEmail, Boolean createIfNotFound, CancellationToken token)
 
This is the error you're getting:
{"code":"INVALID_QUERY","details":{"reason":"the field is not available for search","api_name":"Home_Phone"},"message":"invalid query formed","status":"error"}

That means that you have a hidden field (Home_Phone) that you need to make visible for Contacts. Please check this article about how to proceed:
https://help.zoho.com/portal/kb/articles/how-to-show-or-hide-fields-in-zoho-crm

Important: please delete your Client ID from Zoho, and create a new one for further testing, because you pasted here the refresh token and access token. With that information, anyone can access your account.
 
Status
Not open for further replies.