Model XML content
Use XML content modelling when the external API sends or expects XML.
Payloads uses the same Element concept for XML that it uses for other body formats, but XML has a few extra rules. Element names, nesting, order, document-level settings, and attributes can all matter to the receiving system. A body that looks close to the expected XML can still fail if one of those details is wrong.
Start by setting the right content type, then build the XML structure in the Payload UI so the generated Job body can be compared with the external system's schema or example request.
For the shared Element model, see Understand Elements and mapping.
Choose XML as the content type
Select HTTP Request or HTTP Response and set its Content Type to XML in the settings section.
The content type tells Payloads which body parser or serialiser to use when the Payload runs. Without this, Payloads cannot know whether the Element tree should be treated as XML or as another supported body format.
XML document settings are available in the HTTP Request settings when XML is selected.
Configure XML document settings
Use XML Declaration, XML Processing Instructions and XML DOCTYPE in the HTTP Request settings when the API expects document-level XML details.
XML Declaration controls whether the generated document includes a declaration such as version and encoding. XML Doctype controls the document type declaration when the receiving system requires one. XML Processing Instructions can be used when the receiving system expects processing instructions at the top of the document.
Only set these fields when the external API documentation requires them. Most APIs that accept XML do not need every XML document option, and adding unnecessary document-level values can make troubleshooting harder.
Build the XML Element tree
The root $ represents the generated document structure.
Use Object Elements for XML elements that contain child values. Use String, Number, Boolean, or Null Elements for leaf values. Where the XML contract requires attributes, model those values as attributes in the Element tree rather than as ordinary child elements.
Keep names precise. XML is sensitive to element names, attribute names, nesting, and ordering, so small changes can produce a body the receiving system rejects.
Model attributes
Use XML attributes when a value belongs on the XML tag rather than inside a child element.
For example, if the target XML needs:
<customer id="001xx000003DGbY">Acme</customer>
In that shape, id belongs to the customer tag itself, while Acme is the element value.
Use attributes only when the XML schema or API documentation expects attributes. Do not convert ordinary JSON-style fields into attributes unless the receiving system requires that shape.
Map values
For a generated XML body, set Value Source to Payload Data to read a field from an earlier Query or HTTP Action. Select the producing Action and its output or field. Static Value, Dynamic Input, Global Variable and Credential sources are available where supported by the editor.
Use Transformations when the XML API expects a different value format from the source data. Common examples include date formats, code mappings, boolean formatting, and amount formatting.
After a test run, compare the Job body with the external example. That is usually the fastest way to spot incorrect nesting, missing attributes, or values that were transformed into the wrong format.
Import or test with sample XML
Use sample XML to check the shape, but review the Element tree after import.
Samples often omit optional elements or show only one entry inside a repeating section. If the real API can send or receive multiple entries, make sure the relevant Element is modelled as an array-like repeating structure and mapped to a repeating source.
What to check
Before testing, check that:
the correct content type is set to XML
declaration, doctype, and processing instructions are only set when needed
root and child Element names match the XML contract
attributes are modelled as attributes
repeated sections are modelled as repeating structures
value transformations match the receiving system's expected format
the Job body shows valid XML after the Payload runs
After testing, compare the Job body with the external system's XML documentation or schema.
Find the body in Actions
Open the Payload and select the Action whose body you are configuring.
HTTP Request owns the request body: sent by an Outbound Payload or received by an Inbound Payload.
HTTP Response owns the response body: received by an Outbound Payload or returned by an Inbound Payload.
Edit that Action’s settings and choose XML as Content Type. Save the settings section, then use its Body section to create or import Elements. Input bodies describe received data; output bodies map available values into the structure to send.
In mapping dialogs, use the available data from earlier Actions. See Map data between Actions.
