Inventory Feeds User Guides
Author:
Fluent Commerce
Changed on:
11 Mar 2025
Overview
This document will guide you through how to use Feeds and some example cases where an Feed is a preferred data export option.
Pre-requisites
This document assumes you are knowledgeable and aware of the following subjects:
- GraphQL API
- Fluent Big Inventory
- Inventory Module
- Specifically Virtual Catalogues and Inventory Catalogues
- How do Inventory Feeds work
- AWS S3
Key points
- Use the guides here to create a new Inventory Feed via GraphQL
- Additional guide also provides insight into troubleshooting Inventory Feed issues
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
Feeds are currently created via API. The API mutation to do this is createInventoryFeed. See API schema for details of the required data for that mutation.
When successful, the creation will respond with a value to add as an S3 Bucket Policy. This value will allow the data to be replicated into your target bucket.
Required Data
Field | Description | Type |
ref | Unique reference for the Feed | String |
source | Target source and filters to apply when generating data for Feed | InventorySourceInput |
destination | Target AWS S3 bucket destination for 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 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 data type and apply the following filters:
- STATUS EQUAL_TO "ACTIVE"
- CATALOGUE_REF IN ["DEFAULT:1", "DEFAULT:67"]
This setup means:
- 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 data type and apply the following filters:
- STATUS EQUAL_TO "AT_RISK"
- CATALOGUE_REF IN ["BASE:1", "AGGREGATE:1"]
This setup means:
- 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
1mutation {
2 createInventoryFeed(
3 input: {
4 ref: "Example_Inventory_Feed"
5 dataFormat: PARQUET
6 destination: {
7 type: AWS_S3
8 destinationAttributes: [
9 { key: AWS_ACCOUNT_ID, value: "AWS account ID" }
10 { key: AWS_S3_BUCKET_NAME, value: "Target S3 bucket name" }
11 ]
12 }
13 source: {
14 type: INVENTORY_POSITION
15 filters: [
16 {name: STATUS, operator: EQUAL_TO, value: "ACTIVE"}
17 ]
18 }
19 }
20 ) {
21 ref
22 dataFormat
23 destination {
24 type
25 destinationAttributes {
26 key
27 value
28 }
29 }
30 source {
31 type
32 filters{
33 name
34 operator
35 value
36 }
37 }
38 attributes{
39 name
40 value
41 }
42 }
43}
Example Response
1{
2 "data": {
3 "createInventoryFeed": {
4 "ref": "Example_Inventory_Feed",
5 "dataFormat": "PARQUET",
6 "destination": {
7 "type": "AWS_S3",
8 "destinationAttributes": [
9 {
10 "key": "AWS_ACCOUNT_ID",
11 "value": "889803876844"
12 },
13 {
14 "key": "AWS account ID",
15 "value": "Target S3 bucket name"
16 }
17 ]
18 },
19 "source": {
20 "type": "INVENTORY_POSITION",
21 "filters": [
22 {
23 "name": "STATUS",
24 "operator": "EQUAL_TO",
25 "value": "ACTIVE"
26 }
27 ]
28 },
29 "attributes": [
30 {
31 "name": "roleArn",
32 "value": "arn:aws:iam::{source AWS account ID}:role/service-role/{IAM role name}"
33 }
34 ]
35 }
36 }
37}
Add security policy to target S3 bucket
You can add the new security policy to your target S3 bucket by following this guide from AWS: Adding a bucket policy by using the Amazon S3 console - Amazon Simple Storage Service.
Once this new policy has been applied, the data produced from the Feed will be replicated into the target S3 bucket as soon as there is a new piece of data produced by the feed.
Example Policy
1{
2 "Version": "2012-10-17",
3 "Id": "",
4 "Statement": [
5 {
6 "Sid": "Set permissions for objects",
7 "Effect": "Allow",
8 "Principal": {
9 "AWS": "arn:aws:iam::{SourceAccountId}:role/service-role/{RoleName}"
10 },
11 "Action": [
12 "s3:ReplicateObject",
13 "s3:ReplicateDelete"
14 ],
15 "Resource": "arn:aws:s3:::{DestinationBucketName}/*"
16 },
17 {
18 "Sid": "Set permissions on bucket",
19 "Effect": "Allow",
20 "Principal": {
21 "AWS": "arn:aws:iam::{SourceAccountId}:role/service-role/{RoleName}"
22 },
23 "Action": [
24 "s3:List*",
25 "s3:GetBucketVersioning",
26 "s3:PutBucketVersioning"
27 ],
28 "Resource": "arn:aws:s3:::{DestinationBucketName}"
29 }
30 ]
31}
Update inventory feed to Active
After correctly creating the Feed and configuring the bucket policy on the target S3 bucket, you can update the Feed to “ACTIVE”. From this point, the Feed will begin running on the schedule as defined against the .
Example mutation
1mutation{
2 updateInventoryFeed(input: {
3 ref: "Example_Inventory_Feed",
4 status: "ACTIVE"
5 }) {
6 ref
7 status
8 }
9}
Optional Data
Field | Description | Type |
name | Human readable name to describe the Feed | String |
dataFormat | Output format for Feed | InventoryDataFormat |
frequencyCronExpression | Frequency for how often a specific Feed should run (follows the UNIX Cron standard) | String |
Example Mutation
1mutation {
2 createInventoryFeed(
3 input: {
4 ref: "Example_Inventory_Feed"
5 name: "Example Inventory Feed"
6 destination: {
7 type: AWS_S3
8 destinationAttributes: [
9 { key: AWS_ACCOUNT_ID, value: "AWS account ID" }
10 { key: AWS_S3_BUCKET_NAME, value: "Target S3 bucket name" }
11 ]
12 }
13 source: {
14 type: VIRTUAL_POSITION
15 filters: [
16 {name: STATUS, operator: EQUAL_TO, value: "ACTIVE"}
17 ]
18 }
19 dataFormat: PARQUET
20 frequencyCronExpression: "0 13 * * */2"
21 }
22 ) {
23 ref
24 name
25 destination {
26 type
27 destinationAttributes {
28 key
29 value
30 }
31 }
32 source {
33 type
34 filters{
35 name
36 operator
37 value
38 }
39 }
40 attributes{
41 name
42 value
43 }
44 dataFormat
45 frequencyCronExpression
46 }
47}
48
Update an existing Inventory Feed via GraphQL API
Author:
Fluent Commerce
Changed on:
30 Jan 2024
Key Points
- After following this guide a user will be able to update an existing Inventory Feed
- Various updates are available once an Inventory Feed has been created and started running
Steps
Update data
Field | Description | Type |
name | Human readable name to describe the Feed | String |
frequencyCronExpression | Frequency for how often a specific Feed should run (follows the UNIX Cron Standard) | String |
status | Current status of the Feed | String |
Example mutation
1mutation {
2 updateInventoryFeed(
3 input: {
4 ref: "Example_Inventory_Feed"
5 name: "Test Inventory Feed"
6 frequencyCronExpression: "0 13 * * */2"
7 }
8 ) {
9 ref
10 name
11 frequencyCronExpression
12 }
13}
14
Manage and view Inventory Feed Runs
Author:
Fluent Commerce
Changed on:
4 June 2024
Key Points
- Inventory Feed runs can be individually tracked for their status and data about the run
- A user will know how to analyse Inventory Feed Runs from this guide
Prerequisites
Steps
InventoryFeedRun
This query lets you pull data related to an individual Feed Run. To do this, you must know the unique reference of the Run you want to pull data from.
InventoryFeedRuns
This query lets you pull data about multiple Feed Runs at once. For example, if you’re looking for historical data from a specific Feed, this query will allow you to query every Run related to that feed.
To explore these queries and the other Feed queries, see our GraphQL API.
Related content
Troubleshooting Inventory Feeds
Author:
Fluent Commerce
Changed on:
30 Jan 2024
Key Points
- This section will detail a few common issues and troubleshooting options for Inventory Feeds.
Steps
Inventory Feed unable to activate
When updating an Feed to Active status, our system will validate that the target S3 bucket has the correct configuration.
Option 1: Confirm the target bucket has the correct policy applied
If the policy is correctly applied, check Option 2.
Option 2: Review the failure response
As part of the update mutation, the failure response will provide the context of what is failing. This can help you to fix the incorrect configuration.
Inventory Feed Run in status “Failed”
An Feed Run may have failed for a range of reasons. Depending on these reasons, you may be unable to take proactive .
Option 1: Check the Inventory Feed Run error message
The error message saved against an Feed Run will be able to provide context on what has caused the failure. If it is a configuration issue, you can update the Feed to fix this issue. Other times, it may be a random failure. At that point, the next Feed Run will catch the Feed back up to the latest view of Availability.
Option 2: Target S3 bucket configuration
If anything changes with the configuration of the target S3 bucket, this may cause Feed Runs to fail consistently. If this has happened, the first piece to try would be to reset the configuration. If that isn’t possible, you may need to create a new Feed to replace the broken one.