cXML – Shipping & Tax
The <Shipping> and <Tax> header blocks of the PunchOutOrderMessage are freely configurable as of 3.7.500 / 3.6.300. Each block has its own tab in the cXML system: Shipping and Tax.
Both blocks are written into the PunchOutOrderMessageHeader exactly once per transfer — directly after <Total>, not per cart line item.
Prerequisite
A block is only generated when the corresponding switch in the General tab is enabled:
| Switch | Generates |
|---|---|
| Append shipping | <Shipping> |
| Append tax | <Tax> |
See Create System & General Settings.
Structure of a Field Tree
Unlike the line item fields, shipping and tax are built as a tree: a fixed root node with any number of child nodes.
Shipping ← root node, not editable
|-- Money ← child node, freely configurable
+-- Description
The root node (Shipping or Tax) is fixed and cannot be renamed or deleted. All child nodes are freely configurable — with the same properties as the line item fields (data field, fallback 1–3, value, position, filters) plus an optional attribute:
| Property | Description |
|---|---|
| Attribute | Name of the XML attribute, e.g. currency or xml:lang |
| Attribute Type | Namespace for attributes such as xml:lang, otherwise Standard |
| Attribute Data Field | Data field the attribute value is read from |
| Attribute value | Static value used when the attribute data field returns nothing |
Default Configuration
Both trees are created on installation and reproduce exactly the previously hard-coded output.
Shipping
| Node | Data field | Attribute | Filter |
|---|---|---|---|
Money | shippingCostsTotalPrice | currency → currencyIsoCode (Standard) | System price digits |
Description | shippingName | xml:lang → languageShortCode (Namespace) | – |
Tax
| Node | Data field | Attribute | Filter |
|---|---|---|---|
Money | cartTaxAmount | currency → currencyIsoCode (Standard) | System price digits |
Description | – | xml:lang → languageShortCode (Namespace) | – |
The Description of the tax block is empty in the default configuration — this matches the previous behaviour. To output text there, assign a data field or a value to the node.
Example Output
<PunchOutOrderMessageHeader operationAllowed="create" quoteStatus="final">
<Total>
<Money currency="EUR">119.00</Money>
</Total>
<Shipping>
<Money currency="EUR">4.90</Money>
<Description xml:lang="en">Standard shipping</Description>
</Shipping>
<Tax>
<Money currency="EUR">19.00</Money>
<Description xml:lang="en"/>
</Tax>
</PunchOutOrderMessageHeader>
A migration creates both trees for every cXML system that already exists. The generated output therefore stays unchanged at first — it only changes once the trees are edited in the administration.
<Shipping><Money> returns the gross amount via shippingCostsTotalPrice. If the procurement system expects a net value, switch the data field of the Money node to shippingCostsNetPrice.
Shipping Description
shippingName returns the name from the shipping method extension; when nothing is maintained there, the name of the shipping method is used.
To use the translated Shopware name only, the data field shippingMethodTranslatedName is available. It deliberately ignores the shipping method extension, so both fields can be combined as primary field and fallback.
Further Reading
- Configure Fields — including the available filters
- All Data Fields
- Shipping Methods