Functional documentation for the Aiden WMS goods receipt → inventory inbound mapper.
This document describes what happens after the mapper is installed: which SAP Business One (B1) goods receipt / purchase delivery note data is sent to Aiden WMS, how values are translated, and which business rules apply. It is intended for end-users and functional consultants.
1. Overview
|
|
|
|---|---|
|
Source |
SAP B1 Purchase Delivery Note / Goods Receipt PO (Service Layer document JSON) |
|
Target |
Aiden WMS inventory inbound document ( |
|
Purpose |
Convert a posted B1 goods receipt into an ad-hoc WMS inventory inbound so stock can be booked into WMS |
After installation, when a B1 goods receipt (purchase delivery note) is published to the integration, the mapper produces a WMS inventory inbound that contains:
-
Fixed reason PDN (“Ad-Hoc Purchase Delivery Note”)
-
Supplier identification (
CardCode/CardName) and B1DocNum -
One or more inventory lines derived from B1 document lines, expanded when serials or batches exist
-
Warehouse, synthetic bin id, item, quantity, UoM, optional serial/batch/expiry
-
Correlation id for tracking
Fixed business defaults
|
WMS field |
Fixed value |
Meaning for WMS |
|---|---|---|
|
|
|
Goods receipt / purchase delivery note origin |
|
|
|
Human-readable reason |
|
Line |
|
Appended to warehouse code (e.g. This is a placeholder in the template. Should be replaced when used. |
|
Serial line |
|
Always one unit per serial line |
Runtime endpoint
After mapping, the Camel route sets the outbound endpoint header to:
-
InventoryInbound
There is no warehouse master load and no BOM helper in this project (unlike sales order / sales return mappers).
2. What the mapper uses as input
2.1 Main payload — B1 goods receipt (Purchase Delivery Note)
The primary input is the full B1 document JSON (Service Layer entity), typically a purchase delivery note (oPurchaseDeliveryNotes), including for example:
-
Header:
DocNum,CardCode,CardName -
Lines:
DocumentLines[]withItemCode,Quantity,WarehouseCode,UoMEntry,UoMCode,MeasureUnit,UnitsOfMeasurment,FreeText -
Optional line children:
-
SerialNumbers[](InternalSerialNumber,ItemCode, …) -
BatchNumbers[](BatchNumber,ExpiryDate,ItemCode,Quantity, …)
-
2.2 Correlation id
The message correlation id (integration message key / Kafka key) is passed into MapForce as parameter exchangeProperty and written to:
-
correlation.correlationId
Use this to trace a WMS inventory inbound back to the integration message.
DocNum is also registered as the integration external application id (monitoring), separate from the mapped JSON body.
3. Business behavior
3.1 Why three kinds of WMS lines?
MapForce emits up to three parallel line expansions from each B1 document line context (clone objects on the output array). Practically:
|
Expansion |
When it produces WMS lines |
Quantity source |
|---|---|---|
|
Plain item line |
When the batch filter treats the batch number as empty (string compare result mapped: only |
B1 line |
|
Serial lines |
When a serial’s |
Constant |
|
Batch lines |
When batch number is present (after null/missing substitute) |
|
A single B1 line can therefore result in multiple WMS lines if it carries serials and/or batches, in addition to the plain-line path when the batch-empty filter allows it.
Consultant impact: WMS may receive more lines than B1 line count. Serial-managed and batch-managed items expand into tracking-specific lines. Validate UoM factors (
UnitsOfMeasurment) for batch quantities.
3.2 Document line numbering
WMS documentLine is not taken from B1 LineNum.
It is generated with MapForce auto-number, using start and step 1.
The same auto-number stream feeds plain, serial, and batch expansions, so line numbers are sequential across generated WMS lines (not necessarily aligned 1:1 with B1 LineNum).
3.3 Warehouse and bin
|
WMS field |
Rule |
|---|---|
|
|
Direct copy of B1 line |
|
|
Concatenate This is a placeholder in the template. Should be replaced when used. |
Example: warehouse 01 → bin id 01-ONT1.
There is no filter on picking-enabled warehouses in this mapper (all document lines participate in the mapping structure as defined).
3.4 Unit of measure (uomCode)
For each generated line (plain / serial / batch expansions share the same UoM logic from the parent B1 line):
-
If
UoMEntryis not-1→ useUoMCode -
If
UoMEntryis-1→ use"m" + MeasureUnit-
Missing
MeasureUnitis substituted with empty string before concat (result can be justm)
-
3.5 Plain item lines
-
Filter: batch number path is null-substituted to empty string, then compared; valuemap keeps only compare result
0(default false → line suppressed for other compare results). -
itemId← B1 lineItemCode -
quantity← B1 lineQuantity -
No
batchNumber,expiryDate, orserialNumberon this expansion
3.6 Serial lines
-
Filter: B1
SerialNumbers.InternalSerialNumberis not null -
One WMS line per serial record
-
itemId← serial’sItemCode(not necessarily re-read only from parent line) -
quantity← constant1 -
serialNumber←InternalSerialNumber(after missing → empty substitute on the serial path used for filters/output as wired) -
No batch/expiry on this expansion
3.7 Batch lines
-
Filter: batch number is not null (after missing substitute on the batch value path)
-
One WMS line per batch record
-
itemId← batch’sItemCode -
quantity←BatchNumbers.Quantitydivided by lineUnitsOfMeasurment -
batchNumber← batchBatchNumber -
expiryDate← batchExpiryDate -
No serial on this expansion
If
UnitsOfMeasurmentis 0 or inconsistent, batch quantities in WMS will be wrong. Ensure B1 line UoM factors are correct for batch-managed items.
3.8 Line details
On all three expansions, WMS details is filled from the B1 line FreeText.
3.9 Header custom fields and reason
|
WMS field |
Source |
|---|---|
|
|
Constant |
|
|
Constant |
|
|
B1 |
|
|
B1 |
|
|
B1 |
data.owner and data.details are not mapped.
4. Field mapping tables
Legend:
-
WMS output field — path in the Aiden WMS inventory inbound document
-
B1 / source input — field on the goods receipt or other source
-
What happens — copy or transformation
-
Notes — consultant-relevant remarks
4.1 Correlation
|
WMS output field |
B1 / source input |
What happens |
Notes |
|---|---|---|---|
|
|
Integration message key |
Direct (MapForce param |
End-to-end tracing |
4.2 Header (data)
|
WMS output field |
B1 / source input |
What happens |
Notes |
|---|---|---|---|
|
|
— |
Constant |
Always |
|
|
— |
Constant |
Always |
|
|
— |
Not mapped |
|
|
|
— |
Not mapped |
|
|
|
|
Direct |
Supplier code |
|
|
|
Direct |
Supplier name |
|
|
|
Direct |
B1 document number |
4.3 Shared line fields (all expansions)
|
WMS output field |
B1 / source input |
What happens |
Notes |
|---|---|---|---|
|
|
— |
Auto-number start/step |
Not B1 |
|
|
|
Direct |
|
|
|
— |
Direct |
|
|
|
|
Conditional — see §3.4 |
From parent line |
|
|
|
Direct |
|
|
|
— |
Not mapped |
|
|
|
— |
Not mapped |
|
|
|
— |
Not populated meaningfully |
Schema placeholders only |
4.4 Plain item expansion
|
WMS output field |
B1 / source input |
What happens |
Notes |
|---|---|---|---|
|
Line included? |
Batch number empty filter |
Compare + valuemap ( |
See §3.5 |
|
|
|
Direct |
|
|
|
|
Direct |
|
|
|
— |
Not set on this clone |
|
|
|
— |
Not set on this clone |
|
|
|
— |
Not set on this clone |
|
4.5 Serial expansion
|
WMS output field |
B1 / source input |
What happens |
Notes |
|---|---|---|---|
|
Line included? |
|
is-not-null filter |
One WMS line per serial |
|
|
|
Direct |
|
|
|
— |
Constant |
Always |
|
|
|
Direct (with missing substitute on path) |
|
|
|
— |
Not set on this clone |
|
4.6 Batch expansion
|
WMS output field |
B1 / source input |
What happens |
Notes |
|---|---|---|---|
|
Line included? |
|
is-not-null (after substitute) |
One WMS line per batch |
|
|
|
Direct |
|
|
|
Batch |
Divide batch qty ÷ UoM factor |
See §3.7 |
|
|
|
Direct |
|
|
|
|
Direct |
|
|
|
— |
Not set on this clone |
|
5. Value translations and constants (reference)
5.1 Fixed constants
|
Constant |
Used for |
|---|---|
|
|
|
|
|
|
|
|
UoM fallback prefix when |
|
|
UoM entry comparison |
|
|
Serial quantity; auto-number start/step |
|
|
Bin id suffix after warehouse code |
|
(empty string) |
Substitute for missing MeasureUnit / batch-serial null paths |
5.2 UoM rule
|
Condition |
|
|---|---|
|
|
|
|
|
|
5.3 Batch-empty filter (plain lines)
|
String-compare result (batch vs empty) |
Valuemap |
Plain line emitted? |
|---|---|---|
|
|
→ |
Yes |
|
Other |
default |
No |
5.4 Endpoint
|
Integration setting |
Value |
|---|---|
|
Outbound HTTP/WMS endpoint header |
|
6. What is not mapped / important omissions
Consultants should not expect the following from this mapper:
|
Topic |
Behavior |
|---|---|
|
Document status / open qty filters |
No status strip or remaining-open filter; mapping uses line structure as defined |
|
Picking warehouse flag |
Not used (no warehouse master intermediate) |
|
Prices, VAT, discounts |
Not mapped |
|
Owner / header details |
Not mapped |
|
License / carrier fields |
Not mapped |
|
Bin locations from B1 bin allocations |
Not used; bin is synthetic This is a placeholder in the template. Should be replaced when used. |
|
Scenario target sample |
|
|
Exact de-duplication of plain vs batch/serial |
Three expansions are separate MapForce clones; validate real samples for your item types |
7. End-to-end expectation (happy path)
-
A Purchase Delivery Note / Goods Receipt PO is posted in SAP B1 and published to the integration.
-
Integration sets correlation from the Kafka key and external application id from
DocNum. -
Mapper builds a WMS inventory inbound:
-
Reason
PDN/ Ad-Hoc Purchase Delivery Note -
Supplier + DocNum in custom fields
-
Lines expanded for plain / serial / batch cases
-
Bin ids as
warehouse-ONT1
-
-
Message is published with endpoint
InventoryInbound. -
WMS books ad-hoc inbound inventory accordingly.
8. Example (illustrative)
Based on mappings/inputExample.json (Purchase Delivery Note) and confirmed MapForce rules.
Scenario files under scenario_files/1_mainRoute are placeholders and are not reliable expected I/O samples.
B1 input (excerpt)
|
Field |
Example value |
|---|---|
|
Document |
Purchase Delivery Note (Goods Receipt PO) |
|
|
|
|
|
|
|
|
|
|
Line |
Item, warehouse, quantity, UoM; optional serials/batches |
WMS output (expected shape)
|
WMS field |
Example result |
|---|---|
|
Endpoint |
|
|
|
Kafka / integration message key |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
e.g. |
|
|
e.g. |
|
|
Auto-numbered 1, 2, 3, … |
|
Plain line qty |
B1 line |
|
Serial line qty |
|
|
Batch line qty |
Batch qty ÷ |
|
|
From UoM rule |
9. Implementation checklist for consultants
-
Document type: ensure the published B1 document is the intended goods receipt / PDN payload for this flow.
-
Warehouse codes: must match WMS warehouses; bin is always
WarehouseCode-ONT1— configure that bin (or accept the convention) in WMS. -
UoM: understand
-1fallback (m+ measure unit) and batch quantity ÷ UnitsOfMeasurment. -
Serial items: expect one WMS line per serial with quantity 1.
-
Batch items: expect one WMS line per batch with batch number and expiry.
-
Reason: WMS will always see reason PDN / Ad-Hoc Purchase Delivery Note (not free text from B1 comments).
-
Tracking: use
correlation.correlationIdandcustomFields.DocNumfor support. -
Do not expect picking-warehouse filtering or BOM handling from this mapper.
10. Source artifacts (for reference)
|
Artifact |
Role |
|---|---|
|
|
MapForce mapping definition (field logic) |
|
|
B1 input contract and sample |
|
|
WMS inventory inbound schema |
|
|
Kafka in/out, endpoint |
|
|
MapForce invoke (body + correlation id) |
|
|
Placeholder samples |
Generated from the mapping definition and integration behavior in this project. If the MapForce mapping changes, this document should be reviewed and updated.
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.