- Joined
- Nov 20, 2020
- Messages
- 2
- Reaction score
- 0
Hi all,
We've found an issue with 3cx and CRM integration that we weren't having prior to the v18 upgrade. We're using Zoho, but I believe this would affect any CRM. First let me describe the setup and scenario:
Setup:
* Zoho CRM integration
* Call Journaling enabled
* Contact creation NOT enabled
* Outbound Rule for 10 digit dialing will prepend a '1'
* 3CX Click2Call Installed on Chrome/Edge
Scenario 1:
* Agent clicks on phone number in Zoho CRM -> Contacts
* Phone number is 650-555-1234 (notice there isn't a 1 prepended)
The Result:
In this scenario, the call journaling only happens when the call is unanswered. If the call is answered, the call will not be logged in Zoho.
Scenario 2:
* Agent clicks on phone number in Zoho CRM -> Contacts
* Phone number is 1-650-555-1234 (notice there is a 1 prepended)
The Result:
In this scenario, the call journaling happens with answered and unanswered calls.
Looking at the debug logging, it seems that 3CX will correctly look up the call based on the last 6 digits of the phone number:
Notice here that the CRM lookup went just fine, but near the end 3CX has now started to identify the number with the 1 prepended, and that's what is going to cause things to fail to update the call log in Zoho:
For some reason, 3CX is now trying to search 3CX contacts for 16505551234 instead of the dialed number 6505551234, (well, I assume it's because of the outbound route adding the '1') when it has already found the correct contact information in Zoho as noted 9 seconds earlier in the log. Because of the prepended "1", it returns no results, and thus does not try to post the journal entry to Zoho.
Now if the number already has the 1 prepended in Zoho when the agent clicks on it/calls it, the journaling works just fine:
This is an entirely new issue after upgrading to v18. I know every contact should have a country code in front of it, but at the same time, I feel like this lookup should happen based on the actual number the was entered. Or do a fuzzy lookup like is done against Zoho. Or, ignore the failure to find the contact in 3CX since it was already found in Zoho, which is exactly what we are trying to log against here. We have about 950,980 contacts in Zoho (not all with phone numbers), some with a country code and some without (which is why 3CX will prepend that 1 for us on 10 digits), which is going to be nearly impossible to update all of. Is there any setting we can set, or something we can do on the 3CX side to get this working again?
We've found an issue with 3cx and CRM integration that we weren't having prior to the v18 upgrade. We're using Zoho, but I believe this would affect any CRM. First let me describe the setup and scenario:
Setup:
* Zoho CRM integration
* Call Journaling enabled
* Contact creation NOT enabled
* Outbound Rule for 10 digit dialing will prepend a '1'
* 3CX Click2Call Installed on Chrome/Edge
Scenario 1:
* Agent clicks on phone number in Zoho CRM -> Contacts
* Phone number is 650-555-1234 (notice there isn't a 1 prepended)
The Result:
In this scenario, the call journaling only happens when the call is unanswered. If the call is answered, the call will not be logged in Zoho.
Scenario 2:
* Agent clicks on phone number in Zoho CRM -> Contacts
* Phone number is 1-650-555-1234 (notice there is a 1 prepended)
The Result:
In this scenario, the call journaling happens with answered and unanswered calls.
Looking at the debug logging, it seems that 3CX will correctly look up the call based on the last 6 digits of the phone number:
Code:
2021/12/28 11:37:18.558|9276|0051|Verb|Performing GET request 'https://www.zohoapis.com/crm/v2.1/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'.
2021/12/28 11:37:18.993|9276|0047|Verb|The response is: '{"data":[{"First_Name":"Steve","Home_Phone":null,"Asst_Phone":null,"Email":null,"Last_Name":"Smith","Phone":null,"Other_Phone":null,"Account_Name":null,"id":"10691240XXXXXXXXX","Fax":null,"Mobile":"6505551234"}],"info":{"call":false,"per_page":200,"count":1,"page":1,"email":false,"more_records":false}}'
2021/12/28 11:37:18.993|9276|0047|Verb|Unknown path element: name. Null value is returned.
2021/12/28 11:37:18.993|9276|0047|Verb|Filtered variables for matching:
2021/12/28 11:37:18.993|9276|0047|Verb| 'MobilePhone' = '6505551234'
2021/12/28 11:37:18.993|9276|0047|Verb| 'Phone' = ''
2021/12/28 11:37:18.993|9276|0047|Verb| 'OtherPhone' = ''
2021/12/28 11:37:18.993|9276|0047|Verb| 'HomePhone' = ''
2021/12/28 11:37:18.993|9276|0047|Verb| 'FirstName' = 'Steve'
2021/12/28 11:37:18.993|9276|0047|Verb| 'AccountName' = ''
2021/12/28 11:37:18.993|9276|0047|Verb| 'Fax' = ''
2021/12/28 11:37:18.993|9276|0047|Verb| 'Email' = ''
2021/12/28 11:37:18.993|9276|0047|Verb| 'Id' = '10691240XXXXXXXXX'
2021/12/28 11:37:18.993|9276|0047|Verb| 'LastName' = 'Smith'
2021/12/28 11:37:18.993|9276|0047|Verb| 'AssistantPhone' = ''
...
...
2021/12/28 11:37:18.999|9276|0047|Info|CRM: Contact Wphonebook.384353: Wtenant.1: default - 6505551234 - Steve Smith was updated from CRM
2021/12/28 11:37:18.999|9276|0047|Verb|Removed from processing. Number=16505551234
2021/12/28 11:37:18.999|9276|0047|Info|CRM: processing of 16505551234 has been finished
2021/12/28 11:37:18.999|9276|0012|Verb|Dequeue Updated.TRANSACTION.4921
Notice here that the CRM lookup went just fine, but near the end 3CX has now started to identify the number with the 1 prepended, and that's what is going to cause things to fail to update the call log in Zoho:
Code:
2021/12/28 11:37:27.968|9276|0047|Info|CRM: about to report 1 calls at maxConcurrency 1
2021/12/28 11:37:27.968|9276|0047|Verb|CRM: Call Journaling event received, searching for number '16505551234' in 3CX Contacts.
2021/12/28 11:37:27.968|9276|0047|Verb|Processing scenario 'ReportCall'.
2021/12/28 11:37:27.968|9276|0047|Verb|Creating new HttpClient for Scenario authentication.
2021/12/28 11:37:27.968|9276|0047|Verb| Header 'Authorization' = 'Zoho-oauthtoken XXXXXXXXXXXXXXX'
2021/12/28 11:37:27.968|9276|0047|Verb|Skipping request...
2021/12/28 11:37:27.968|9276|0047|Verb|Continue with empty matching.
2021/12/28 11:37:27.968|9276|0047|Verb|Processing scenario 'CreateCall'.
2021/12/28 11:37:27.969|9276|0047|Verb|Creating new HttpClient for Scenario authentication.
2021/12/28 11:37:27.969|9276|0047|Verb| Header 'Authorization' = 'Zoho-oauthtoken XXXXXXXXXXXXXXX'
2021/12/28 11:37:27.969|9276|0047|Verb|Skipping request...
2021/12/28 11:37:27.969|9276|0047|Verb|No matchings found.
For some reason, 3CX is now trying to search 3CX contacts for 16505551234 instead of the dialed number 6505551234, (well, I assume it's because of the outbound route adding the '1') when it has already found the correct contact information in Zoho as noted 9 seconds earlier in the log. Because of the prepended "1", it returns no results, and thus does not try to post the journal entry to Zoho.
Now if the number already has the 1 prepended in Zoho when the agent clicks on it/calls it, the journaling works just fine:
Code:
2021/12/28 14:01:44.422|9276|0065|Info|CRM: about to report 1 calls at maxConcurrency 1
2021/12/28 14:01:44.422|9276|0065|Verb|CRM: Call Journaling event received, searching for number '16505551234' in 3CX Contacts.
2021/12/28 14:01:44.422|9276|0065|Verb|Processing scenario 'ReportCall'.
2021/12/28 14:01:44.422|9276|0065|Verb|Creating new HttpClient for Scenario authentication.
2021/12/28 14:01:44.422|9276|0065|Verb| Header 'Authorization' = 'Zoho-oauthtoken XXXXXXXXXXXXXXX'
2021/12/28 14:01:44.422|9276|0065|Verb|Performing GET request 'https://www.zohoapis.com/crm/v2.1/users/search?criteria=(email:equals:[email protected])'.
2021/12/28 14:01:44.523|9276|0065|Verb|The response is: ''
2021/12/28 14:01:44.523|9276|0065|Verb|Continue with empty matching.
2021/12/28 14:01:44.523|9276|0065|Verb|Processing scenario 'CreateCall'.
2021/12/28 14:01:44.523|9276|0065|Verb|Creating new HttpClient for Scenario authentication.
2021/12/28 14:01:44.523|9276|0065|Verb| Header 'Authorization' = 'Zoho-oauthtoken XXXXXXXXXXXXXXX'
2021/12/28 14:01:44.524|9276|0065|Verb|Performing POST request to 'https://www.zohoapis.com/crm/v2.1/Calls' with message '{"data":[{"Subject":"3CX PhoneSystem Call","Call_Start_Time":"2021-12-28T22:01:34Z","Call_Duration":"00:10","Call_Type":"Outbound","Call_Result":"Successful","$se_module":"Contacts","Who_Id":"10691240XXXXXXXXX","Description":"12/28/2021 2:01 PM: Answered outgoing call from 505 to 16505551234 (00:10)"}]}'.
2021/12/28 14:01:44.675|9276|0065|Verb|The response is: '{"data":[{"code":"SUCCESS","details":{"Modified_Time":"2021-12-28T14:01:44-08:00","Modified_By":{"name":"Agent Calling","id":"10691240XXXXXXXXX"},"Created_Time":"2021-12-28T14:01:44-08:00","id":"10691240XXXXXXXXX","Created_By":{"name":"Agent Calling","id":"10691240XXXXXXXXX"}},"message":"record added","status":"success"}]}'
This is an entirely new issue after upgrading to v18. I know every contact should have a country code in front of it, but at the same time, I feel like this lookup should happen based on the actual number the was entered. Or do a fuzzy lookup like is done against Zoho. Or, ignore the failure to find the contact in 3CX since it was already found in Zoho, which is exactly what we are trying to log against here. We have about 950,980 contacts in Zoho (not all with phone numbers), some with a country code and some without (which is why 3CX will prepend that 1 for us on 10 digits), which is going to be nearly impossible to update all of. Is there any setting we can set, or something we can do on the 3CX side to get this working again?