Demand-based replenishment
Some businesses replenish stock at fixed intervals or produce goods on demand. In both cases, it's often necessary to accept consumer orders before the purchase order is placed or the production schedule is defined. This page describes how to configure fulfillmenttools to accept orders without being limited by current stock levels in these scenarios.
The described use case is mapped by creating purchase orders with a very high amount of products and allowing shop systems to access the thereby created expected stock.
Create listings for products that should be available in large quantities
In most set-ups, listings should already be created for all products that are managed via fulfillmenttools' systems. Still, make sure that a listing exists for each relevant product. If goods are perishable and/or should only be available for a certain time frame, stock properties and/or stockAvailableUntil must be configured.
PUT https://{YOUR_TENANT_NAME}.api.fulfillmenttools.com/api/facilities/{YOUR_FACILITY_ID}/listings{
"listings": [
{
"tenantArticleId": "4711",
"title": "Chocolate Santa",
"titleLocalized": {
"de_DE": "Schoko Weihnachtsmann",
"en_US": "Chocolate Santa"
},
"stockProperties": {
"expiry": {
"inputType": "DATE",
"required": true
}
},
"stockAvailableUntil": {
"calculationBase": "EXPIRY",
"modifier": "-P30D"
},
"version": 1
}
]
}Create a purchase order
A purchase order needs to be created and include all items that have not been ordered yet but should be already available for sale and not be limited by current stock levels.
Choose a high number for the
quantity.valueofrequestedItemsDefine the date when the delivery is expected to arrive in
requestedDate.valueand setrequestedDate.typetoTIMEPOINTInclude as many items as possible in one purchase order rather than creating one purchase order for each item for that a very high stock should be assumed
PUT https://{YOUR_TENANT_NAME}.api.fulfillmenttools.com/api/inboundprocesses/{YOUR_INBOUND_PROCESS_ID}/purchaseorder{
"orderDate": "2024-08-12T12:59:37.192Z",
"requestedDate": {
"type": "TIME_POINT",
"value": "2024-08-19T12:59:37.192Z"
},
"requestedItems": [
{
"tenantArticleId": "4711",
"quantity": {
"value": 10000
},
"stockProperties": {
"expiry": "2025-02-19T12:59:37.192Z"
}
}
],
"facilityRef": "warehouse-cgn"
}
Enable shop systems to communicate expected stock in sales availability
Use one of the below endpoints to query stock availability in your shop's detail pages and in the checkout journey. By that, it's ensured that expected stock is considered in the shop availability.
See the Availability and Promising section for more information on the checkout options endpoints.
Create a new purchase order
Create another new purchase order with large quantities, like you did in step 2. This ensures that the systems can continue to accept customer orders that should be fulfilled within next production or replenishment cycle.
Patch purchase order with actual quantity
Once the purchase order was placed or the production schedule was defined, patch requested items in the purchase order with quantities that were actually ordered or planned to be produced. Adjust stock properties such as expiry date if necessary.
PATCH https://{YOUR_TENANT_NAME}.api.fulfillmenttools.com/api/purchaseorders/{YOUR_PURCHASE_ORDER_ID}{
"version": 2,
"requestedItems": [
{
"tenantArticleId": "4711",
"quantity": {
"value": 150
},
"stockProperties": {
"expiry": "2025-02-19T12:59:37.192Z"
}
}
],
"facilityRef": "warehouse-cgn"
}
Create stock after delivery has arrived or products are produced
If the ordered products have arrived or production has been completed, a receipt needs to be added to the purchase order's inbound process to create stock.
If you're not sure about which inbound process the purchase order belongs to, use the purchase order REST API endpoint to query the inboundProcessRef.
POST https://{YOUR_TENANT_NAME}.api.fulfillmenttools.com/api/inboundprocesses/{YOUR_INBOUND_PROCESS_ID}/receipts{
"receivedDate": "2024-08-18T13:40:05.864Z",
"receivedItems": [
{
"tenantArticleId": "4711",
"acceptedQuantity": {
"value": 149
},
"rejectedQuantity": {
"value": 1
},
"stockProperties": {
"expiry": "2025-02-19T12:59:37.192Z"
},
"comments": [
{
"content": "One item was broken."
}
]
}
],
"status": "FINISHED"
}
Last updated
Was this helpful?

