Automatic Inventory Update: Functional Overview
The Automatic Inventory Update functionality ensures that stock levels remain perfectly accurate and related Transfer Requests (TRs) are properly managed when a Procurement Request (PR) concludes its lifecycle.
When a PR reaches a final delivery state (Partially Delivered, Completely Delivered, or Not Delivered), the system automatically triggers a highly structured, asynchronous inventory update process. This ensures full traceability, prevents duplicate entries, and fully automates the replenishment of both central and mobile warehouses.
Processing Triggers & State Management
The inventory update is managed asynchronously via a dedicated technical field on the PR: Inventory Update Status.
-
On hold: This status requires a manual action to trigger the inventory update.
-
In Progress: This status active allows the system to perform the stock movements and TR updates when the PR reaches a final status.
-
Done: The state confirming that all warehouse levels and documents have been successfully updated.
Processing Modes
The system dynamically executes one of two distinct workflows based on the nature of the Procurement Request.
Scenario A: PR Linked (Associated with a Transfer Request)
In this scenario, materials are destined for a mobile warehouse via an intermediate central warehouse.
Execution Steps:
-
Critical Section Lock: The system acquires a lock to ensure atomic operations (preventing other movements from interlacing in the involved warehouses).
-
Status: in that moment the delivered status is In Progress.
-
Identification: Identifies the Central Warehouse (intermediate), the associated TR, and the target Mobile Warehouse.
-
Central Warehouse Load: Performs load/increase movements in the central warehouse (one per PR line item, strictly into Free Stock). Records serial numbers if applicable.
-
Aggregation: If the same material exists across multiple PR lines, the quantities are dynamically summed, and the serial sets are merged.
-
TR Update & Send: * Populates the TR's "sent" quantities using the PR's delivered amounts.
-
Populates serial numbers on the TR.
-
Automatically triggers the TR Send operation. (This creates a corresponding decrease/discharge movement in the central warehouse).
-
-
Completion: Update the PR delivered status to Done. The critical section lock is released.
Scenario B: PR Independent (No Transfer Request)
In this scenario, materials are destined solely to replenish the central warehouse.
Execution Steps:
-
Critical Section Lock: Acquired for atomicity.
-
Status Update: in that moment the delivered status is In Progress..
-
Identification: Identifies the target Central Warehouse.
-
Central Warehouse Load: Performs load/increase movements based on delivered quantities directly into Free Stock. Records serial numbers if applicable.
-
Inventory Update: Movement history is recorded, and overall stock levels are permanently updated.
-
Completion: Update the PR delivered status to Done. The critical section lock is released.
Core Execution & Validation Rules
-
Aggregation Rule: To prevent fragmented stock entries, if materials with the exact same ID are present across multiple PR position lines, the system must aggregate the total quantity and merge the corresponding set of serial codes into a unified stock entry.
-
Transactional Atomicity: The critical section must guarantee that no partial updates occur. If processing fails at any point, the system guarantees data consistency. The status remains In Progress (or moves to a recoverable error state), and a retry mechanism is supported.