Authors:
Esma Tuzovic, Cille Schliebitz, Anita Gu
Changed on:
20 Dec 2024
In this lesson, you will learn how delta inventory updates can be sent to Fluent OMS.
In the sample Fluent Inventory Module workflows, it's possible to send 'full loads' of inventory, as well as 'inventory position changes' using the Inventory Batch API. The Inventory Quantity type being created/updated is LAST_ON_HAND.
For example, in a typical retailer it may be decided that the source system will send inventory position changes via the Batch API into the Fluent Inventory Catalogue workflow every 5 minutes.
When using the Batch API the quantity that is sent in must always be an absolute whole number representing the latest stock on hand value.
1{
2 "action": "UPSERT",
3 "entityType": "INVENTORY",
4 "entities": [
5 {
6 "locationRef": "LOC_1",
7 "skuRef": "SKU_1",
8 "qty": 500,
9 "correctedQty": 0,
10 "retailerId": {{retailer_id}}
11 }
12 ]
13}
Language: json
Name: Batch API Payload Example
Description:
Batch API sample
"As a Retailer with fast-moving products, I want to be able to send real-time sale updates into the order management system so that the Inventory Catalogue reflects the latest sales I've made in all my stores. Fluent must be aligned with my source systems to keep high stock accuracy."
This can be achieved by using the Inventory Deltas feature of the Fluent Inventory Module. Inventory delta updates are sent using the Fluent Event API, and instead of creating or updating a LAST_ON_HAND Inventory Quantity record, a delta update will create or update an Inventory Quantity record of type DELTA.
When sending real-time Deltas via the Event API, the quantity is always a relative incremental or decremental value, for example, '-20'.
1{
2 "name": "INVENTORY_DELTA",
3 "accountId": "FCTRAIN1001",
4 "retailerId": "1",
5 "entityRef": "DEFAULT:1",
6 "entityType": "INVENTORY_CATALOGUE",
7 "entitySubtype": "DEFAULT",
8 "rootEntityType": "INVENTORY_CATALOGUE",
9 "rootEntityRef": "DEFAULT:1",
10 "attributes": {
11 "deltas": [
12 {
13 "productRef": "D45",
14 "locationRef": "LOC_MEL",
15 "qty": -10,
16 "type":"DELTA",
17 "deltaId":"123AT"
18 },
19 {
20 "productRef": "D45",
21 "locationRef": "LOC_MEL",
22 "qty": 20,
23 "type":"DELTA",
24 "deltaId":"123AY"
25 },
26 {
27 "productRef": "D45",
28 "locationRef": "LOC_SYD",
29 "qty": -30,
30 "type":"DELTA",
31 "deltaId":"123AX"
32 }
33 ]
34 }
35}
Language: json
Name: Inventory Delta Example Payload
Description:
Event API Delta sample
Copyright © 2024 Fluent Retail Pty Ltd (trading as Fluent Commerce). All rights reserved. No materials on this docs.fluentcommerce.com site may be used in any way and/or for any purpose without prior written authorisation from Fluent Commerce. Current customers and partners shall use these materials strictly in accordance with the terms and conditions of their written agreements with Fluent Commerce or its affiliates.