How to Use Direct Inventory Updates (Obsolete)
Author:
Fluent Commerce
Changed on:
30 Apr 2025
Overview
Direct Inventory Updates are one of the two reference ways to send last-on-hand inventory updates into your inventory workflows. Direct Inventory Updates are best used when you have a small volume of inventory updates (maximum of 1000 updates).Introduction
Author:
Fluent Commerce
Changed on:
30 Apr 2025
Overview
Direct Inventory Updates are one of the two reference ways to send last-on-hand inventory updates into your inventory workflows. Direct Inventory Updates are best used when you have a small volume of inventory updates (maximum of 1000 updates).As part of the Inventory Module, we have provided a reference implementation. This includes the workflow JSON, rules, & configurations required to implement direct inventory updates.Key points
- Direct updates are designed to be used when the number of Inventory updates is quite small, less than 1000 updates
- Capabilities of the platform this process uses
- Supplementary guides
When should you use direct updates?
Direct updates are designed for use when the number of Inventory updates is quite small, less than 1000. Using direct updates results in quicker processing of inventory vs. batch uploads when operating at these lower inventory volumes.Direct updates are best used in conjunction with batch inventory updates. When a specific job has 1000 or fewer updates, direct updates should be used; if the job has more than 1000 updates, the batch should be used.Capabilities of the platform this process uses
| Capability | Description |
| Event API | API to send the events against |
Supplementary guides
| Guide | Description |
| How to send Delta Inventory updates | Learn how to send delta inventory updates via events |
| How to use Inventory Batches | Learn how to submit Inventory Batches and follow the suggested best practices |
Send Direct updates
Author:
Fluent Commerce
Changed on:
30 Apr 2025
Key Points
- Perform smaller inventory updates by sending an event into your workflow via event API.
Steps
Send Enhanced Inventory Attributes in Your Payloads
Authors:
Girish Padmanabha, Kirill Gaiduk
Changed on:
23 Mar 2026
Overview
Inventory payloads can include additional Inventory Quantity attributes to capture richer stock context.This article explains how to use the`attributes` object to include additional data in inventory payloads. It supports both simple key-value pairs and custom JSON structures to meet diverse business requirements - whether you’re:- managing detailed product information
- optimizing warehouse processes
- or integrating with custom workflows
Key points
- Prerequisites: To fully leverage the extended attributes functionality within the inventory payload, ensure that you are using the Inventory Reference Module v2.3.0 or later
- Flexible attribute structure: The
`attributes`object supports any combination of key-value pairs, including complex JSON structures and arrays. This flexibility allows you to customize the data sent in your inventory payloads to meet specific business needs - Use reference attributes first: Certain key attributes (such as
`associationType`,`associationRef`,`parentRef`,`expectedOn`,`expiresOn`,`condition`,`storageAreaRef`,`supplier`,`manufacturer`,`manufacturerBatchNumber`,`countryOfOrigin`, and`channel`) will be directly updated in the Inventory Quantity associated with the incoming record, facilitating seamless integration with existing fields - Use segment fields for flexible key-value extensions:
`segment1`,`segment2`, and`segment3`provide flexibility for additional flat classification data without introducing new custom attributes - Custom attribute availability: Any custom attributes that you include in the
`attributes`object will be available in workflows via`inventoryPosition.inventoryQuantity.attributes.<fieldName>`. This enables you to incorporate custom data into rule-based processes or other logic tailored to your business requirements
Attribute Strategy
Inventory payloads can include multiple types of attributes depending on the business scenario.When extending inventory data, follow this general approach:This approach ensures compatibility with reference workflows and reduces the need for custom processing logic.Reference Attributes
These attributes represent common inventory concepts already supported by the reference inventory data model and workflows.Specific Segmentation Attributes
When designing inventory payloads, start with the dedicated Inventory Quantity attributes supported by the Inventory Reference Module.These attributes are automatically persisted by the reference`UpsertInventoryQuantity` rule, meaning they can be stored and used in workflows without additional mapping logic. Using these attributes ensures that payloads remain aligned with the reference inventory data model and supports common inventory scenarios such as:Flexible Segmentation Attributes
For additional flat classification data that does not correspond to the existing specific attributes, use the segment fields:`segment1``segment2``segment3`
Recommended Attributes Table
The following attributes are integrated into the platform’s inventory management workflows. This means that these fields will be directly updated in the Inventory Quantity associated with the incoming record, ensuring seamless operation and enhanced performance.| Attribute key | Description | Example | Use case(s) | Notes |
`associationType` | Defines the type of operational or business entity linked to the Inventory Quantity | `PURCHASE_ORDER` |
|
|
`associationRef` | Identifies the specific operational or business record linked to the Inventory Quantity | `POREF1` |
| Use with `associationType` to anchor the Inventory Quantity to an external business event or document |
`parentRef` | Links the Inventory Quantity to a parent Inventory Quantity to model a hierarchy | `PRDREF1:LOCREF1:DEFAULT:ON_ORDER` |
| Useful when modeling derived inventory states such as reservations under a specific parent quantity |
`expectedOn` | Indicates when the Inventory Quantity is expected to become available | `2026-05-01T00:00:00Z` |
|
|
`expiresOn` | Indicates when the Inventory Quantity expires or becomes ineligible for allocation | `2026-12-31T23:59:59Z` |
|
|
`condition` | Describes the physical or operational condition of the inventory | `NEW` |
| Common examples include new, refurbished, and damaged |
`storageAreaRef` | Identifies the storage area where the Inventory Quantity is held within a location | `LOCREF1:SAREF1` |
| Useful for representing storage-specific inventory context inside a single location |
`supplier` | Identifies the supplier associated with the Inventory Quantity | `SUPREF1` |
| Enables supplier-level inventory segmentation and sourcing decisions across inventory pools |
`manufacturer` | Identifies the manufacturer associated with the Inventory Quantity | `MANREF1` | Manufacturer traceability across segmented inventory pools | Often used together with `manufacturerBatchNumber` |
`manufacturerBatchNumber` | Captures the manufacturer batch identifier for the Inventory Quantity | `MBN1` |
| Supports batch-level traceability and quality isolation scenarios |
`countryOfOrigin` | Identifies the country where the inventory was produced or sourced | `AU` |
| Supports compliance, regulatory, and market-eligibility sourcing scenarios |
`channel` | Identifies the sales channel associated with the Inventory Quantity | `ONLINE` | Allocate and manage stock by sales channel | Channel differentiation is primarily expressed through reservations and customer-facing availability views |
`segment1-3` | Flexible segmentation fields for additional inventory classification | `PROMO` | Additional physical or commercial segmentations | Use for flat extensions when a dedicated supported attribute does not fit the business meaning |
Custom Attributes
In addition to the reference-supported attributes, inventory payloads can include custom attributes inside the`attributes` object.Custom attributes are useful when the payload needs to represent:- nested JSON structures
- arrays
- complex business-specific metadata
`inventoryPosition.inventoryQuantity.attributes.<fieldName>`. However, processing these attributes typically requires custom workflow logic or rules, as they are not automatically mapped by the reference `UpsertInventoryQuantity` rule.This allows you to incorporate your custom data into rule-based processes or other logic tailored to your specific business scenarios.Naming Guidance
When designing new inventory payloads, prefer the reference-supported attribute keys whenever they match your business meaning. For example:| Prefer | Instead of |
`expiresOn` | `expiryDate` |
`supplier` | `supplierId` |
`manufacturerBatchNumber` | custom batch identifiers |
`segment1-3` | new flat custom attributes |
Batch Pre-Processing and Attribute-Only Updates
Batch Pre-Processing (BPP) determines whether a record has changed by comparing the Inventory Quantity's identity, qty, optional status, and transient inventory conditions. See more details in the Inventory Batch Pre-Processing: Technical Guide with Examples. Changes to other Inventory Quantity attributes (e.g.,`associationRef`, `parentRef`, `expectedOn`, `expiresOn`, `condition,` `segment1-3`) are not evaluated as part of this comparison. If an update changes only these attributes and does not modify `qty` or `status`, the record may be treated as unchanged and filtered from processing.Related content
Integration guidelines for Direct Updates with Attributes
Author:
Fluent Commerce
Changed on:
30 Apr 2025
Overview
This document provides guidelines for handling message size limitations when sending inventory updates via the`INVENTORY_UPDATE` event. It highlights the importance of keeping message sizes around 200KB and offers strategies for estimating the number of inventory updates per message. Recommendations for optimizing message content and ensuring efficient integration are also included.Key points
- Message size limit: 200KB for inventory update messages.
- Payload structure: Inventory updates include multiple attributes, which affect message size.
- Size estimation: Approximately 160-170 updates per message, based on average update size of 1.2KB.
- Integration strategies: Manage attributes, batch updates effectively, and test thoroughly to ensure proper handling of message size.
Message Size Considerations
When sending inventory updates through the`INVENTORY_UPDATE` event, the message size should be kept around 200KB. This ensures efficient processing and prevents message delivery failures.Estimating the Number of Inventory Updates per Message
The number of inventory updates that can fit into a single message depends on the size of each update, which varies based on the number and size of the attributes. A typical inventory update, similar to the following sample payload, is approximately 1.2 KB.Sample Payload Structure:`
`Estimating Update Size
A typical inventory update like the example above is 1.2 KB. This estimate is based on average-sized strings for fields like`refs`, `dates`, and `IDs`.Calculating Updates per Message
Given the 200KB size limit, approximately 160-170 inventory updates can be included in a single message, depending on attribute sizes. This estimate includes a small buffer for variability in attribute size.Recommendations for Integration
- Dynamic Calculation: Implement a dynamic size calculation in your code to stay within the 200KB limit. The actual number of updates may vary based on the content of each update.
- Attribute Management:
- The number and size of attributes impact how many updates fit into a message.
- Omit null or empty attributes to save space.
- Use concise attribute names and values where possible.
- Batching Strategy:
- Start with batches of 150 updates per message as a safe margin.
- Monitor for failures and adjust batch sizes accordingly.
- Be ready to split large batches into multiple messages if necessary.
- Testing:
- Test thoroughly with various update sizes and attribute combinations to ensure your integration can handle different scenarios effectively.