Fluent Commerce Logo
Docs
Sign In

Inventory Batch

Essential knowledge

Author:

Fluent Commerce

Changed on:

9 Feb 2025

Overview

Batch enables bulk uploading of updates to the Fluent Commerce platform, handling high data volumes from thousands to million updates per operation. Leveraging Fluent 's Batch API and Inventory Batch Pre-Processing, it ensures faster processing and accurate availability in the Fluent Management System. 

This scalable solution keeps data synchronized across channels, empowering businesses to manage stock efficiently and meet customer expectations with accurate, up-to-date stock information.

Key points

  • Use Cases for Inventory Batch
  • Platform Capabilities leveraged
  • Best practices for Inventory Batch
  • Reference Inventory Module and Inventory Batch

Use Cases for Inventory Batch

  • Periodic Stock Updates:
    Designed to handle periodic inventory updates from an ERP or similar inventory source of truth. These updates typically consolidate changes collected during a predefined cycle, such as daily updates, ensuring that the OMS reflects the most current stock levels.
  • Stocktake Adjustments:
    Used to inform the OMS of stock adjustments following manual stocktakes. This ensures that any discrepancies, such as missing or damaged stock, are accounted for accurately.


Platform Capabilities leveraged by the Inventory Batch

Capability

Description

Job API & Batch API

APIs to create & manage batch loading of information.

Inventory Batch Pre-Processing

Optimized processing by de-duplicating redundant updates and filtering out unchanged records.


Best Practices for Inventory Batch

To ensure successful , consider the following key factors:

  • Optimal use of Jobs and Inventory Batch Pre-Processing
  • Inventory Batch Sizing
    • Size of Inventory Batches
    • Number of Inventory Batches
    • Spread of Inventory Batches
    • What about small real-time inventory updates?
  • Visibility of successful Batch processing 

Jobs and Inventory Batch Pre-Processing

Jobs are used to group Batches, providing a structured way to track each distinct set of Batches sent together. This grouping enables better visibility into the success or failure of related updates, ensuring that processing is efficient and transparent.

  • A single Job remains open until midnight on the day it is created.
  • It is recommended to create a new Job for each Inventory Batch group, especially for periodic updates like hourly Inventory Updates.
    Example:
    If sending updates hourly, create a separate Job for each hour’s batch run to maintain clarity and tracking.

Additionally, Jobs determines whether  Batch Pre-Processing is applied to the associated Batches. This ensures redundant updates are removed and unchanged records are filtered before processing, optimizing the handling of data. For more information, refer to the details on Inventory Batch Pre-Processing.

Inventory Batch Sizing

Size of Inventory Batches

Batches are restricted to a maximum of 5,000 records per batch. For larger datasets, the updates must be divided into multiple batches, with each batch adhering to this limit.

Example:
If you need to upload 1,000,000 updates, split them into 200 batches of 5,000 records each to ensure compliance and efficient processing.

Number of Inventory Batches

While each Batch can contain up to 5,000 records, sending only a small number of batches may reduce processing efficiency. The Batch API is designed to handle multiple datasets concurrently, distributing the workload across the platform for asynchronous processing. To maximize performance, it is recommended to spread a full dataset across 10 individual Batches.

Example:
For 15,000 updates, instead of splitting them into 3 batches of 5,000 records each, divide them into 10 datasets of 1,500 records. This ensures optimal load distribution. As update volumes grow, the integration should scale accordingly, maintaining a minimum of 10 datasets until individual batches reach the 5,000-record limit, after which additional batches can be added.

Spread of Inventory Batches

When running a Job with more than 10 Batches, it’s common to have several batches containing a maximum of 5,000 records and one smaller batch with fewer records. To ensure more consistent processing, it’s recommended that the total updates be distributed evenly across all Batch datasets.

Example:
If you have 53,900 items to update, distribute them into 11 batches of 4,900 records each rather than 10 batches of 5,000 records and one batch of 3,900 records.

What about small real-time inventory updates?

For real-time or near-real-time updates, we recommend using Delta Inventory updates, which are ideal for handling incremental changes to levels instead of full data updates.

Visibility of successful Batch processing

The current best tool for visibility is to use the Inventory Domain Events to understand the success and failures of updates sent via the Batch. This provides visibility into the individual items included in the Batches.

Note: Right now, only Failures & Exception Audit Events are visible for processing.

Reference Inventory Module & Inventory Batch

The Fluent Inventory Module provides a foundational solution for integrating Batch updates into your management workflows. It is designed to calculate an accurate Stock on Hand value using a set of predefined Quantity types. These types represent various states and activities, ensuring precise management.

Key Inventory Quantity Types:

  • LAST_ON_HAND: Represents the absolute inventory count at a given location from the most recent Inventory Batch update.
  • RESERVED: Quantities allocated during the fulfilment reservation process, representing stock on hold for pending order fulfillment.
  • SALE: Quantities picked and fulfilled during the fulfilment sale process, representing items completed in an order for a customer.
  • CORRECTION: Adjustments made during the fulfilment cancellation process to account for items not found during picking or packing (e.g., short-picks), removing them from the sale.
  • DELTA: Incremental changes triggered by external systems e.g. POS, representing relative updates from external systems in the Order Management process.

These quantity types work together to calculate the Stock on Hand, providing an up-to-date value that reflects the current available for each Inventory Position. This ensures accurate visibility and supports effective decision-making in stock management and .