Zoho CRM not creating contacts or leads

Status
Not open for further replies.

SethTalley

Customer
Basic Certified
Joined
Oct 5, 2019
Messages
83
Reaction score
12
Trying out Zoho - all we really need is call journaling and that seems to be the simplest way to do it. I'm not a clever man but the instructions given so far have been easy to follow.

The issue I have right now, however, is that while Zoho absolutely fires up a tab for journaling if the contact already exists within Zoho, I cannot get Zoho to create a contact. If the caller is not within Zoho already the web client behaves as normal but Zoho isn't triggered. The "enable contact creation" box is definitely checked. If I create a contact and delete it, Zoho gives me "
This action cannot be performed.The record you are trying to access has been deleted. To restore access, remove the record from the Recycle Bin. If I empty the recycle bin, it says "The record you are trying to access is not available. This could be because, You may not have sufficient access permissions for the record. The record may have been deleted from Zoho CRM." I'm getting the same results with Firefox and Chrome.

Here's what's generated if the contact is within Zoho:

01/19/2020 5:24:43 PM - Updating device Dev(2100357141):[sip:[email protected]:5483;rinstance=550176a77c990f30 / SP4] by message: DevUpd Recv Req REGISTER from 127.0.0.1:5483 tid=b0daf8471c603612 Call-ID=zgT2Z50ST4wBOxIiDDuLTw..: REGISTER sip:127.0.0.1:5060 SIP/2.0 Via: SIP/2.0/UDP 127.0.0.1:5483;branch=z9hG4bK-524287-1---b0daf8471c603612;rport=5483 Max-Forwards: 70 Contact: <sip:[email protected]:5483;rinstance=550176a77c990f30> To: "SPSP4:"<sip:[email protected]:5060> From: "SPSP4:"<sip:[email protected]:5060>;tag=38ead62f Call-ID: zgT2Z50ST4wBOxIiDDuLTw.. CSeq: 20704 REGISTER Expires: 300 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO, MESSAGE Proxy-Authorization: Digest username="SP4",realm="3CXPhoneSystem",nonce="NONCE",uri="sip:127.0.0.1:5060",response="RESPONSE",algorithm=MD5 Supported: replaces User-Agent: 3CX Parking Orbit Content-Length: 0

Here's what's generated if the contact isn't within Zoho:

01/19/2020 5:19:39 PM - Updating device Dev(1701515428):[sip:[email protected]:5063;rinstance=1e6d537ac064e563 / 90000] by message: DevUpd Recv Req REGISTER from 127.0.0.1:5063 tid=1c1ca802428c7471 Call-ID=JEFhQ0x0Dxyf5hxTQynZsw..: REGISTER sip:127.0.0.1:5060 SIP/2.0 Via: SIP/2.0/UDP 127.0.0.1:5063;branch=z9hG4bK-524287-1---1c1ca802428c7471;rport=5063 Max-Forwards: 70 Contact: <sip:[email protected]:5063;rinstance=1e6d537ac064e563> To: <sip:[email protected]:5060> From: <sip:[email protected]:5060>;tag=83a2825a Call-ID: JEFhQ0x0Dxyf5hxTQynZsw.. CSeq: 102534 REGISTER Expires: 60 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO, MESSAGE Proxy-Authorization: Digest username="90000",realm="3CXPhoneSystem",nonce="NONCE",uri="sip:127.0.0.1:5060",response="RESPONSE",algorithm=MD5 Supported: replaces User-Agent: 3CX WebRTC proxy Content-Length: 0


To me, it appears that the difference is “Username” and “replaces User-Agent”, all else being the same.

When I use the test field within the CRM integration, if the contact is in the system, I get:
[
{
"UnparsedOutputs": {
"ContactUrl": "https://crm.zoho.com/crm/EntityInfo.do?module=Contacts&id=ID",
"FirstName": "FIRSTNAME",
"LastName": "LASTNAME",
"Email": "",
"PhoneBusiness": "XXXXXXXXXX",
"PhoneBusiness2": "",
"PhoneHome": "",
"PhoneOther": "",
"PhoneMobile": "",
"FaxBusiness": "",
"CompanyName": "",
"EntityType": "Contacts",
"EntityId": "ID",
"FullName": "FIRSTNAME LASTNAME"
},
"FirstName": "FIRSTNAME",
"LastName": "LASTNAME",
"Email": "",
"ContactUrl": "https://crm.zoho.com/crm/EntityInfo.do?module=Contacts&id=ID",
"CompanyName": "",
"PhotoUrl": null,
"ContactType": 0,
"PhoneBusiness": "XXXXXXXXXX",
"PhoneBusiness2": "",
"PhoneHome": "",
"PhoneHome2": null,
"PhoneMobile": "",
"PhoneMobile2": null,
"PhoneOther": "",
"FaxBusiness": "",
"FaxHome": null,
"Pager": null
}
]

Started scenario with empty id
Started Auth
Request text: https://accounts.zoho.com/oauth/v2/token
Request form value refresh_token set to TOKEN
Request form value grant_type set to refresh_token
Request form value client_id set to TOKEN
Request form value client_secret set to SECRET
Response text: {"access_token":"TOKEN","api_domain":"https://www.zohoapis.com","token_type":"Bearer","expires_in":3600}
Response finished
Variable AccessToken set to TOKEN
Variable ApiDomain set to https://www.zohoapis.com
Finished Auth
Request text: https://www.zohoapis.com/crm/v2/Contacts/search?criteria=((Phone:equals:XXXXXX) or (Mobile:equals:XXXXXX) or (Home_Phone:equals:XXXXXX) or (Other_Phone:equals:XXXXXX) or (Fax:equals:XXXXXX))&fields=Account_Name,id,First_Name,Last_Name,Phone,Mobile,Home_Phone,Asst_Phone,Other_Phone,Email,Fax
Response text: {"data":[{"First_Name”:”FIRSTNAME”,”Home_Phone":null,"Asst_Phone":null,"Email":null,"Last_Name”:”LASTNAME”,”Phone”:”XXXXXXXXXX,”Other_Phone":null,"id":"ID","Fax":null,"Mobile":null}],"info":{"per_page":200,"count":1,"page":1,"more_records":false}}
Response finished
Variable Id set to ID
Variable FirstName set to FIRSTNAME
Variable LastName set to LASTNAME
Variable Email set to
Variable Phone set to XXXXXXXXXX
Variable HomePhone set to
Variable OtherPhone set to
Variable MobilePhone set to
Variable Fax set to
Variable AssistantPhone set to
Variable AccountName set to
Finished scenario with empty id
Started scenario with empty id
Response finished
Finished scenario with empty id
Started scenario with empty id
Response finished
Finished scenario with empty id
Result obtained


When I use the CRM test for a number that isn't within Zoho, I get:

Server returned a non successful status code - HTTPStatusCode=BadRequest - Reason= - Content={"code":"INVALID_MODULE","details":{},"message":"the module name given seems to be invalid","status":"error"}

Started scenario with empty id
Started Auth
Request text: https://accounts.zoho.com/oauth/v2/token
Request form value refresh_token set to TOKEN
Request form value grant_type set to refresh_token
Request form value client_id set to ID
Request form value client_secret set to SECRET
Response text: {"access_token":"TOKEN","api_domain":"https://www.zohoapis.com","token_type":"Bearer","expires_in":3600}
Response finished
Variable AccessToken set to TOKEN
Variable ApiDomain set to https://www.zohoapis.com
Finished Auth
Request text: https://www.zohoapis.com/crm/v2/Contacts/search?criteria=((Phone:equals:666666) or (Mobile:equals:666666) or (Home_Phone:equals:666666) or (Other_Phone:equals:666666) or (Fax:equals:666666))&fields=Account_Name,id,First_Name,Last_Name,Phone,Mobile,Home_Phone,Asst_Phone,Other_Phone,Email,Fax
Response text:
Response finished
Finished scenario with empty id
Started scenario with empty id
Request text: https://www.zohoapis.com/crm/v2/Leads/search?criteria=((Phone:equals:666666) or (Mobile:equals:666666) or (Fax:equals:666666))&fields=id,First_Name,Last_Name,Phone,Mobile,Fax,Email,Company
Response text:
Response finished
Finished scenario with empty id
Started scenario with empty id
Request text: https://www.zohoapis.com/crm/v2/Accounts/search?criteria=((Phone:equals:666666) or (Fax:equals:666666))&fields=id,Phone,Fax,Account_Name
System.Exception: Server returned a non successful status code - HTTPStatusCode=BadRequest - Reason= - Content={"code":"INVALID_MODULE","details":{},"message":"the module name given seems to be invalid","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)



What else can I provide to help diagnose this issue? It would be supadope to get this working. Apologies if this was too verbose.
 
Request text: https://www.zohoapis.com/crm/v2/Accounts/search?criteria=((Phone:equals:666666) or (Fax:equals:666666))&fields=id,Phone,Fax,Account_Name
System.Exception: Server returned a non successful status code - HTTPStatusCode=BadRequest - Reason= - Content={"code":"INVALID_MODULE","details":{},"message":"the module name given seems to be invalid","status":"error"}
It seems that your Zoho account somehow has disabed the Accounts module, because the error happens when 3CX tries to query it. As a result, the lookup fails, but the contact creation is aborted due to this error. You need to make that module accessible, so the query succeeds, even if it doesn't return any data, and then the contact creation should work.
 
Thanks for your prompt response, Ernesto. You're right - I had disabled the Accounts module from the top bar because Zoho made it clear that I wasn't actually getting rid of that stuff, just making it invisible. Per another comment of yours on here I had already restored Leads but clearly it needed more. May I suggest that you update your Zoho CRM instructions to reflect the modules necessary? I'm likely not the first person fumbling around with a CRM for the first time.

I restored accounts and I wish I could say that everything was working now, but instead 3CX no longer passes anything along to Zoho.

CONTACT IN ZOHO

Code:
Unable to parse expression: Contact[].

Started scenario with empty id
Started Auth
Request text: https://accounts.zoho.com/oauth/v2/token
Request form value refresh_token set to 1000.XXXXX
Request form value grant_type set to refresh_token
Request form value client_id set to 1000.XXXXXXXXXXXXXXXXXXX
Request form value client_secret set to XXXXXXXXX
Response text: {"access_token":"1000.XXXXX","api_domain":"https://www.zohoapis.com","token_type":"Bearer","expires_in":3600}
Response finished
Variable AccessToken set to 1000.XXXXXXX
Variable ApiDomain set to https://www.zohoapis.com
Finished Auth
Request text: https://www.zohoapis.com/crm/v2/Contacts/search?criteria=((Phone:equals:551234) or (Mobile:equals:551234) or (Home_Phone:equals:551234) or (Other_Phone:equals:551234) or (Fax:equals:551234))&fields=Account_Name,id,First_Name,Last_Name,Phone,Mobile,Home_Phone,Asst_Phone,Other_Phone,Email,Fax
Response text:
Response finished
Finished scenario with empty id
Started scenario with empty id
Request text: https://www.zohoapis.com/crm/v2/Leads/search?criteria=((Phone:equals:551234) or (Mobile:equals:551234) or (Fax:equals:551234))&fields=id,First_Name,Last_Name,Phone,Mobile,Fax,Email,Company
Response text:
Response finished
Finished scenario with empty id
Started scenario with empty id
Request text: https://www.zohoapis.com/crm/v2/Accounts/search?criteria=((Phone:equals:551234) or (Fax:equals:551234))&fields=id,Phone,Fax,Account_Name
Response text:
Response finished
Finished scenario with empty id
Started CreateContactRecord
Request text: https://www.zohoapis.com/crm/v2/Contacts
System.Exception: Unable to parse expression: Contact[]. ---> System.InvalidOperationException: Stack empty.
   at System.Collections.Generic.Stack`1.ThrowForEmptyStack()
   at System.Collections.Generic.Stack`1.Peek()
   at CustomFastReport.Lexical.RpnInfixModifier.ProcessElements(List`1 elements)
   at TcxLexicalParser.ConcatElement.AddChar(Char c)
   at TcxLexicalParser.LexParser.ParseInternal(String text, Boolean asExpression)
   --- End of inner exception stack trace ---
   at TcxLexicalParser.LexParser.ParseInternal(String text, Boolean asExpression)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at CrmIntegration.EscapedExpressionEvaluator.ParseExpression(String expression, Boolean asExpression, IValueManager customManager)
   at CrmIntegration.CrmIntegrationTemplateExtensions.Evaluate(RequestValue value, ProcessingContext context, IValueManager customManager)
   at CrmIntegration.ScenarioProcessorBase.CreateJsonFromPostValues(RequestItem requestItem, IValueManager customManager)
   at CrmIntegration.ScenarioProcessorBase.CreateJsonFromPostValues(RequestItem requestItem, IValueManager customManager)
   at CrmIntegration.ScenarioProcessorBase.CreateJsonFromPostValues(RequestItem requestItem, IValueManager customManager)
   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.CreateContactRecord(String contactNumber, String destinationEmail, CancellationToken token)

CONTACT NOT IN ZOHO

Code:
Started scenario with empty id
Started Auth
Request text: https://accounts.zoho.com/oauth/v2/token
Request form value refresh_token set to 1000.XXXXX.XXXXX
Request form value grant_type set to refresh_token
Request form value client_id set to 1000.XXXXX
Request form value client_secret set to XXXXX
Response text: {"access_token":"1000.XXXXX.XXXXX","api_domain":"https://www.zohoapis.com","token_type":"Bearer","expires_in":3600}
Response finished
Variable AccessToken set to 1000.XXXXX.XXXXX
Variable ApiDomain set to https://www.zohoapis.com
Finished Auth
Request text: https://www.zohoapis.com/crm/v2/Contacts/search?criteria=((Phone:equals:554321) or (Mobile:equals:554321) or (Home_Phone:equals:554321) or (Other_Phone:equals:554321) or (Fax:equals:554321))&fields=Account_Name,id,First_Name,Last_Name,Phone,Mobile,Home_Phone,Asst_Phone,Other_Phone,Email,Fax
Response text:
Response finished
Finished scenario with empty id
Started scenario with empty id
Request text: https://www.zohoapis.com/crm/v2/Leads/search?criteria=((Phone:equals:554321) or (Mobile:equals:554321) or (Fax:equals:554321))&fields=id,First_Name,Last_Name,Phone,Mobile,Fax,Email,Company
Response text:
Response finished
Finished scenario with empty id
Started scenario with empty id
Request text: https://www.zohoapis.com/crm/v2/Accounts/search?criteria=((Phone:equals:554321) or (Fax:equals:554321))&fields=id,Phone,Fax,Account_Name
Response text:
Response finished
Finished scenario with empty id
Started CreateContactRecord
Request text: https://www.zohoapis.com/crm/v2/Contacts
System.Exception: Unable to parse expression: Contact[]. ---> System.InvalidOperationException: Stack empty.
   at System.Collections.Generic.Stack`1.ThrowForEmptyStack()
   at System.Collections.Generic.Stack`1.Peek()
   at CustomFastReport.Lexical.RpnInfixModifier.ProcessElements(List`1 elements)
   at TcxLexicalParser.ConcatElement.AddChar(Char c)
   at TcxLexicalParser.LexParser.ParseInternal(String text, Boolean asExpression)
   --- End of inner exception stack trace ---
   at TcxLexicalParser.LexParser.ParseInternal(String text, Boolean asExpression)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at CrmIntegration.EscapedExpressionEvaluator.ParseExpression(String expression, Boolean asExpression, IValueManager customManager)
   at CrmIntegration.CrmIntegrationTemplateExtensions.Evaluate(RequestValue value, ProcessingContext context, IValueManager customManager)
   at CrmIntegration.ScenarioProcessorBase.CreateJsonFromPostValues(RequestItem requestItem, IValueManager customManager)
   at CrmIntegration.ScenarioProcessorBase.CreateJsonFromPostValues(RequestItem requestItem, IValueManager customManager)
   at CrmIntegration.ScenarioProcessorBase.CreateJsonFromPostValues(RequestItem requestItem, IValueManager customManager)
   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.CreateContactRecord(String contactNumber, String destinationEmail, CancellationToken token)
 
Here's what's weird, though - it hasn't been working all morning, but just now when I ran a test with the contact in Zoho, I get this:

Code:
    Search result
    CRM log

Started scenario with empty id
Started Auth
Request text: https://accounts.zoho.com/oauth/v2/token
Request form value refresh_token set to 1000.XXXXX.XXXXX
Request form value grant_type set to refresh_token
Request form value client_id set to 1000.XXXXX
Request form value client_secret set to 3XXXXX
Response text: {"access_token":"1000.XXXXX.XXXXX","api_domain":"https://www.zohoapis.com","token_type":"Bearer","expires_in":3600}
Response finished
Variable AccessToken set to 1000.XXXXX.XXXXX
Variable ApiDomain set to https://www.zohoapis.com
Finished Auth
Request text: https://www.zohoapis.com/crm/v2/Contacts/search?criteria=((Phone:equals:551234) or (Mobile:equals:551234) or (Home_Phone:equals:551234) or (Other_Phone:equals:551234) or (Fax:equals:551234))&fields=Account_Name,id,First_Name,Last_Name,Phone,Mobile,Home_Phone,Asst_Phone,Other_Phone,Email,Fax
Response text: {"data":[{"First_Name":"Test","Home_Phone":null,"Asst_Phone":null,"Email":null,"Last_Name":"Contact","Phone":"555-1234","Other_Phone":null,"Account_Name":null,"id":"4373910000000266174","Fax":null,"Mobile":null}],"info":{"per_page":200,"count":1,"page":1,"more_records":false}}
Response finished
Variable Id set to XXXXX
Variable FirstName set to Test
Variable LastName set to Contact
Variable Email set to
Variable Phone set to 555-1234
Variable HomePhone set to
Variable OtherPhone set to
Variable MobilePhone set to
Variable Fax set to
Variable AssistantPhone set to
Variable AccountName set to
Finished scenario with empty id
Started scenario with empty id
Response finished
Finished scenario with empty id
Started scenario with empty id
Response finished
Finished scenario with empty id
Result obtained

Code:
    Search result
    CRM log

[
  {
    "UnparsedOutputs": {
      "ContactUrl": "https://crm.zoho.com/crm/EntityInfo.do?module=Contacts&id=4373910000000266174",
      "FirstName": "Test",
      "LastName": "Contact",
      "Email": "",
      "PhoneBusiness": "555-1234",
      "PhoneBusiness2": "",
      "PhoneHome": "",
      "PhoneOther": "",
      "PhoneMobile": "",
      "FaxBusiness": "",
      "CompanyName": "",
      "EntityType": "Contacts",
      "EntityId": "4373910000000266174",
      "FullName": "Test Contact"
    },
    "FirstName": "Test",
    "LastName": "Contact",
    "Email": "",
    "ContactUrl": "https://crm.zoho.com/crm/EntityInfo.do?module=Contacts&id=4373910000000266174",
    "CompanyName": "",
    "PhotoUrl": null,
    "ContactType": 0,
    "PhoneBusiness": "555-1234",
    "PhoneBusiness2": "",
    "PhoneHome": "",
    "PhoneHome2": null,
    "PhoneMobile": "",
    "PhoneMobile2": null,
    "PhoneOther": "",
    "FaxBusiness": "",
    "FaxHome": null,
    "Pager": null
  }
]

Which leads me wondering how often this refreshes? What forces the refresh? Because things seem consistent until they don't, leading me to wonder if it's taking time for changes to propagate?

Again, sincerely appreciate your counsel.
 
Also - for the record, test passes (?) but 3CX does not launch a Zoho window.
 
In the first logs you sent, I can see that Zoho is not responding anything... Not sure what you did to fix it later, but seems to be returning data now.

Any change done in the 3CX console should be applied immediately, no progagation is needed.

Also - for the record, test passes (?) but 3CX does not launch a Zoho window.
Are you using the 3CX Web Client in the client machine? The popup is triggered by the Web Client. Also please check that the browser is not blocking popups.
 
Strange and wonderful. Yeah, totally using the web client. Browser not blocking popups. Again, it was working with contacts that were already within Zoho but not triggering if the contact wasn't. If the contact was in the recycle bin, Zoho would say you didn't have permissions to view the asset. If the contact had been deleted from the recycle bin, Zoho would give you that error.

I think Zoho loses anyway. It got a lukewarm response from the team. Thanks for your help, Ernesto, I'm sure I'll be just as annoying about Bitrix or Hubspot.
 
Status
Not open for further replies.