Skip to content

Export Orders

Use this page when you need to export orders together with their line items.

Order exports can also include customer business data in the mapping:

FieldMapping keyNotes
Customer account typeorderCustomer.customer.accountTypeExports private or business when available on the related customer account.
Customer companyorderCustomer.companyExports the company saved on the order customer record.
Customer VAT IDsorderCustomer.vatIdsExports all VAT IDs in one value, separated by the profile’s multiple-value separator.

Each order export can contain multiple rows for the same order:

  • Row with linetype = order represents the order data.
  • Rows with linetype = lineItems represent the order items.

For CSV, XLSX, or Google Sheets, enable Export line-item rows only on the first page of the export profile. This omits the order rows and keeps the lineItems rows. Enable Fill all order line with order data as well if your ERP needs order details on each item row.

Shopware 6 order export profile with Export line-item rows only enabled

By default, line item rows do not contain order-related data in the order columns:

linetypeorderNumberorderStatuspaymentStatusamountTotalSubtotalTotal excluding VAT
order10002openopen122.4110.4102.85
lineItems10002
lineItems10003

To fill line item rows with order data, enable Fill all order line with order data in the export profile settings.

When this option is enabled, all rows include data from their related order.

linetypeorderNumberorderStatuspaymentStatusamountTotalSubtotalTotal excluding VAT
order10002openopen122.4110.4102.85
lineItems10002openopen122.4110.4102.85
lineItems10003openopen122.4110.4102.85

For CSV, XLSX, and Google Sheets, the PHP modification script runs on each output row before it is written. If the script raises an error, that row is omitted and the export continues. The export can finish successfully even when rows are missing. Download the export log to find the error message and script line number. For item-only calculations, check that $row['linetype'] === 'lineItems' so empty item fields on order rows do not cause errors.