How to Use Enhanced Inventory Attributes in Your Payloads
Author:
Fluent Commerce
Changed on:
9 Feb 2025
Overview
This guide explains how to leverage the `attributes`
object to include custom data in your payloads. By supporting both simple key-value pairs and complex JSON structures, the `attributes`
object offers the flexibility to meet diverse business requirements—whether you’re managing detailed product information, optimizing processes, or integrating with custom workflows. You’ll also learn about recommended fields like `expectedOn`
, `storageAreaRef`
, and `condition`
, which are automatically integrated into workflows for streamlined updates and better data consistency.
Key points
- 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. - Recommended Attributes: Certain key attributes, such as
`expectedOn`
,`storageAreaRef`
, and`condition`
, are automatically integrated into our platform’s workflows. These fields will be directly updated in the inventory quantity associated with the incoming record, facilitating seamless integration with existing fields. - 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. - ISO 8601 Date Format: For any date-related attributes, it is recommended to use the ISO 8601 format (e.g.,
`YYYY-MM-DDTHH:MM:SSZ`
) to ensure consistency and proper handling within the system. - Integration with Workflows: The system is designed to handle both recommended and custom attributes, making them accessible within the workflow context. This ensures that you can leverage these attributes in custom rules and other logic, depending on the specific needs of your implementation.
- Extensibility: While the table of recommended attributes provides a useful starting point, you are encouraged to extend the
`attributes`
object with any additional fields relevant to your business processes. The flexibility of this structure allows for robust customization.
Prerequisite: Workflow and Plugin Requirements
Leveraging Recommended Attributes
While the `attributes`
object gives you the freedom to define and send any custom fields, we recommend using certain key attributes that are optimized for our platform. These recommended fields, such as `expectedOn`
, `storageAreaRef`
, and `condition`
, are automatically integrated into our platform’s management workflows. This means that these fields will be directly updated in the quantity associated with the incoming record, ensuring seamless operation and enhanced performance.
Flexibility for Custom Attributes
Beyond the recommended attributes, you have the flexibility to include additional fields that are specific to your business requirements. Whether you need to send simple key-value pairs, nested JSON structures, or arrays, our system will these and make them available within the via `inventoryPosition.inventoryQuantity.attributes.<fieldname>`
. This allows you to incorporate your custom data into rule-based processes or other logic tailored to your specific business scenarios.
The table below provides examples of the recommended attributes along with their descriptions, usage, and examples. However, you are not limited to these fields—you can extend the `attributes`
object with any custom fields that meet your needs. These will be accessible within the for your custom implementations.
Recommended Attributes Table
Attribute Description | Recommended Attribute Key Name | Example | Notes |
Specific storage locations in a . |
| "LOC1-SR-1" | Available in the via |
Date when new stock is expected. |
| "2024-10-31T00:00:00.00Z" | Available in the via |
Information on the manufacturing country. |
| "France" | Available in the via |
Details like production date and . |
|
| Available in the via |
Indicates the last date a product is safe to use. |
| "2025-12-31T23:59:59.00Z" | Available in the via |
Unique identifier for each supplier. |
| "SUP12345" | Available in the via |
Details on how is quantified. Use Case: Ensure consistency in counting, aid in , and simplify stocktaking processes. |
| "PCS" | Available in the via |
Unique identifier for high-value items. |
| "SN123456789" | Available in the via |
Links to specific purchase orders. |
| "PO987654321" | Available in the via |
Source of transfer. |
| "STORE01" | Available in the via |
Purpose of the . |
| "For Sale" | Available in the via |
Indicates the condition of the item. |
| "NEW" | Available in the via |