Functional documentation for the Aiden WMS stock transfer external mapper (outbound).
This document describes what happens after the mapper is installed: how a SAP Business One (B1) stock transfer / stock transfer request becomes a WMS IncomingDocument for external warehouse receiving, which fields are mapped, and which business rules apply. It is intended for end-users and functional consultants.
1. Overview
|
|
|
|---|---|
|
Source |
SAP B1 stock transfer document (e.g. Stock Transfer Request) on Kafka |
|
Target |
Aiden WMS Incoming document ( |
|
Purpose |
Create a WMS receipt / transfer-request document so an external warehouse can receive the goods |
After installation, when a relevant B1 stock transfer document is published, the mapper produces a WMS document with:
-
Document identity and base type
TransferRequest -
A synthetic “business partner” representing the from warehouse
-
Receive date from the B1 due date
-
Lines for items to receive at the to warehouse
-
Status and object-type translations
-
Correlation id for tracking
Fixed business defaults
|
WMS field |
Fixed value |
Meaning |
|---|---|---|
|
|
|
WMS treats this as a transfer request / inbound expectation |
2. What the mapper uses as input
2.1 Main payload — B1 stock transfer document
Typical B1 fields used:
-
Header:
DocNum,DocEntry,DueDate,DocumentStatus,DocObjectCode,FromWarehouse,ToWarehouse, … -
Lines
StockTransferLines[]:-
LineNum,ItemCode,Quantity -
WarehouseCode(to warehouse on the line) -
FromWarehouseCode(from warehouse on the line) -
LineStatus,UoMEntry,UoMCode,MeasureUnit -
Optional dynamic line properties (name/value) for configurable line details
-
DocNum is also used as the integration external application id for monitoring.
2.2 Correlation id
Integration message key → correlation.correlationId.
2.3 Optional line detail configuration
Java property:
-
line.detail.fieldname(defaultNOT_SETif not configured)
When a stock transfer line carries a dynamic property whose name equals this configured value, that property’s value is written to WMS lines[].details.
If the property is not present or the config does not match, line details are not filled from that mechanism.
No separate warehouse timer or item enrichment runs in this project.
3. Business behavior
3.1 Business partner = from warehouse (important)
Unlike a purchase order mapper, the WMS business partner is not taken from CardCode / CardName for the main BP fields used here.
|
WMS field |
Rule |
|---|---|
|
|
First stock transfer line’s |
|
|
Literal prefix |
Example: first line FromWarehouseCode = 01 → BP id 01, name From Warehouse 01.
This presents the sending warehouse as the “partner” on the WMS incoming document for external receiving.
3.2 Line warehouse = destination (to)
WMS lines[].warehouseId comes from the line WarehouseCode (to warehouse), i.e. where goods should be received in the destination context—not the from warehouse.
3.3 Document and line status
B1 statuses look like bost_Open / bost_Close.
|
Level |
B1 field |
Transformation |
WMS field |
|---|---|---|---|
|
Header |
|
Strip |
|
|
Line |
|
Strip |
|
|
B1 value |
WMS status |
|---|---|
|
|
|
|
|
|
3.4 Object type
customFields.objectType is derived from B1 DocObjectCode:
|
B1 |
WMS |
|---|---|
|
|
|
|
|
|
|
Anything else |
|
Stock transfer requests in B1 commonly use object code 1250000001 → WMS StockTransferRequests.
3.5 Unit of measure (uomCode)
For each line:
-
If
UoMEntryis not-1→ useUoMCode -
If
UoMEntryis-1→ use"m" + MeasureUnit-
Missing
MeasureUnitis substituted with empty → result can be justm
-
Sample data often has UoMEntry = -1, UoMCode = Handmatig, MeasureUnit = null → WMS uomCode ≈ m.
3.6 Dates
|
WMS field |
B1 source |
|---|---|
|
|
|
|
|
Same header |
3.7 Quantity
WMS line quantity ← B1 line Quantity (as on the stock transfer line).
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 |
|
|
|
|
Strip |
|
|
|
|
Direct |
Internal B1 key |
|
|
|
Valuemap — see §3.4 |
|
|
|
— |
Not mapped / null in samples |
|
4.3 Business partner (from warehouse)
|
WMS output field |
B1 / source input |
What happens |
Notes |
|---|---|---|---|
|
|
First line |
|
Not CardCode |
|
|
|
Concat + first-items |
Synthetic name |
|
|
— |
Not used for these BP fields |
Still present on B1 payload |
4.4 Lines (data.lines[])
|
WMS output field |
B1 / source input |
What happens |
Notes |
|---|---|---|---|
|
|
|
Direct |
|
|
|
|
Direct |
|
|
|
|
Direct |
To warehouse |
|
|
|
Direct |
|
|
|
|
Direct |
|
|
|
|
Conditional — see §3.5 |
|
|
|
|
Strip |
|
|
|
Header |
Direct |
Same for all lines |
|
|
Line dynamic property matching |
If-else / equal on property name |
Optional; config-driven |
5. Value translations (reference)
5.1 Status
|
B1 |
WMS |
|---|---|
|
|
|
|
|
|
5.2 Doc object code → objectType
|
B1 |
WMS |
|---|---|
|
|
|
|
|
|
|
Other |
|
5.3 Constants
|
Constant |
Usage |
|---|---|
|
|
|
|
|
BP name prefix |
|
|
UoM fallback building blocks |
|
|
Status prefix stripped |
6. What is not mapped / caveats
|
Topic |
Behavior |
|---|---|
|
B1 |
Not used; from-warehouse is used instead |
|
Prices, currency, discounts |
Not mapped |
|
Serial/batch arrays on B1 lines |
Not expanded into WMS line batch/serial structures in this MFD |
|
Bin allocations |
Not mapped to WMS lines here |
|
Header |
Line-level From/To codes drive BP and warehouseId |
|
Expenses |
Output schema allows expense custom fields; not traced as populated from this MFD’s simple line set |
|
Line details without config |
Require correct |
7. Example (from mapping sample input)
B1 input (excerpt)
|
Field |
Example |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
Line 0 |
Item |
|
Line 1 |
Item |
Expected WMS shape (from mapping rules)
|
WMS field |
Expected |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Line warehouses |
|
|
Line items / qty |
|
|
Line status |
|
|
Line |
|
Published with endpoint header IncomingDocument.
8. End-to-end expectation
-
B1 creates/updates a stock transfer request (or related document) for an external warehouse flow.
-
Document is published to Kafka.
-
Mapper builds a WMS IncomingDocument: transfer-request base type, from-warehouse as BP, to-warehouse on lines.
-
Message is sent to WMS for receiving.
-
Trace with correlation id,
DocNum, andcustomFields.externalId(DocEntry).
9. Implementation checklist for consultants
-
Confirm B1 documents use the expected
DocObjectCode(e.g.1250000001for STR →StockTransferRequests). -
Understand WMS BP is the from warehouse, not the B1 card.
-
Understand WMS line warehouse is the to warehouse.
-
Maintain UoM entries; know the
-1/ manual fallback (m+ measure unit). -
If line remarks/details are required in WMS, configure
line.detail.fieldnameto the B1 line property name used in the payload. -
Align external warehouse processes with
baseType = TransferRequest. -
Trace with correlation id + DocEntry/DocNum.
10. Source artifacts
|
Artifact |
Role |
|---|---|
|
|
MapForce mapping |
|
|
MapForce project |
|
|
B1 input contract |
|
|
WMS output contract |
|
|
Sample B1 input |
|
|
Kafka in/out, |
|
|
MapForce runner ( |
Generated from the mapping definition and integration routes in this project. If the MapForce mapping or configuration properties 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.