Create a new Inventory Feed via GraphQL API
Author:
Fluent Commerce
Changed on:
1 July 2025
Key Points
- After following this guide a user will be able to create a new Inventory Feed
- The output from this feed can be used to supply inventory availability data to any system
- Additional steps will outline optional configuration that can be applied to Inventory Feeds
Steps
Create and configure Inventory Feed
Required Data
| Field | Description | Type |
| ref | Unique reference for the Inventory Feed | String |
| source | Target source and filters to apply when generating data for Inventory Feed | InventorySourceInput |
| destination | Target AWS S3 bucket destination for Inventory Feed | InventoryDestinationInput |
InventorySourceInput
The `source` field consists of:- type (InventoryDataType!): The type of inventory data. You can choose from:
`INVENTORY_CATALOGUE``INVENTORY_POSITION``VIRTUAL_CATALOGUE``VIRTUAL_POSITION`
- filters ([InventoryDataFilterInput]): Optional filters to apply to the inventory data. Each filter consists of:
- name (InventoryFilterName!): The name of the filter. You can choose from:
`REF``TYPE``STATUS``CATALOGUE_REF`
- operator (InventoryOperator!): The operator for the filter. You can choose from:
`IN``NOT_IN``EQUAL_TO``NOT_EQUAL_TO`
- value (Json!): The value to filter by. This can be a single value or an array of values.
- name (InventoryFilterName!): The name of the filter. You can choose from:
How Filters Work
When setting up filters, you first select an inventory data type and then optionally set filters based on that data type. Filters are combined using "AND" conditions, meaning all conditions must be met. Within each filter, "IN" and "NOT IN" operators can handle multiple values with an "OR" condition.Examples
INVENTORY_POSITION Example
If you select`INVENTORY_POSITION` as the inventory data type and apply the following filters:- STATUS EQUAL_TO "ACTIVE"
- CATALOGUE_REF IN ["DEFAULT:1", "DEFAULT:67"]
- Fetch all inventory positions where the status is equal to "ACTIVE"
- AND the catalogue reference is either "DEFAULT:1" or "DEFAULT:67"
VIRTUAL_POSITION Example
If you select`VIRTUAL_POSITION` as the inventory data type and apply the following filters:- STATUS EQUAL_TO "AT_RISK"
- CATALOGUE_REF IN ["BASE:1", "AGGREGATE:1"]
- Fetch all virtual positions where the status is equal to "AT_RISK"
- AND the catalogue reference is either "BASE:1" or "AGGREGATE:1"
Example Mutation
Example Response
Add security policy to target S3 bucket
Example Policy
Update inventory feed to Active
Example mutation
Optional Data
| Field | Description | Type |
| name | Human readable name to describe the Inventory Feed | String |
| dataFormat | Output format for Inventory Feed | InventoryDataFormat |
| frequencyCronExpression | Frequency for how often a specific Inventory Feed should run (follows the UNIX Cron standard) | String |