CRM integration functions properly, but the contact number is not found. Review the log for details or attempt a different number.

MartinAndel

Premier Customer
Joined
Mar 5, 2024
Messages
15
Reaction score
3
Having a bit of a bumpy ride with the Salesforce v2 integration. After having having resolved issues with 0auth and Lead object the next obstacle is this.

The authentication works and the object view permissions are set correctly (as far as I know), the connectivity test from 3cx side says this:

CRM integration functions properly, but the contact number is not found. Review the log for details or attempt a different number.

Logs are saying:

Started scenario with empty id
Started Auth
Request text: https://login.salesforce.com/services/oauth2/token
Request form value grant_type set to refresh_token
Request form value refresh_token set to XXX
Request form value client_id set to XXX
Request form value client_secret set to XXX
Response text: {"access_token":"XXX","signature":"XXX","scope":"refresh_token web openid api id full","instance_url":"XXX","id":"https://login.salesforce.com/XXX","token_type":"Bearer","issued_at":"XXX"}
Response finished
Variable Url set to https://XXX.my.salesforce.com
Variable AccessToken set to XXX
Finished Auth
Request text: https://XXX.my.salesforce.com/services/data/v55.0/search/?q=FIND {1201} IN PHONE FIELDS RETURNING Contact(Id,FirstName,LastName,Title,Department,AssistantPhone,Fax,HomePhone,MobilePhone,OtherPhone,Phone,Email,AccountId)
Response text: {"searchRecords":[]}
Response finished
Finished scenario with empty id
Started scenario with empty id

Request text: https://XXX.my.salesforce.com/services/data/v55.0/search/?q=FIND {1201} IN PHONE FIELDS RETURNING Lead(Id,FirstName,LastName,Title,Fax,MobilePhone,Phone,Email,Company)
Response text: {"searchRecords":[]}
Response finished
Finished scenario with empty id
Started scenario with empty id

Request text: https://XXX.my.salesforce.com/services/data/v55.0/search/?q=FIND {1201} IN PHONE FIELDS RETURNING Account(Id,Name,Fax,Phone)
Response text: {"searchRecords":[]}
Response finished
Finished scenario with empty id


I know for a fact that the extension 1201 I'm testing for is in the Salesforce user account. I am not getting the user data pulled in however...
 

Attachments

  • Salesforce account.png
    Salesforce account.png
    40.3 KB · Views: 29
  • Salesforce 3cx error.png
    Salesforce 3cx error.png
    14.1 KB · Views: 29
It's impossible that it uses the extension. Perhaps your system is set to 4 digits matching so that's all it sends to the CRM (Phonebook/Contacts > Options > Match X number of digits)
 
Sorry, can you please be more specific? What does or doesn't use that extension? Our 3cx is set to have 4 digit extensions and the user extension field in Salesforce contains the correct extension number.
 
Sorry, can you please be more specific? What does or doesn't use that extension? Our 3cx is set to have 4 digit extensions and the user extension field in Salesforce contains the correct extension number.
The logs you see are for the lookup of the caller ID. Doesn't matter the user or whatever at that point. The CRM integration can only read the Number of the caller during lookup.
 
So what you are saying is that I cannot use the TEST function of the Salesforce integration in 3cx to look up data of our Salesforce users?
 
Yes you can. That's not what I'm saying.

I am saying, go to the Contacts/Phonebook (v18: Advanced > Contacts, v20: System > Phonebook) and in the Options button, make sure to enable "Match exactly" for the matching (first group of option.)
 
Did that, same result when testing afterwards
 

Attachments

  • Phonebook.PNG
    Phonebook.PNG
    25.9 KB · Views: 29
So, you're testing with an extension number? You should test with a real phone number. Please note that the CRM integration will not be triggered for internal calls.

The REST API provided by Salesforce has some particularities when it searches for phone numbers. You need to be using a real full number for it to work.
 
Yeah, our support partner have already clarified that. I find it confusing however that 3cx suggests you should try the intergration with a local extension
 
Yeah, our support partner have already clarified that. I find it confusing however that 3cx suggests you should try the intergration with a local extension
They suggest calling a number using a local extension, but never said the local extension would do anything special. Only external calls will trigger the integration.
 

Forum statistics

Threads
112,148
Messages
590,963
Members
165,169
Latest member
Isaac415