Out of stock behaviour & configuration
The out of stock behaviour and configuration are properties of the listing that define the behavior of orders containing a product that is currently out of stock or unavailable for immediate shipment. A listing can be either backorderable, preorderable, restockable, or preorderable & restockable.
If there are different out of stock behaviours for different facility groups or orders, a context
can be added to the out of stock configuration. More information can be found below.
Make a listing backorderable
To make a listing backorderable, update the respective listing via PATCH or PUT with the below JSON body:
PATCH https://{YOUR-TENANT-NAME}.fulfillmenttools.com/api/facilities/{facilityId}/listings/{tenantArticleId}
{
"version": 2,
"actions": [
{
"action": "ModifyListing",
"outOfStockBehaviour": "BACKORDER"
}
]
}
Make a listing preorderable
To make a listing preorderable, update the respective listing via PATCH or PUT with the below JSON body:
PATCH https://{YOUR-TENANT-NAME}.fulfillmenttools.com/api/facilities/{facilityId}/listings/{tenantArticleId}
{
"version": 2,
"actions": [
{
"action": "ModifyListing",
"outOfStockBehaviour": "PREORDER",
"outOfStockConfig": {
"preorder": {
"availabilityTimeframe": {
"start": "2025-12-01T08:45:50.525Z" // picking can be started when start is reached
}
}
}
}
]
}
Make a listing restockable
To make a listing restockable, update the respective listing via PATCH or PUT with the below JSON body:
PATCH https://{YOUR-TENANT-NAME}.fulfillmenttools.com/api/facilities/{facilityId}/listings/{tenantArticleId}
{
"version": 2,
"actions": [
{
"action": "ModifyListing",
"outOfStockBehaviour": "RESTOCK",
"outOfStockConfig": {
"restock": {
"restockableInDays": 5 // Days until listing can be replenished in facility. 0 is interpreted as "infinite stock".
}
}
}
]
}
Make a listing preorderable & restockable with context
To make a listing restockable and preorderable only in certain contexts, update the respective listing via PATCH or PUT with the below JSON body. In this example, the listing is only preorderable & restockable if its facility belongs to the facility group with ID "12345" AND the order does not have the tag "click-and-collect". The priority is needed to ensure a clear sequence when considering the configuration in routing.
PATCH https://{YOUR-TENANT-NAME}.fulfillmenttools.com/api/facilities/{facilityId}/listings/{tenantArticleId}
{
"version": 2,
"actions": [
{
"action": "ModifyListing",
"outOfStockBehaviourByContexts": [
{
"priority": 1,
"context": [
{
"type": "FACILITY_GROUP", // allowed values are FACILITY_GROUP and TAG_REFERENCE
"values": [
"12345" // ID of facility group
]
},
{
"type": "TAG_REFERENCE", // allowed values are FACILITY_GROUP and TAG_REFERENCE
"operator": "NOT",
"values": [
"click-and-collect"
]
}
],
"outOfStockBehaviour": "PREORDER_AND_RESTOCK",
"outOfStockConfig": {
"preorder": {
"availabilityTimeframe": {
"start": "2025-12-01T08:45:50.525Z"
}
},
"restock": {
"restockableInDays": 5
}
}
}
]
}
]
}
Last updated