Availability by date

The availability by date feature provides the inventory availability quantity that is segregated by a time period. Each period is a byproduct of a different consideration that includes reservation, demand, and supply windows.

Node availability by date

Inventory Visibility always publishes the availability picture when the inventory is updated at a node. The availability by date uses inventory timestamps to calculate the date range. Inventory timestamps include when new supply becomes available (supplies.eta) or when supply expires (supplies.shipByDate). For more information, see the Node Availability REST API documentation.

For example, if the current date is 1 October 2022, and you have 10 ONHAND and 20 PO arriving on 10 October 2022 with no reservations. Then, node availability returns the following information. The output is separated with currentAvailability and futureAvailability with the associated timestamps, fromTs (inclusive start timestamp) and toTs (exclusive end timestamp). If you pass requestedEndTs in the request, the node availability by date with fromTs before or inclusive of this date are returned, and toTs of such last node availability by date in the response is either less than or equal to requestedEndTs. If you do not pass requestedEndTs in the request, then by default requestedEndTs is considered as the value that is set for the dateBreakups.defaultLimitInDays tenant rule. The initial value of requestedEndTs is set to15 days. That is, the default value of requestedEndTs is current date + 15 days as shown in the response, toTs: 2022-10-15T16:42:06.942Z. You can temporarily override the default value by explicitly passing the requestedEndTs value in the request input.
Note: If possible, ensure that you keep the requestedEndTs value less than 30 days. If your business requirement justifies, take into account that the inventory calculated by the Availability API is proportional to the request end time. The response time might be impacted when you set a large horizon for requestedEndTs.
Similarly, you can pass requestedQuantity in the request to restrict the response based on the quantity.
{
    "availabilityType": "SELL",
    "considerSafetyStock": true,
    "lines": [
        {
            "itemId": "PLATE",
            "unitOfMeasure": "EACH",
            "productClass": "NEW",
            "deliveryMethod": "SHP",
            "segment": "ONLINE",
            "segmentType": "Channel",
            "shipNodes": [
                "Matrix-Store-001"
            ],
            "lineId": "1",
            "shipNodeAvailabilities": [
                {
                    "shipNode": "Matrix-Store-001",
                    "currentAvailability": {
                        "toTs": "2022-10-10T00:00:00.000Z",
                        "availableQuantity": 10.0,
                        "shortageQuantity": 0.0,
                        "thresholdLevel": 0,
                        "thresholdType": "ONHAND"
                    },
                    "futureAvailability": [
                        {
                            "toTs": "2022-10-15T16:42:06.942Z",
                            "availableQuantity": 30.0,
                            "shortageQuantity": 0.0,
                            "fromTs": "2022-10-10T00:00:00.000Z"
                        }
                    ]
                }
            ]
        }
    ]
}

Now, assume that the following reservations are successful.
Table 1. Reservation name, quantity, time, and expiry when all reservations are successful
Reservation Reservation quantity Reservation time (rsrv_ts) Expiry (exp_ts)
A 1 2022-10-01T13:10:00Z 2020-10-01T13:26:00Z
B 2 2022-10-01T13:10:00Z 2020-10-01T13:26:00Z
C 3 2022-10-01T13:10:00Z 2020-10-01T13:26:00Z
D 4 2022-10-12T13:10:00Z 2020-10-12T13:26:00Z

When the reservation name, quantity, time, and expiry are successful, node availability returns the following information:

{
    "availabilityType": "SELL",
    "considerSafetyStock": true,
    "lines": [
        {
            "itemId": "PLATE",
            "unitOfMeasure": "EACH",
            "productClass": "NEW",
            "deliveryMethod": "SHP",
            "segment": "ONLINE",
            "segmentType": "Channel",
            "shipNodes": [
                "Matrix-Store-001"
            ],
            "lineId": "1",
            "shipNodeAvailabilities": [
                {
                    "shipNode": "Matrix-Store-001",
                    "currentAvailability": {
                        "toTs": "2022-10-10T00:00:00.000Z",
                        "availableQuantity": 4.0,
                        "shortageQuantity": 0.0,
                        "thresholdLevel": 0,
                        "thresholdType": "ONHAND"
                    },
                    "futureAvailability": [
                        {
                            "toTs": "2022-10-15T17:48:39.490Z",
                            "availableQuantity": 20.0,
                            "shortageQuantity": 0.0,
                            "fromTs": "2022-10-10T00:00:00.000Z"
                        }
                    ]
                }
            ]
        }
    ]
}
Reservations A, B, and C for 1 October 2022 affect both current availability and future availability. Reservation D for 12 October 2022 effects future availability only.
  • currentAvailability = 4 (10 on hand minus 1 from reservation A minus 2 from reservation B minus 3 from reservation C)
  • futureAvailability = 20 (4 currently available plus 20 from purchase order minus 4 from reservation D)
Now, take the same example with 10 ONHAND, and 20 PO arriving on 10 October with no reservations, but fulfillment is OFF at the node until 8 October. Node fulfillment overrides that come with an expiration date also affect the node availability by date. In this example, node availability returns only the future availability when the fulfillment override expires on 8 October. The Availability API does not return the future node availability by date that does not have availability.
"shipNodeAvailabilities": [
                {
                    "shipNode": "Matrix-Store-001",
                    "currentAvailability": {
                        "toTs": "2022-10-08T00:00:00.000Z",
                        "availableQuantity": 0.0,
                        "shortageQuantity": 0.0,
                        "thresholdLevel": 0,
                        "thresholdType": "FUTURE"
                    },
                    "futureAvailability": [
                        {
                            "toTs": "2022-10-10T00:00:00.000Z",
                            "availableQuantity": 10.0,
                            "shortageQuantity": 0.0,
                            "fromTs": "2022-10-08T00:00:01.000Z"
                        },
                        {
                            "toTs": "2022-10-15T20:07:45.812Z",
                            "availableQuantity": 30.0,
                            "shortageQuantity": 0.0,
                            "fromTs": "2022-10-10T00:00:00.000Z"
                        }
                    ]
                }
            ]
Note: If you specify considerSafetyStock in the API call, then the configured safety stock is subtracted from the availableQuantity. For example, if safety stock is 1, the output would change to availableQuantity=29.

The V2 node and network availability APIs have a request header-level attribute known as isAggregationNeeded with a default value of false. If set to true, this API returns onhandAvailableQuantity, futureAvailableQuantity, futureLatestShipTs, and futureEarliestShipTs fields in response to the line level (this is similar to the V1 availability APIs). However, the isAggregationNeeded API response does not have the futureAvailability array information.

An example of isAggregationNeeded API output is as follows.
"shipNodeAvailabilities" : [ {
"currentAvailability" : {
"availableQuantity" : 20.0,
"shortageQuantity" : 0.0,
"thresholdLevel" : 0,
"thresholdType" : "ONHAND",
"toTs" : "2021-06-10T00:00:00.182Z"
},
"futureAvailableQuantity" : 0.0,
"futureEarliestShipTs" : "2500-01-01T00:00:00.000Z",
"futureLatestShipTs" : "2500-01-01T00:00:00.000Z",
"onhandAvailableQuantity" : 20.0,
"shipNode" : "store-BostonMA"
} ],
To maximize the inventory request throughput, ensure that the availability request for item-node lines is limited to a maximum of 100 lines for each API invocation.
Important: The line limit will be enforced at the end of June 2024.

Node available supplies

The availableSupplies API provides the available supply picture, which also includes nonexpired reservations. The only difference between availability API and availableSupplies API is that the availableSupplies does not aggregate the availability by date with overlapping dates. For example, if the current date is 1 December 2022 and if there is 1 PO of 10, the ETA is 1 January 2023, and the shipByDate is 1 April 2023. For another PO of 10, the ETA is 1 February 2023, and the shipByDate is 1 April 2023.

The availableSupplies API entries are as follows (without aggregation of quantities).
"availableSupplies": [
                        {
                            "toTs": "2023-04-01T00:00:01.000Z",
                            "availableQuantity": 10.0,
                            "shortageQuantity": 0.0,
                            "fromTs": "2023-01-01T00:00:00.000Z"
                        },
                        {
                            "toTs": "2023-04-01T00:00:01.000Z",
                            "availableQuantity": 10.0,
                            "shortageQuantity": 0.0,
                            "fromTs": "2023-02-01T00:00:00.000Z"
                        }
                    ]
The availability API output is as follows (with overlapping availabilities added).
"futureAvailability": [
                        {
                            "toTs": "2023-02-01T00:00:00.000Z",
                            "availableQuantity": 10.0,
                            "shortageQuantity": 0.0,
                            "fromTs": "2023-01-01T00:00:00.000Z"
                        },
                        {
                            "toTs": "2023-04-01T00:00:00.000Z",
                            "availableQuantity": 20.0,
                            "shortageQuantity": 0.0,
                            "fromTs": "2023-02-01T00:00:00.000Z"
                        }
                    ]

Distribution group availability by date

Similar to node availability, distribution group availability also provides a distribution group availability by the date range. The distribution group availability picture is an aggregate view of all the associated node availability by date for inventory that is available to sell.

The distribution group availability by date provides the current and future network level availability picture, including active reservations. Availability is returned for the input product or item. If the request is a parent product, the availability of its children is also returned by the network availability product by date API.

When a change in an inventory timestamp occurs through a new supply or demand with dates other than the existing availability by dates, the availability by date is calculated and published. A change to the timestamp range can occur when a new supply date or ship date is determined. Distribution group inventory availability is calculated only for open order reservations.

For example, assume you have distribution group US_Group with two ship nodes Matrix-Store-001 and Matrix-Store-002, and item ID PROD1. In this example, one item is available as ONHAND. Also, two items are arriving 7 February 2020 and three items are arriving 14 February 2020 (with no reservations) for each individual ship node. Therefore, the distribution group has twice the availability of each ship node for the time range. Distribution group availability returns the following information. Notice that the output is separated with currentAvailability and futureAvailability with the associated timestamps, fromTs (inclusive start timestamp), and toTs (exclusive end timestamp).

{
considerSafetyStock: true,
  lines: [
    {
      itemId: "PROD1",
      lineId: "0",
      productClass: "NEW",
      unitOfMeasure: "EACH",
      deliveryMethod: "SHP",
      networkAvailabilities: [
        {
            distributionGroupId: "US_Group",
            currentAvailability: {
            availableQuantity: 2.0,
            shortageQuantity: 0.0,
            toTs:"2020-02-07T05:00:00Z”,
            thresholdLevel: 3,

      thresholdType: "ONHAND",
      thresholdQuantity: 5.5,
          },
            futureAvailability: [
            {
                fromTs: "2020-02-07T05:00:00Z",
                toTs:"2020-02-14T05:00:00Z",
                availableQuantity: 6.0,
                shortageQuantity: 0.0
            },
            {
                fromTs: "2020-02-14T05:00:00Z",
                toTs:"2500-01-01T00:00:00Z",
                availableQuantity: 12.0,
                shortageQuantity: 0.0
            }
          ]
        }
      ]
    }
  ]
}

For more information, see the Network Availability Product by Date REST API documentation.