CRM Integration XML

Status
Not open for further replies.

Marcel Odermatt

Gold Partner
Advanced Certified
Joined
Mar 1, 2018
Messages
43
Reaction score
6
I get the following xml-response from my crm:

<extra type="Fax">555-123456</tel:extra>
<extra type="Mobile">555-123457</tel:extra>

How can i filter after type? i tried like this but i doesnt work:
<Variable Name="Mobile">extra<Filter><Rule Type="Equals" Ethalon="Mobile">extra._type</Rule></Filter></Variable>

I cant find any documentation about "How to work with XML responses", all the documentation is only about JSON
 
Hello Marcel,

In first place, please note that we had a bug the XML response processing, which we fixed in 3CX v15.5 Update 6. So, please ensure that you're running Update 6, otherwise you will have problems with XML responses.

Said this, let me tell you how you need to define your variable:
Code:
<Variable Name="Mobile" Path="extra.extra">
    <Filter>
        <Rule Type="Equals" Ethalon="Mobile">extra.type</Rule>
    </Filter>
</Variable>

The logic is the following:
- When you want to refer to an element attribute, you enter the elements in the path, separated with a dot, and finally the attribute name.
- when you need to refer to an element value, you enter the elements in the path, separated with a dot, and finally the element name, so you will have the element name twice at the end.

Hope the information helps.

Kind regards.
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
112,323
Messages
591,896
Members
165,474
Latest member
costionofrei