Units of Measure
Procurement systems often expect standardized unit codes in the cart transfer — for example PCE for piece or KGM for kilogram. The connector provides three separate data fields for maintaining these units, which can be freely combined in the field mapping.
Three Data Fields for Units of Measure
Three different data fields are available for a product's unit of measure:
| Data field | Where the value comes from |
|---|---|
productOciMe | Custom field on the product |
productSystemUnit | The respective OCI/cXML system's unit table |
systemDefaultUnit | Default unit from the system configuration |
Like any other data field, these three are combined via Primary field and Fallback 1–3 in the field mapping (see Configure Fields). The connector checks the configured sources from left to right and uses the first non-empty value.
There is no automatic, built-in order for these three fields. Each field can be used on its own, in any order, or not at all — the combination must be explicitly configured in the field mapping.
Recommended Example Configuration
A typical default configuration for a unit-of-measure field could look like this:
Primary field Fallback 1 Fallback 2
productOciMe → productSystemUnit → systemDefaultUnit
This first uses a unit set individually on the product. If productOciMe returns no value, productSystemUnit (system unit table) is used. If that also finds no match, the global systemDefaultUnit is used.
productOciMe – Custom Field on the Product
On the product itself, a packing unit can be set in the Custom Fields tab. If this value is set and configured as the primary field, it overrides the other fields for this product.
Path: Products → [Select product] → Specifications → Additional fields → Agiqon OCI Product
Data field: productOciMe — available in the field configuration of the system.
productSystemUnit – System Unit Table
In the Units of Measure tab of each OCI or cXML system, Shopware units can be mapped to the codes expected by the procurement system. The productSystemUnit data field only checks this table for the respective product's unit — if no entry is found there, the field returns no value (no automatic fallback to the custom field or the default unit).
Example:
| Shopware Unit | Transfer Value |
|---|---|
| Piece | PCE |
| Kilogram | KGM |
| Litre | LTR |
| Metre | MTR |
This allows different systems to map the same Shopware units to different codes.
systemDefaultUnit – Default Unit of the System
In the system configuration (OCI or cXML) under Tab: General, a default unit can be set. Used as a fallback field, it applies when the preceding fields in the mapping return no value.
Recommendation: Enter the most common unit code in the product range here (e.g. PCE for piece).
productOciMe: For products with an individual unit that differs from the general standardproductSystemUnit: For different unit codes per procurement systemsystemDefaultUnit: For product ranges where almost everything has the same unit