Solved Site not processing & in URL correctly

Status
Not open for further replies.

pmterp

Gold Partner
Joined
Jun 13, 2017
Messages
424
Reaction score
256
Hello,
Working on an integration and am running into an issue. The URL requires some "&" (ampersands) and 3CX is sending them as "&amp:" which I believe is the correct way for them to be sent. However, the CRM site doesn't recognize "&" the same as "&" and so the customer data does not load.
I'm working with 3CX support on this but thought I'd see if anyone else has a suggestion.
I've tried encoding/including it multiple ways in the 3CX CRM template: "amp;", "%26", "&"
I've also tried simply putting "&" but then there is some XML error and the template won't upload to 3CX.

Any suggested solutions or work arounds?
 
Hello,
Working on an integration and am running into an issue. The URL requires some "&" (ampersands) and 3CX is sending them as "&amp:" which I believe is the correct way for them to be sent. However, the CRM site doesn't recognize "&" the same as "&" and so the customer data does not load.
I'm working with 3CX support on this but thought I'd see if anyone else has a suggestion.
I've tried encoding/including it multiple ways in the 3CX CRM template: "amp;", "%26", "&"
I've also tried simply putting "&" but then there is some XML error and the template won't upload to 3CX.

Any suggested solutions or work arounds?
How is the & set in the XML file? The XML should have it as "&" but it should show as "&" in the CRM Template Generator.
 
  • Like
Reactions: edossantos
How is the & set in the XML file? The XML should have it as "&" but it should show as "&" in the CRM Template Generator.
In the XML file it shows as "&" and the URL that populates when a call is received has it as "&". But the CRM doesn't recognize it as valid since it is only expecting a "&".
 
In the XML file it shows as "&" and the URL that populates when a call is received has it as "&". But the CRM doesn't recognize it as valid since it is only expecting a "&".
Is this a custom CRM XML? Or a edited version of an existing one?
 
  • Like
Reactions: edossantos
Custom. Started with the wizard and have been editing the resulting XML file..
 
Custom. Started with the wizard and have been editing the resulting XML file..
DM me the file, I'm curious. We do many integrations and the URL never does that.
 
  • Like
Reactions: edossantos
  • Like
Reactions: Evolute IT
Show at least a piece of the XML you're using for this, probably you're repeating the escape sequence, for example & instead of just &.
 
Show at least a piece of the XML you're using for this, probably you're repeating the escape sequence, for example & instead of just &.
Here's the line from the XML doc if I click Show Template within 3CX:
Code:
<Output Type="ContactUrl" Passes="0" Value="https://us.merchantos.com/?name=customer.views.customer&amp;form_name=view&amp;id=[ContactID]&amp;tab=details" />
When the ContactID is "1" this is the URL sent to the browser:
Code:
https://us.merchantos.com/?name=customer.views.customer&amp;form_name=view&amp;id=1&amp;tab=details
which just loads a blank page.
If I manually change the 3 instances of "&amp;" to "&" then the customer record is shown.
 
What browser do you use?

Eddy, I checked the full file and it's fine.
 
What browser do you use?

Eddy, I checked the full file and it's fine.
Using Chrome
Edit: Also tried loading the URL in Firefox and get the same result.
 
Using Chrome
Edit: Also tried loading the URL in Firefox and get the same result.
If you install the template in the 3CX and make a test call so that it finds a contact and returns the URL, does it open correctly in the Webclient/DesktopApp?

Once processed by the system it should be fine but the XML will always have it encoded as &amp; to prevent formatting issues.
 
  • Like
Reactions: edossantos
I was playing around with my template and loaded a version that didn't have the contactID URL properly formed but it still popped up.
I looked and there was a contact created in 3CX for the CRM contact. Apparently that also cached/saved the original URL that included the improper &amp; in the string. I deleted the contact, went back to the template that I had most recently been working with and viola, it worked.
The very first template I made from the wizard had included &amp;amp; and that must have been saved with that contact. Thanks to those that offered help.
 
Yes, contacts are added to the 3CX phonebook, so that caused the issue. Thanks for explaining it, and glad it's working now.
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
112,323
Messages
591,894
Members
165,472
Latest member
arneg