Aiden WMS

Item

TL;DR — Aiden WMS Item Mapper (Outbound)
  • Purpose: Keep Aiden WMS item master in sync with SAP B1 for identity, flags, UoMs, barcodes, and dimensions after the mapper is installed and running.

  • Flow & Correlation: B1 publishes item JSON to Kafka; mapper enriches and outputs WMS Item to outbound Kafka “Items” topic with correlation.correlationId set from the Kafka message key for end‑to‑end tracing. Consumer starts only after first successful master‑data load.

  • Inputs:

    • Main payload: B1 Item (identity, flags, UoM fields, UoM dimensions per unit, barcodes).

    • Hourly‑loaded masters: UoMs, UoM Groups (alt/base quantities), Item Groups (name by code), Length/Weight measure conversions.

  • Item group name: WMS data.itemGroup stores the resolved B1 Item Group name (not the numeric code).

  • Flags mapping:

    • isBatch ⇐ ManageBatchNumbers (tYES=true).

    • isInventory ⇐ InventoryItem (tYES=true).

    • isEnabled ⇐ not Frozen (Frozen tNO=true; Frozen tYES=false).

    • serialOnOutbound ⇐ ManageSerialNumbersOnReleaseOnly (tYES=true).

    • isSerial uses two‑step logic: if release‑only is true, then isSerial mirrors ManageSerialNumbers; otherwise isSerial=false.

  • Base UoM (data.baseUomCode): Prefer the UoM Code for InventoryUoMEntry from the UoM master; fall back to InventoryUOM text or synthesized codes when needed.

  • Units (data.units[]) — preferred vs fallback:

    • Preferred (UoM Group path): For each alternate UoM, set uomCode/Name, numPerUom = AlternateQuantity ÷ BaseQuantity, collect barcodes for that UoMEntry, and attach normalized dimensions.

    • Fallback (when group data incomplete): Synthesize up to three units from Inventory (numPerUom=1), Sales (SalesUnit/SalesItemsPerUnit), Purchase (PurchaseUnit/PurchaseItemsPerUnit), skipping duplicates.

  • Dimensions normalization (per unit): Convert item UoM measures to canonical WMS: weightInGr (g), lenghtInMM/heightInMM/widthInMM (mm), volumeInCC (cc). Missing values default to 0. Note schema uses “lenghtInMM”.

  • Barcodes: Taken from ItemBarCodeCollection and attached to the unit whose UoMEntry matches; supports multiple barcodes per unit.

  • Not covered: Prices, VAT, GL accounts, and warehouse assignments are out of scope for this item contract. Masters refresh hourly; UoM/group changes may lag until the next cycle.

  • E2E expectation: Load masters → start consumer → receive B1 item → map (flags, group name, units, barcodes, dimensions) → publish WMS item → trace with correlation.correlationId and ItemCode.

  • Consultant checklist: Ensure correct Item Groups, UoMs, UoM Groups, and measure units in B1; maintain item UoM rows and barcodes for multi‑level packaging; align serial expectations (ManageSerialNumbers vs release‑only); fill dimensions if WMS needs them; wait for config load after restarts before expecting item flow.

Functional documentation for the Aiden WMS item mapper (outbound).

This document describes what happens after the mapper is installed: how a SAP Business One (B1) item is turned into an Aiden WMS item master, which master data is required, and which field rules apply. It is intended for end-users and functional consultants.


1. Overview



Source

SAP B1 Item (Service Layer item JSON on Kafka)

Target

Aiden WMS Item (Items endpoint / Kafka)

Purpose

Keep WMS item master in sync with B1 (identity, flags, UoMs, barcodes, dimensions)

After installation, when an item is published from B1, the mapper produces a WMS item document with:

  • Item code and name

  • Item group name (resolved from B1 group number)

  • Batch / serial / inventory / enabled flags

  • Base unit of measure

  • One or more units (UoM code, name, factor, barcodes, dimensions)

Fixed / technical defaults

Topic

Behavior

Correlation

Kafka / integration message key → correlation.correlationId

Publish target

Header Items on the outbound Kafka message

Consumer start

Kafka consumer starts only after the first successful master-data load


2. What the mapper uses as input

2.1 Main payload — B1 item

One Kafka message = one B1 item document, including for example:

  • Identity: ItemCode, ItemName, ItemsGroupCode

  • Flags: InventoryItem, ManageBatchNumbers, ManageSerialNumbers, ManageSerialNumbersOnReleaseOnly, Frozen

  • UoM: InventoryUoMEntry, InventoryUOM, UoMGroupEntry, SalesUnit, SalesItemsPerUnit, PurchaseUnit, PurchaseItemsPerUnit

  • Collections: ItemUnitOfMeasurementCollection (weights/lengths/volumes per UoM), ItemBarCodeCollection

ItemCode is also used as the integration external application id for monitoring.

2.2 Master data loaded automatically (hourly)

Before items are processed, the integration loads from B1 and keeps in memory:

B1 endpoint

Used for

UnitOfMeasurements

UoM code and name by AbsEntry

UnitOfMeasurementGroups

Alternate/base quantities per UoM group (numPerUom)

ItemGroups (GroupName, Number)

Resolve ItemsGroupCode → group name

LengthMeasures

Convert length/width/height/volume unit codes → mm / cc

WeightMeasures

Convert weight unit codes → grams

Consultant impact: UoM definitions, UoM groups, item groups, and measure units must be correct in B1. Wrong masters → wrong WMS unit codes, factors, or dimensions. After deploy/restart, wait until the first configuration cycle finishes (consumer starts only then).

2.3 Correlation id

Integration message key → correlation.correlationId for end-to-end tracing.


3. Business behavior

3.1 Item group name

WMS data.itemGroup is not the numeric B1 group code.

  • Lookup: ItemsGroupCode equals item group Number

  • Result: corresponding GroupName (e.g. 100Artikel)

3.2 Boolean flags

WMS field

B1 source

Rule

isBatch

ManageBatchNumbers

tYEStrue; otherwise false

isInventory

InventoryItem

tYEStrue; otherwise false

isEnabled

Frozen

tNOtrue (not frozen = enabled); otherwise false

serialOnOutbound

ManageSerialNumbersOnReleaseOnly

tYEStrue; otherwise false

isSerial

ManageSerialNumbers + ManageSerialNumbersOnReleaseOnly

See below

isSerial logic:

  1. Evaluate ManageSerialNumbersOnReleaseOnly as boolean (tYES→true, else false).

  2. If true (serial only on release): use ManageSerialNumbers mapped the same way (tYES→true, else false).

  3. If false: WMS isSerial is forced to false.

So “serial on release only” without treating the item as a full serial item in the main flag can yield isSerial = false while serialOnOutbound = true when release-only is tYES.

Frozen items: Frozen = tYESisEnabled = false in WMS (item not enabled for warehouse use).

3.3 Base UoM (baseUomCode)

Resolved primarily from the inventory UoM:

  • Prefer B1 UoM master Code for InventoryUoMEntry when a matching UnitOfMeasurements.AbsEntry exists.

  • Fallbacks involve InventoryUOM text, manual/-1 UoM entry cases, and optional m + name style codes when the structured UoM path is incomplete.

Scenario example: inventory UoM entry 1 → base code "1" (Pak).

3.4 Units array — two regimes

A) UoM group path (preferred when group data is available)

When the item has a usable UoMGroupEntry and matching Unit of Measurement Group definitions:

WMS unit field

Source / rule

uomCode

UnitOfMeasurements.Code for the alternate UoM entry

uomName

UnitOfMeasurements.Name

numPerUom

AlternateQuantity ÷ BaseQuantity from the UoM group definition for that alternate UoM

barcodes[]

All ItemBarCodeCollection.Barcode values for that UoMEntry

dimension.*

From ItemUnitOfMeasurementCollection measures for that UoM, converted (see §3.5)

B) Fallback simple units (limited / no UoM group path)

When the structured group path does not yield units (count/empty checks in the mapping), the mapper can synthesize units from header fields:

Synthesized unit

Code (typical)

Name

numPerUom

Inventory

derived from InventoryUOM (often m + name style / substitute-missing)

InventoryUOM

1

Sales

from SalesUnit

SalesUnit

SalesItemsPerUnit

Purchase

from PurchaseUnit

PurchaseUnit

PurchaseItemsPerUnit

Conditions avoid emitting duplicate/empty sales or purchase units when they match inventory or each other (not-equal / logical checks in MapForce).

For full multi-level packaging in WMS, maintain a proper UoM group and item UoM/barcode collections in B1. Relying only on sales/purchase unit strings is a fallback.

3.5 Dimensions (canonical WMS units)

Per unit, dimensions are normalized to:

WMS field

Unit

Conversion idea

weightInGr

grams

B1 weight × (measure’s mg factor) / 1000 (and related weight-measure lookup)

lenghtInMM

millimetres

B1 length × length-measure factor to mm

heightInMM

millimetres

same

widthInMM

millimetres

same

volumeInCC

cubic centimetres

From length measures / volume fields with scale factors including 1000

Sources are the item’s ItemUnitOfMeasurementCollection (Weight1/Length1/Width1/Height1/Volume + their unit codes), joined to WeightMeasures / LengthMeasures by unit code.

Missing measures typically yield 0 (as in the scenario target for the base pack when no dimensions are maintained).

3.6 Barcodes

Barcodes are taken from ItemBarCodeCollection and attached to the unit whose UoM entry matches ItemBarCodeCollection.UoMEntry. Multiple barcodes per UoM are supported (array).


4. Field mapping tables

Legend columns: WMS output field | B1 / source input | What happens | Notes

4.1 Correlation

WMS output field

B1 / source input

What happens

Notes

correlation.correlationId

Integration message key

Direct

Tracing

4.2 Item header (data)

WMS output field

B1 / source input

What happens

Notes

data.itemId

ItemCode

Direct


data.name

ItemName

Direct


data.itemGroup

ItemsGroupCode + ItemGroups

Lookup group name

Not the numeric code

data.isBatch

ManageBatchNumbers

tYES→true, else false


data.isSerial

ManageSerialNumbers, ManageSerialNumbersOnReleaseOnly

If-else — see §3.2


data.serialOnOutbound

ManageSerialNumbersOnReleaseOnly

tYES→true, else false


data.isInventory

InventoryItem

tYES→true, else false


data.isEnabled

Frozen

tNO→true, else false

Inverted

data.baseUomCode

InventoryUoMEntry / InventoryUOM + UoM master

Resolve inventory UoM code

Fallbacks for manual UoM

data.units[]

UoM group + item UoM/barcodes or sales/purchase/inventory fallback

See §3.4


4.3 Units (data.units[]) — UoM group path

WMS output field

B1 / source input

What happens

Notes

units[].uomCode

UnitOfMeasurements.Code

Via alternate UoM entry


units[].uomName

UnitOfMeasurements.Name

Via alternate UoM entry


units[].numPerUom

UoM group AlternateQuantity, BaseQuantity

Divide alt ÷ base

How many base units in this UoM

units[].barcodes[]

ItemBarCodeCollection where UoMEntry matches

Collect barcodes


units[].dimension.weightInGr

Item UoM weight + WeightMeasures

Convert to grams


units[].dimension.volumeInCC

Item UoM volume/size + LengthMeasures

Convert to cc


units[].dimension.lenghtInMM

Item UoM length + LengthMeasures

Convert to mm

Spelling lenght as in WMS schema

units[].dimension.heightInMM

Item UoM height + LengthMeasures

Convert to mm


units[].dimension.widthInMM

Item UoM width + LengthMeasures

Convert to mm


4.4 Units — fallback path (no full UoM group expansion)

WMS output field

B1 / source input

What happens

Notes

Inventory unit code/name

InventoryUOM (+ code synthesis rules)

Emit unit with numPerUom = 1

When group path empty

Sales unit

SalesUnit, SalesItemsPerUnit

Optional extra unit

Skipped if equal to inventory under mapping rules

Purchase unit

PurchaseUnit, PurchaseItemsPerUnit

Optional extra unit

Skipped if duplicate under mapping rules


5. Value translations (reference)

B1 value

WMS meaning (typical)

tYES

true (batch, serial, inventory, serial-on-outbound)

tNO on Frozen

isEnabled = true

Other / missing on yes-maps

false (custom default on valuemaps)

Frozen = tYES

isEnabled = false


6. What is not mapped / caveats

Topic

Behavior

Prices, VAT, GL accounts, warehouses on item

Not part of this WMS item contract

Full B1 item UI fields beyond wired schema

Ignored unless present in MFD

Consumer before config load

No item processing until masters loaded and route started

Stale masters

Masters refresh hourly; UoM/group changes may lag up to the timer period

Scenario 2_Zonder_UOM targets in repo

Empty sample targets; behavior follows fallback UoM path in MFD

Dimension spelling

WMS field is lenghtInMM (schema spelling)


7. Example (scenario 1_Item_with_units_of_measure)

B1 input (excerpt)

Field

Example

ItemCode

R00001

ItemName

Printer Papier A4 Wit

ItemsGroupCode

100 → group name Artikel

InventoryItem

tYES

ManageBatchNumbers / ManageSerialNumbers

tNO

Frozen

tNO → enabled

InventoryUoMEntry

1

UoM group + barcodes

Multiple UoMs (Pak, 6Pack, Doos, Pallet, Klein Pak) with barcodes

WMS output (excerpt from 99_target.json)

WMS field

Example

data.itemId

R00001

data.name

Printer Papier A4 Wit

data.itemGroup

Artikel

data.isBatch / isSerial

false

data.isInventory / isEnabled

true

data.baseUomCode

1

Unit 1 Pak

numPerUom = 1, barcodes 2013475869, 2013654987

Unit 2 6Pack

numPerUom = 6, dimensions filled (e.g. weight 15000 g)

Unit 3 Doos

numPerUom = 24

Unit 4 Pallet

numPerUom = 48

Unit 5 Klein Pak

numPerUom = 0.5


8. End-to-end expectation

  1. Integration starts and loads UoM, UoM groups, item groups, length/weight measures from B1.

  2. Kafka item consumer starts.

  3. B1 item change/publish arrives on from.kafka.

  4. Mapper builds WMS item JSON (flags, group name, units, barcodes, dimensions).

  5. Message is sent to to.kafka for WMS Items.

  6. Use correlation.correlationId and ItemCode for support.


9. Implementation checklist for consultants

  1. Maintain Item Groups, UoMs, UoM groups, and length/weight measures in B1 before go-live.

  2. For multi-level packaging, assign a proper UoM group and item UoM/barcode rows—not only free-text sales units.

  3. Understand Frozen → WMS disabled (isEnabled = false).

  4. Align serial expectations with ManageSerialNumbers vs ManageSerialNumbersOnReleaseOnly (§3.2).

  5. Fill item UoM dimensions in B1 if WMS needs weight/volume for logistics.

  6. After restart, confirm configuration load completed before expecting item messages to flow.

  7. Trace with correlation.correlationId and itemId (ItemCode).


10. Source artifacts

Artifact

Role

mappings/items/item-mapping.mfd

MapForce mapping (field logic)

mappings/items/input_item.schema.json

B1 item schema

mappings/items/output_item.schema.json

WMS item schema

mappings/items/input_*measures*.schema.json / UoM schemas

Master data contracts

src/.../route/MainRoutes.java

Kafka in/out, Items endpoint header

src/.../route/ConfigurationRoute.java

Hourly master data + start consumer

src/.../mapper/Mapper.java

Runs MapForce with item + masters + correlation

scenario_files/1_Item_with_units_of_measure/

Sample source/target


Generated from the mapping definition and integration behavior in this project. If the MapForce mapping or master-data load changes, update this document.


Maintaining this document

For the original documentation intent, when to update, source-of-truth checklist, and a ready-made refresh prompt, see README.md and the repository AGENTS.md.