- Joined
- Aug 17, 2018
- Messages
- 85
- Reaction score
- 22
Hi All,
I've created a custom CRM template for our ERP system. It uses a REST matching scenario and gets an XML result. Looking for 123456789 will find contacts in our ERP with separators blank " ", dash "-" or slash "/" in phone numbers like "123 4567 89", "1234-56789" or "12334/56789". Parsing works fine and output variables get filled, but a 3CX CRM contact is only created if there isn't a slash '/' in the XML answer. 3CX doesn't accept a phone output variable with a "/".
Unfortunally a lot of our customer records have phone numbers with a slash '/' as divider between area code and local number, e.g. "01235/6789". I've tried to replace this slash '/' with a dash '-', but without success.
I'v tried somthing like this in several variations, but couldn't get rid of "/":
Template generator throws no error. CRM test shows: "Variable MOBILE set to 01235/6789". No replacing is done.
Is it possible to use a replacing method in a matching scenario?
Thank you
Sven
I've created a custom CRM template for our ERP system. It uses a REST matching scenario and gets an XML result. Looking for 123456789 will find contacts in our ERP with separators blank " ", dash "-" or slash "/" in phone numbers like "123 4567 89", "1234-56789" or "12334/56789". Parsing works fine and output variables get filled, but a 3CX CRM contact is only created if there isn't a slash '/' in the XML answer. 3CX doesn't accept a phone output variable with a "/".
Unfortunally a lot of our customer records have phone numbers with a slash '/' as divider between area code and local number, e.g. "01235/6789". I've tried to replace this slash '/' with a dash '-', but without success.
I'v tried somthing like this in several variations, but couldn't get rid of "/":
Code:
...
<Variable Name="MOBILE">RESULT.RESPONSE.DATA.BUSINESS_PARTNER.CONTACT.CONTACT</Variable>
...
<Output Type="PhoneMobile" Passes="0" Value="[[MOBILE].Replace('/','-')]" />
Template generator throws no error. CRM test shows: "Variable MOBILE set to 01235/6789". No replacing is done.
Is it possible to use a replacing method in a matching scenario?
Thank you
Sven
Last edited: