Skip to main content

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 fieldWhere the value comes from
productOciMeCustom field on the product
productSystemUnitThe respective OCI/cXML system's unit table
systemDefaultUnitDefault 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.

note

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.

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 UnitTransfer Value
PiecePCE
KilogramKGM
LitreLTR
MetreMTR

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).

Which field for which case?
  • productOciMe: For products with an individual unit that differs from the general standard
  • productSystemUnit: For different unit codes per procurement system
  • systemDefaultUnit: For product ranges where almost everything has the same unit