Follow

Mapping Values to a Custom XML Outbound Integration

When mapping values and fields in a custom XML outbound integration, use "dot notation" to define where each value being mapped should be placed in the request body.

(This article assumes that you understand the basics of how XML documents are structured. There are numerous resources and tutorials online that cover the basics of XML data structures.)

XML documents consist of hierarchically organized sets of tagged values.
Use dot notation to map the structural path to each value you need to send to the recipient of your LeadConduit flow's Custom XML outbound step.

It's probably easiest to see how dot notation works by looking at an example.
Here's a typical XML request body:

Note that it consists of a root object <root>...</root> that is a wrapper for several child XML objects (<lead>, <phones>, <leadEmail>, <address>, <passcode>, and <programTypeCode>) each of which may wrap a simple value (as do <leadEmail>, <passcode>, <programTypeCode>), or child objects (as do <lead> and <address>) or an array of child objects (as does <phones>).

To map a value to a simple object like <leadEmail>, set the recipient field type to "Xml Path", and map the path by simply linking the names of each wrapping object with a dot, beginning with the outermost and working inward: root.leadEmail
or, for FirstName: root.lead.FirstName

When there are multiple instances of same-named objects inside the same wrappers, such as <phones> of which there are two distinct but similar instances, each of which has as its value an set of one or more child objects (<PhoneNumber> and <PhoneType>), treat the <phones> objects as an array of complex objects. Represent each by a numeric subscript that relates the components of each instance. For instance, to map phone_1, the path for that object's phoneNumber would be root.phones.0.PhoneNumber and the path for that object's phoneType would be root.phones.0.PhoneType.
Similarly, for phone_2 the paths would be root.phones.1.PhoneNumber and root.phones.1.PhoneType. Subscripts must be assigned sequentially beginning with zero.

Here is an example of what the mappings for the above XML request body would look like in LeadConduit:

XML attributes are mapped using an "@" before the attribute name. Here's what the <phones> objects above would look like if the PhoneType was an attribute instead of a child object.

And here is how that section would be mapped:

Was this article helpful?
2 out of 2 found this helpful
Have more questions? Submit a request

Comments

You must be logged in to comment.