DATEV mapping expression reference
The same expression processor is used for booking CSV, XML, and customer master data mappings.
Available objects
- invoice mappings use
invoice.* - credit memo mappings use
creditmemo.* - customer master data uses
customer.*andaddress.*
Dot notation follows Magento data objects and related records. Common examples include invoice.increment_id, invoice.order.increment_id, and invoice.order.billing_address.country_id.
Constants and templates
Use single quotes for a constant:
'EUR'
''
Use braces for a template:
Invoice {{invoice.increment_id}}
The + operator joins strings:
invoice.order.customer_firstname + ' ' + invoice.order.customer_lastname
Conditions and arithmetic
A ternary expression selects one of two values:
invoice.grand_total > 0 ? 'S' : 'H'
Supported comparisons are ==, !=, >, <, >=, and <=. Numeric expressions can use +, -, *, /, and parentheses.
Built-in formatting functions
The processor supports:
upper,uppercase,lower, andlowercasetrim,length,strlen,substr, andsubstringreplaceandconcatround,floor,ceil, andabsdefaultandifemptynumber_format
Examples:
upper(invoice.order.customer_lastname)
default(invoice.order.customer_email, 'missing@example.com')
number_format(invoice.grand_total, 2, ',', '')
The example address uses a reserved domain. Use a meaningful operational fallback in production, or leave the value empty if the receiving format permits it.
Provider functions and Magento configuration
Call a registered provider with function:getRevenueAccount. See Mapping functions.
Read a Magento configuration value with:
config:general/store_information/name
Null defaults
CSV and XML have separate Variable Default Values fields. A key must be the exact unresolved path, not the output column name. Validate the mapping and export a document that is missing the field before relying on the fallback.