Functional documentation for the Aiden WMS purchase order mapper (outbound).
This document describes what happens after the mapper is installed: how a SAP Business One (B1) purchase order becomes a WMS incoming/receipt document, which lines are included, and which field rules apply. It is intended for end-users and functional consultants.
1. Overview
|
|
|
|---|---|
|
Source |
SAP B1 Purchase Order (Service Layer document JSON on Kafka) |
|
Target |
Aiden WMS Incoming document ( |
|
Purpose |
Create a WMS receipt expectation from an open B1 purchase order |
After installation, when a purchase order is published to the integration, the mapper produces a WMS document that contains:
-
Document identity and base type
PurchaseOrder -
Vendor (business partner)
-
Receive date
-
Filtered order lines (inventory items on picking warehouses only)
-
Remaining open quantities
-
Optional expenses and customer reference (
NumAtCard) -
Correlation id for tracking
Fixed business defaults
|
WMS field |
Fixed value |
Meaning |
|---|---|---|
|
|
|
Document originates from a purchase order |
|
|
|
Object type label for downstream WMS/integration |
2. What the mapper uses as input
2.1 Main payload — B1 purchase order
The primary input is the B1 purchase order document, including for example:
-
Header:
DocNum,DocEntry,CardCode,CardName,DocDueDate,DocumentStatus,NumAtCard -
Lines:
DocumentLines[](LineNum,ItemCode,WarehouseCode,LineStatus,RemainingOpenQuantity, UoM fields,FreeText, line expenses) -
Header expenses:
DocumentAdditionalExpenses[]
DocNum is also used as the integration external application id for monitoring.
2.2 Inventory item enrichment (automatic, per message)
Before mapping, the integration calls B1 Items for every distinct line item code on the PO:
-
$select=ItemCode,InventoryItem -
Requests are batched (
max.items.from.service.layer, default 20 item codes per call)
Business impact: only lines whose item is an inventory item (InventoryItem = tYES) are sent to WMS. Non-inventory items (services, non-stock, etc.) are dropped.
2.3 Warehouse list (automatic, hourly)
The integration periodically loads warehouses from B1:
-
WarehouseCode -
U_AEN_WHS_Picking(Y/N) -
(also retrieved:
EnableBinLocations,DefaultBin— not used as primary line filter in this mapping)
Business impact: only lines whose warehouse is marked picking-enabled (U_AEN_WHS_Picking = Y) are sent to WMS.
2.4 Correlation id
Integration message key → correlation.correlationId.
3. Business behavior
3.1 Which lines are sent to WMS?
A B1 PO line is included in data.lines only when both are true:
-
Enriched item master has
InventoryItem = tYESfor thatItemCode -
Line
WarehouseCodematches a warehouse withU_AEN_WHS_Picking = Y
Otherwise the line is omitted.
Configure inventory flags on items and picking warehouses in B1 before go-live. Otherwise receipts may miss lines or include none.
3.2 Quantity = remaining open quantity
WMS line quantity is mapped from B1 RemainingOpenQuantity, not from the original ordered Quantity.
|
Situation |
Effect in WMS |
|---|---|
|
Fully open line |
Open qty ≈ ordered qty |
|
Partially received in B1 |
Only remaining open qty is expected in WMS |
|
Fully closed / fully received ( |
Line can still appear (if filters pass) with quantity 0 and closed status |
This is critical for consultants: the mapper is aimed at what is still open to receive, not the original PO quantity.
3.3 Document and line status
B1 statuses look like bost_Open / bost_Close.
|
Level |
B1 field |
Transformation |
WMS field |
|---|---|---|---|
|
Header |
|
Strip prefix |
|
|
Line |
|
Strip |
|
|
B1 line value |
WMS line status |
|---|---|
|
|
|
|
|
|
Header status strip does not apply the Close→Closed valuemap in the same way as lines; header typically becomes Open / Close after removing bost_.
3.4 Unit of measure (uomCode)
For each included line:
-
If
UoMEntryis not-1→ useUoMCode -
If
UoMEntryis-1→ use"m" + MeasureUnit-
Missing
MeasureUnitis substituted with empty → result can be justm
-
Examples from scenario-style data: manual UoM (UoMEntry = -1) with MeasureUnit = Pallet → mPallet; empty measure → m.
3.5 Receive date
data.receiveDate ← DocDueDate (PO due date becomes expected receive date in WMS).
3.6 Customer / vendor reference (NumAtCard)
If filled, NumAtCard is exposed as a dynamic custom property:
-
Property name:
NumAtCard -
Property value: B1
NumAtCard
3.7 Additional expenses
-
Header
DocumentAdditionalExpenses→data.customFields.DocumentAdditionalExpenses[] -
Line
DocumentLineAdditionalExpenses→lines[].customFields.DocumentAdditionalExpenses[]
Copied fields include ExpenseCode, LineTotal, GroupCode, DistributionMethod, VatGroup, LineNum.
4. Field mapping tables
Columns: WMS output field | B1 / source input | What happens | Notes
4.1 Correlation
|
WMS output field |
B1 / source input |
What happens |
Notes |
|---|---|---|---|
|
|
Integration message key |
Direct |
Tracing |
4.2 Document header (data)
|
WMS output field |
B1 / source input |
What happens |
Notes |
|---|---|---|---|
|
|
|
Direct |
|
|
|
— |
Constant |
Always |
|
|
|
Direct |
Expected receive date |
|
|
|
Strip |
e.g. |
|
|
(if mapped / empty in samples) |
Often empty unless source has remarks wired |
Check MFD if comments are required |
|
|
|
Direct |
Internal B1 key |
|
|
— |
Constant |
Always |
|
Dynamic property |
|
Name constant + value |
When filled in B1 |
4.3 Business partner
|
WMS output field |
B1 / source input |
What happens |
Notes |
|---|---|---|---|
|
|
|
Direct |
Vendor |
|
|
|
Direct |
|
4.4 Lines (data.lines[])
Only lines that pass inventory item + picking warehouse filters (§3.1).
|
WMS output field |
B1 / source input |
What happens |
Notes |
|---|---|---|---|
|
|
|
Direct |
|
|
|
|
Direct |
Must be picking-enabled |
|
|
|
Direct |
Must be inventory item |
|
|
|
Direct |
Not ordered |
|
|
|
Conditional — see §3.4 |
|
|
|
|
Strip |
|
|
|
|
Direct |
|
|
|
|
Direct |
Same as document line |
|
|
(schema may allow; not always wired) |
— |
Primary receive date is header |
4.5 Expenses
|
WMS output field |
B1 / source input |
What happens |
Notes |
|---|---|---|---|
|
|
Header expenses |
Direct field copy |
ExpenseCode, LineTotal, GroupCode, DistributionMethod, VatGroup, LineNum |
|
|
Line expenses |
Direct field copy |
Same structure |
5. Value translations (reference)
5.1 Status
|
B1 |
After processing |
|---|---|
|
|
Header: |
|
|
Header: |
5.2 Warehouse picking
|
|
Line included? |
|---|---|
|
|
Yes (if also inventory item) |
|
|
No |
5.3 Inventory item enrichment
|
B1 |
Line included? |
|---|---|
|
|
Yes (if also picking warehouse) |
|
|
No |
5.4 Constants
|
Constant |
WMS usage |
|---|---|
|
|
|
|
|
|
|
|
Dynamic property name |
|
|
UoM fallback building blocks |
6. What is not mapped / caveats
|
Topic |
Behavior |
|---|---|
|
Non-inventory items |
Excluded via Items enrichment |
|
Non-picking warehouses |
Excluded via warehouse master |
|
Ordered quantity |
Not mapped; open qty is used |
|
Prices, VAT, freight as financials |
Only expense structures that are explicitly mapped |
|
Bill-to / full address block |
Not part of this receipt schema mapping |
|
|
Null / unused in samples |
|
Batch size for item GET |
Default 20 codes per Service Layer call; large POs are chunked |
7. Example (scenario 1_PurchaseOrder)
B1 input (excerpt)
|
Field |
Example |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
Lines |
|
|
Items enrichment |
|
WMS output (excerpt from 3_target.json)
|
WMS field |
Example result |
|---|---|
|
|
|
|
BP |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Lines included |
Inventory items only — |
|
Line quantities |
|
|
Line status |
|
|
|
|
Use this scenario to validate filters + open qty, not a happy-path open receipt with positive quantities.
8. End-to-end expectation (happy path)
-
Purchase order is created/updated in B1 and published to Kafka.
-
Integration loads picking warehouses (timer) and, per message, enriches line items with
InventoryItem. -
Mapper builds WMS incoming document:
-
Header + vendor + due date
-
Only inventory lines on picking warehouses
-
Quantities = remaining open
-
-
Message is published for WMS
IncomingDocument. -
Trace with
correlation.correlationIdandcustomFields.externalId(DocEntry).
9. Implementation checklist for consultants
-
Mark stock items as Inventory Item in B1.
-
Set
U_AEN_WHS_Picking = Yon warehouses that must create WMS receipt work. -
Understand that WMS quantity is remaining open, not ordered qty.
-
Maintain UoM entries; know the
-1/ manual fallback (m+ measure unit). -
Expect non-inventory PO lines (freight service items, etc.) not to appear in WMS.
-
After partial GRPO in B1, republished POs should show reduced open quantities.
-
Trace with correlation id +
DocEntry/DocNum.
10. Source artifacts
|
Artifact |
Role |
|---|---|
|
|
MapForce mapping |
|
|
B1 PO schema |
|
|
WMS receipt schema |
|
|
Warehouse list |
|
|
Item enrichment schema |
|
|
Kafka in/out, |
|
|
Items GET batch enrichment |
|
|
Warehouse timer load |
|
|
MapForce runner |
|
|
Sample PO → target |
Generated from the mapping definition and integration behavior in this project. If the MapForce mapping or enrichment rules change, 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.