Solved 3CX displays Companies number with custom field "phone" ?

Status
Not open for further replies.

Guillaume_TurnK

Free User
Joined
Oct 31, 2023
Messages
7
Reaction score
1
Hi,

I integrated 3CX with Freshdesk and it works great with the contacts. Contact name is displayed and the user is redirected to the Freshdesk contact page. I tried to so the same for Companies, as some clients are calling using a generic company number. Here is what i did :
1. Added a custom field "phone" on Freshdesk for companies
2. Created a custom XML config template with this endpoint :
Url="https://[Domain].freshdesk.com/api/v2/search/companies?query="tlphone:'[[Number].Replace("+","%2B")]'""
3. When I test a phone number with it, i get a well formated response as follow :
2023-11-02_10-03.png

My issue is that when i try to call using a company number, it's beeing displayed well in the TEST window but not inside 3CX. So if a client calls using a company phone number, the company name isn't displayed.
Am I missing something or it's just not possible to do ? It seems only the contact endpoint is beeing used by 3CX for caller identification in the background, no matter what i try to achieve inside the XML config (like passing the CompanyName inside FirstName, adding an email and so on).

Thanks for your kind help,

Guillaume
 
Please be advised that only the First and Last name will be shown in the caller id.
 
Thank you for your quick answer, indeed i suspected that and put the CompanyName inside the FirstName variable already, but it stills doesn't take it into account.
 
When making a call (not the test) does it sync the information?
 
It syncs the information only when it's a Contact inside Freshdesk on incoming call. I cannot trick it to match it using a custom number associed to a Company and then put the Company name as FirstName or LastName as shown in this log. Even so i get the variable assigned correctly.
1698920451045.png
 
Here is an example of a Freshdesk contact calling (working fine)
1698920959909.png
 
Are you making this test using a mobile number that you already have configured as the mobile of a 3CX extension? If that's the case, 3CX will not show the details from the CRM.
 
  • Like
Reactions: Evolute IT
The mobile number is only present inside Freshdesk and I tested a couple of numbers to be sure. Plus I tried by assigning the number(s) to a Contact, works fine, same number(s) moved to a Company, does not.
 
Can you show me your updated template?
 
Sure thing
I added 2 scenarios :
<Scenario Type="REST">
<Request SkipIf="[IIf([FoundRecordCount]&gt;0,True,False)]" Url="https://[Domain].freshdesk.com/api/v2/search/companies?[...]
...
<Outputs Next="GetCompanyContact" AllowEmpty="false">
</Scenario>
Which then go to :
<Scenario Id="GetCompanyContact" Type="REST">
 

Attachments

Something that you should fix is the case of the Rule in the GetCompanyContact scenario. You have it starting with uppercase in one case, and lowercase in another:
1698948363225.png

According to the JSON response you showed, this should be all lowercase.

Apart from that, if the test from the console works, but it doesn't for a real call, you should enable verbose logs from the 3CX Console > Dashboard > Activity Log > Settings. Then make a test call where you reproduce the issue, and check the 3cxSystemService.log file that you can download from the 3CX Console > Dashboard > Activity Log > Logs button > Instance folder. From there you will be able to see the details of the interaction between 3CX and Freshdesk. Pay special attention to the format of the number being sent, and ensure that the test works with exactly the same number, with prefixes and everything.
 
The uppercase and lowercase mismatch was the issue, thanks a lot for your assistance !!

Regards,

Guillaume
 
  • Like
Reactions: edossantos
Status
Not open for further replies.