Aiden WMS

Notifier: Goods Delivery update

TL;DR — Aiden WMS Goods Delivery / Order Document Update Mapper (Inbound)
  • Purpose: Sync the latest WMS document status back to SAP B1 by PATCHing a single UDF (U_AEN_WMS_STATUS) on the related B1 document. No documents or lines are created; this is a minimal status-update flow.

  • What gets updated in B1:

    • U_AEN_WMS_STATUS ← WMS status (direct copy; no valuemap, no prefix stripping).

  • Which B1 document is patched:

    • Endpoint built dynamically from WMS custom fields:

      • PATCH {cf_objectType}({cf_externalId})

      • Example: ProductionOrders(13501)

  • Accepted message shapes:

    • Root contains documents[]: each element is split and patched independently.

    • Single-document payload: patched once.

  • Inputs required per document:

    • status → written to U_AEN_WMS_STATUS.

    • customFields.cf_objectType → B1 Service Layer collection name (e.g., Orders, ProductionOrders).

    • customFields.cf_externalId → B1 key (typically DocEntry).

  • Routing behavior:

    • HTTP method: PATCH.

    • HTTP endpoint: derived from cf_objectType + cf_externalId.

    • No B1 GET/enrichment step.

  • What is intentionally not done:

    • No creation of Deliveries, Issues, Returns, or any lines.

    • No mapping of lines, batches, serials, packages, expenses, or comments.

    • Does not set native B1 DocumentStatus—only the UDF.

  • End-to-end flow:

    • WMS publishes status (single or documents[]).

    • Integration splits (if needed), maps { "U_AEN_WMS_STATUS": "<status>" }.

    • PATCH to {cf_objectType}({cf_externalId}).

    • B1 document shows the latest WMS status in U_AEN_WMS_STATUS.

  • Consultant checklist:

    • Ensure every WMS document includes cf_objectType (valid B1 entity set) and cf_externalId (correct DocEntry).

    • Align WMS status values with B1 reporting expectations—values pass through as-is.

    • For pick lists, verify each documents[] entry has its own status and custom fields.

    • Remember: this mapper has no inventory or line side-effects—status UDF update only.

Functional documentation for the Aiden WMS goods delivery / order document update mapper (inbound).

This document describes what happens after the mapper is installed: how a WMS document status update is written back to SAP Business One (B1) as a PATCH on the related B1 document. It is intended for end-users and functional consultants.


1. Overview



Source

Aiden WMS order/document status message (Kafka) — single document or pick-list with documents[]

Target

SAP B1 document UDF update via Service Layer PATCH

Purpose

Synchronize WMS document status onto the linked B1 document (U_AEN_WMS_STATUS)

This is a minimal status-sync integration. It does not create deliveries, issues, returns, or lines. It only patches a status UDF on an existing B1 document.

What gets updated

B1 field

Meaning

U_AEN_WMS_STATUS

Latest WMS document status (e.g. Started, Closed)

Which B1 document is patched?

The Service Layer endpoint is built at runtime from WMS custom fields:

PATCH {cf_objectType}({cf_externalId})

Example: customFields.cf_objectType = ProductionOrders and cf_externalId = 13501

PATCH ProductionOrders(13501)

with body:

JSON
{ "U_AEN_WMS_STATUS": "Closed" }


2. What the mapper uses as input

2.1 Message shapes

The integration accepts two payload shapes:

Shape

How it is handled

Root object with documents array (e.g. pick-list completion)

Each element of documents[] is split and mapped/published separately

Single document object (no documents array)

Mapped and published once

After split (if any), each unit is treated as one WMS document with at least:

  • status — WMS status string

  • customFields.cf_objectType — B1 entity set / object collection name

  • customFields.cf_externalId — B1 document key (typically DocEntry)

Other WMS fields (documentId, baseType, business partner, lines, etc.) may be present on the message but are not mapped into the B1 PATCH body.

2.2 Correlation / monitoring

Value

Source

Use

Integration message id

Kafka key

XIAM correlation

Mapped status

Per document after MapForce

Published with PATCH headers

There is no separate B1 GET enrichment step in this project.


3. Business behavior

3.1 Split multi-document messages

If the Kafka payload contains $.documents:

  1. The route logs that an array of documents was received.

  2. Each document is processed independently through the mapper.

  3. Each document produces its own Kafka outbound message with its own PATCH endpoint.

If documents is absent, the whole body is one document.

3.2 Status mapping

WMS field

B1 field

Rule

status

U_AEN_WMS_STATUS

Direct copy (no valuemap)

Examples from project scenarios:

WMS status

B1 U_AEN_WMS_STATUS

Closed

Closed

Started

Started (when sent)

Any status string WMS sends is written as-is. Consultants should align allowed WMS statuses with what B1 users expect on the UDF.

3.3 Dynamic PATCH endpoint

Before publish, Camel sets:

Header

Value

HTTP method

PATCH

HTTP endpoint

{cf_objectType}({cf_externalId})

WMS custom field

Role

Example

customFields.cf_objectType

B1 Service Layer entity set name

ProductionOrders, Orders, …

customFields.cf_externalId

B1 document key in the URL

13501, 13502

Consultant impact:

  • cf_objectType must match a real B1 Service Layer collection (plural entity set name).

  • cf_externalId must be the correct B1 key (usually DocEntry) for that document.

  • Wrong values patch the wrong document or fail the Service Layer call.

  • These fields are not produced by MapForce; they are read only in the Camel route for headers.

3.4 What is intentionally not done

  • No line, batch, serial, package, or expense mapping

  • No creation of new B1 documents (PATCH only)

  • No warehouse master or BOM logic

  • No status translation table in MapForce


4. Field mapping tables

Columns: B1 target field | WMS / source input | What happens | Notes

4.1 PATCH body (MapForce)

B1 target field

WMS / source input

What happens

Notes

U_AEN_WMS_STATUS

status

Direct copy

Only mapped body field

4.2 PATCH routing (Camel — not in MapForce body)

Runtime setting

WMS / source input

What happens

Notes

HTTP method

Constant PATCH

Always

HTTP endpoint

customFields.cf_objectType, customFields.cf_externalId

Format type(id)

Required for correct B1 target

Multi-doc fan-out

Root documents[]

Split then map each

Optional message shape

4.3 Not mapped (examples)

Although the output schema lists a full B1 document shape, the following are not written by this mapper (non-exhaustive):

Topic

Behavior

DocumentLines, packages, expenses

Unwired

CardCode, dates, comments

Unwired

U_AEN_WMS_TRANSID

Unwired in this MFD

WMS documentId / baseType / lines

Not used in PATCH body


5. Value translations (reference)

5.1 Status

WMS

B1 U_AEN_WMS_STATUS

(any string)

Same string

No closed/open prefix stripping and no valuemap in this project.

5.2 Endpoint pattern

Inputs

Result

cf_objectType=ProductionOrders, cf_externalId=13501

ProductionOrders(13501)

cf_objectType=Orders, cf_externalId=962

Orders(962)

5.3 Message handling

Payload

Behavior

Has documents array

One PATCH message per document element

No documents array

One PATCH message for the root document


6. What is not mapped / important omissions

Topic

Behavior

Full B1 document update

Only status UDF is mapped

Document create/close in B1 native status

Does not set B1 DocumentStatus; only U_AEN_WMS_STATUS

Validation of object type / DocEntry

No mapper-side check; failures surface at Service Layer

Lines / inventory / serials

Out of scope for this mapper


7. End-to-end expectation (happy path)

  1. WMS updates an order/document status (or closes documents on a pick list).

  2. Integration receives Kafka message (single document or documents[]).

  3. For each document:

    • Map status{ "U_AEN_WMS_STATUS": "<status>" }

    • PATCH cf_objectType(cf_externalId) on B1

  4. B1 document shows the latest WMS status on UDF U_AEN_WMS_STATUS.


8. Example (from project scenarios)

8.1 Multi-document style (scenario_files/1_mainRoute)

Input (excerpt):

Field

Value

Root

documents[] with one production order document

status

Closed

cf_objectType

ProductionOrders

cf_externalId

13502

Expected output body:

JSON
{ "U_AEN_WMS_STATUS": "Closed" }

Expected PATCH endpoint: ProductionOrders(13502)

8.2 Single document (scenario_files/2_single_message)

Input (excerpt):

Field

Value

status

Closed

cf_objectType

ProductionOrders

cf_externalId

13501

Expected output body:

JSON
{ "U_AEN_WMS_STATUS": "Closed" }

Expected PATCH endpoint: ProductionOrders(13501)

8.3 MapForce sample (inputExample.json)

WMS

B1 body

status: Started

U_AEN_WMS_STATUS: Started

(Endpoint still depends on cf_objectType / cf_externalId on the runtime message; the tiny MapForce example only demonstrates the status field.)


9. Implementation checklist for consultants

  1. Ensure every WMS document carries customFields.cf_objectType (correct B1 collection name).

  2. Ensure customFields.cf_externalId is the B1 DocEntry (or key) of the document to update.

  3. Align WMS status values with reporting/UDF expectations in B1.

  4. Remember this flow only updates U_AEN_WMS_STATUS — it does not post goods movements.

  5. For pick-list messages, confirm each entry under documents[] has its own custom fields and status.

  6. Do not expect line-level or inventory side effects from this mapper.


10. Source artifacts (for reference)

Artifact

Role

mappings/order-document-update.mfd

MapForce mapping (statusU_AEN_WMS_STATUS)

mappings/inputSchema.json / inputExample.json

WMS input contract / sample

mappings/outputSchema.json

B1-shaped output schema (mostly unused fields)

src/.../route/MainRoutes.java

Split documents[], PATCH headers, Kafka

src/.../mapper/Mapper.java

MapForce runner

scenario_files/1_mainRoute/

Multi-document sample

scenario_files/2_single_message/

Single-document sample


Generated from the mapping definition and integration behavior in this project. If the MapForce mapping or routing 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.