Demand-Driven Replenishment

This page is outdated. Please go to our new documentation under https://docs.fulfillmenttools.com/documentation.

Summary

This page describes use cases where replenishments for items are made in specific time intervals based on demand or where products can be produced on demand. In that case, systems should often allow customer orders to be accepted without being limited by current stock levels until the point in time when the purchase order is placed or production schedules are defined.

Use Case Examples

Short replenishment cycles

A company offers lots of seasonal products which, naturally, are subject to high fluctuations in demand. In addition, these products can be replenished in a short time and the user knows already when orders will arrive. Thus, purchasing agents monitor already accepted customer orders and place purchase orders based on demand to avoid over-stock. As a result, there is no stock limit on the number of customer orders that can be accepted until the purchase order is placed.

Internal production facility

A company produces some goods internally. To prevent overproduction, the production schedule is made based on current demand levels. As a result, there is no stock limit on the number of customer orders that can be accepted until the production schedule is defined.

Implementation in fulfillmenttools

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.

1. 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, stockProperties and/or stockAvailableUntil must be configured. See here for more details.

Create or Update listings of a facility with the given ID

put
Authorizations
Path parameters
facilityIdstringRequired

ID of facility you want to get its listing

Body
Responses
200
Facility listing was found & you were allowed to access it.
put
PUT / HTTP/1.1
Host: %%HOST%%
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 529

{
  "listings": [
    {
      "attributes": [
        {
          "category": "descriptive",
          "key": "%%subtitle%%",
          "priority": 100,
          "value": "585er Gold"
        }
      ],
      "imageUrl": "text",
      "price": 1200,
      "tenantArticleId": "4711",
      "title": "Adidas Superstar",
      "weight": 1,
      "scanningRule": {
        "values": []
      },
      "scannableCodes": [
        "text"
      ],
      "outOfStockBehaviour": "BACKORDER",
      "availabilityTimeframe": {
        "start": "2020-02-03T08:45:50.525Z"
      },
      "tags": [],
      "measurementUnitKey": "liter",
      "stockProperties": {
        "ANY_ADDITIONAL_PROPERTY": {
          "inputType": "DATE",
          "required": true,
          "defaultValue": "text"
        }
      },
      "legal": {
        "hsCode": "text"
      }
    }
  ]
}

No content

Example call for creating listing
{
  "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
    }
  ]
}

2. Create a purchaseOrder

Create a purchaseOrder including 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.value of requestedItems

  • Define the date when the delivery is expected to arrive in requestedDate.value and set requestedDate.type to "TIMEPOINT"

  • Include as many items as possible in one purchaseOrder rather than creating one purchaseOrder for each item for that a very high stock should be assumed. However, please consider the limit of 200 tenantArticleIds per purchaseOrder.

Create a new Purchase Order

post
Body
cancelledbooleanOptionalDeprecated

This field is deprecated. Set the status to 'CANCELED' Set the purchaseOrder to 'cancelled'. No further deliveries will be expected. Already received goods are unaffected.

customAttributesobject | nullableOptional

Attributes that can be added to this entity. These attributes cannot be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.

facilityRefstring · min: 1Required
orderDatestring · date-timeRequired

Time and date at which the order was placed. Note: This does not refer to the creation date of this entity in the system.

requestedDateall ofRequired

Time and date at which the order is expected to arrive. Use 'ASAP' for deliveries with unknown date, but be aware that some features will not include these orders.

statusstring · enumOptionalPossible values:
Responses
201
Created Purchase Order entity
application/json
post
POST /api/purchaseorders HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 334

{
  "customAttributes": {},
  "facilityRef": "text",
  "orderDate": "2025-07-08T22:46:24.316Z",
  "requestedDate": {
    "type": "ASAP",
    "value": "2025-07-08T22:46:24.316Z"
  },
  "requestedItems": [
    {
      "customAttributes": {},
      "quantity": {
        "unit": "text",
        "value": 1
      },
      "stockProperties": {
        "expiry": "text"
      },
      "tenantArticleId": "text"
    }
  ],
  "status": "OPEN",
  "supplier": {
    "name": "text"
  }
}
{
  "created": "2025-07-08T22:46:24.316Z",
  "customAttributes": {},
  "facilityRef": "text",
  "id": "text",
  "inboundProcessRef": "text",
  "lastModified": "2025-07-08T22:46:24.316Z",
  "orderDate": "2025-07-08T22:46:24.316Z",
  "requestedDate": {
    "type": "ASAP",
    "value": "2025-07-08T22:46:24.316Z"
  },
  "requestedItems": [
    {
      "customAttributes": {},
      "quantity": {
        "unit": "text",
        "value": 1
      },
      "stockProperties": {
        "expiry": "text"
      },
      "tenantArticleId": "text"
    }
  ],
  "status": "OPEN",
  "supplier": {
    "name": "text"
  },
  "transfer": {
    "id": "text"
  },
  "version": 1
}
Example query for creating 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"
}

3. 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 is ensured that expected stock is considered in the shop availability. Go here to get more information on the checkout options endpoints.

delivery/earliest

post

The list of items depicts the items you would like to get information about their earliest possbile delivery. The provided list of tenant article ids are considered individual (as if not in a basket together, but seperately ordered). Additionally you can add information about the address these items should be delivered to to further refine the response.

Body
earliestDeliveryDatestring · date-timeOptional

The date from which to search for the earliest potential delivery date. Defaults to "now" (timestamp of the request)

Example: 2024-06-01T00:00:00.000Z
tenantArticleIdsstring[]Required

The tenant articleIds for which the check is performed. The provided items are considered individually.

Example: DE-ZGT-4711
includeCalculationHintsbooleanOptional

Set this flag to true to get additional information about the availability of the requested articles

Responses
200
The request could be evaluated.
application/json
post
POST /api/promises/checkoutoptions/delivery/earliest HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 315

{
  "earliestDeliveryDate": "2024-06-01T00:00:00.000Z",
  "tenantArticleIds": [
    "DE-ZGT-4711"
  ],
  "consumerAddress": {
    "city": "Langenfeld",
    "country": "DE",
    "province": "NRW",
    "houseNumber": "42a",
    "postalCode": "40764",
    "street": "Hauptstr.",
    "addressType": "POSTAL_ADDRESS"
  },
  "includeCalculationHints": true,
  "filter": {
    "customAttributes": {}
  }
}
{
  "checkoutOptions": [],
  "calculationHints": [
    "text"
  ]
}

delivery/timeperiod

post

The basket attribute depicts the items you would like to get details about their possbile delivery. All the provided tenantArticleIds within the basket are considered together (as if they are in the same basket/order). Additionally you can add information about the address these items should be delivered to to further refine the quality of the response.

Body
startDatestring · date-timeOptional

The start of the evaluated time period. Defaults to "now" (timestamp of the request)

Default: nowExample: 2024-06-03T00:00:00.000Z
endDatestring · date-timeOptional

The end of the evaluated time period. Default is the start date + 30 days. Please note that the maximum time period can not exceed 45 days.

Example: 2024-07-13T00:00:00.000Z
includeCalculationHintsbooleanOptional

Set this flag to true to get additional information about the availability of the requested articles

Responses
200
The request could be evaluated.
application/json
post
POST /api/promises/checkoutoptions/delivery/timeperiod HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 514

{
  "startDate": "2024-06-03T00:00:00.000Z",
  "endDate": "2024-07-13T00:00:00.000Z",
  "basket": [],
  "consumerAddress": {
    "city": "Langenfeld",
    "country": "DE",
    "province": "NRW",
    "houseNumber": "42a",
    "postalCode": "40764",
    "street": "Hauptstr.",
    "addressType": "POSTAL_ADDRESS"
  },
  "deliveryPreferences": {
    "preferredCarriers": [
      "text"
    ],
    "preferredCarriersWithProduct": [],
    "preselectedFacilities": [
      null
    ],
    "serviceLevel": "DELIVERY",
    "carrierProductCategory": "STANDARD",
    "desiredDeliveryTime": "2020-02-03T09:45:51.525Z"
  },
  "includeCalculationHints": true
}
{
  "checkoutOptions": [],
  "calculationHints": [
    "text"
  ]
}

This endpoint is to be used to get information about the possible delivery of items

post
Body
desiredDeliveryDatestring · date-timeRequired

The desired delivery date. (timestamp of the request)

Example: 2024-06-03T00:00:00.000Z
tenantArticleIdsstring[] · min: 1 · max: 50Required

The tenant articleIds for which the check is performed. The provided items are considered individually.

Example: DE-ZGT-4711
Responses
200
The request could be evaluated.
application/json
post
POST /api/promises/checkoutoptions/delivery/timepoint HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 101

{
  "desiredDeliveryDate": "2024-06-03T00:00:00.000Z",
  "tenantArticleIds": [
    "DE-ZGT-4711"
  ],
  "facilities": []
}
{
  "items": []
}

4. Create a new purchaseOrder

Before patching the existing purchaseOrder (created in step 2) with the actually ordered quantity, a new purchaseOrder with large quantities needs to be created. This ensures that the systems can already accept customer orders that should be fulfilled within next production or replenishment cycle. See step 2 for this.

5. Patch purchaseOrder with actual quantity

Once the purchase order was placed or the production schedule was defined, patch requested items in purchase order with quantities that were actually ordered or planned to be produced. Adjust stock properties such as expiry date if necessary.

If there are more reservations than (expected) stock for reasons such as problems during production or defective items in a delivery, our systems try to distribute these abandoned reservations to other stock. If no alternative stock is available, the reservation is still tracked and will be shifted to a stock as soon as some stock becomes available.

Partially updates a Purchase Order using a selection of fields

patch
Path parameters
purchaseOrderIdstringRequired
Body
cancelledbooleanOptionalDeprecated

This field is deprecated. Set the status to 'CANCELED' Set the purchaseOrder to 'cancelled'. No further deliveries will be expected. Already received goods are unaffected.

customAttributesobject | nullableOptional

Attributes that can be added to this entity. These attributes cannot be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.

orderDatestring · date-timeOptional
statusstring · enumOptionalPossible values:
versionnumberRequired
Responses
200
Updated Purchase Order entity
application/json
patch
PATCH /api/purchaseorders/{purchaseOrderId} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 325

{
  "customAttributes": {},
  "orderDate": "2025-07-08T22:46:24.316Z",
  "requestedDate": {
    "type": "ASAP",
    "value": "2025-07-08T22:46:24.316Z"
  },
  "requestedItems": [
    {
      "customAttributes": {},
      "quantity": {
        "unit": "text",
        "value": 1
      },
      "stockProperties": {
        "expiry": "text"
      },
      "tenantArticleId": "text"
    }
  ],
  "status": "OPEN",
  "supplier": {
    "name": "text"
  },
  "version": 1
}
{
  "created": "2025-07-08T22:46:24.316Z",
  "customAttributes": {},
  "facilityRef": "text",
  "id": "text",
  "inboundProcessRef": "text",
  "lastModified": "2025-07-08T22:46:24.316Z",
  "orderDate": "2025-07-08T22:46:24.316Z",
  "requestedDate": {
    "type": "ASAP",
    "value": "2025-07-08T22:46:24.316Z"
  },
  "requestedItems": [
    {
      "customAttributes": {},
      "quantity": {
        "unit": "text",
        "value": 1
      },
      "stockProperties": {
        "expiry": "text"
      },
      "tenantArticleId": "text"
    }
  ],
  "status": "OPEN",
  "supplier": {
    "name": "text"
  },
  "transfer": {
    "id": "text"
  },
  "version": 1
}
Example query for patching purchaseOrder
{
  "version": 2,
  "requestedItems": [
    {
      "tenantArticleId": "4711",
      "quantity": {
        "value": 150
      },
      "stockProperties": {
        "expiry": "2025-02-19T12:59:37.192Z"
      }
    }
  ],
  "facilityRef": "warehouse-cgn"
}

6. Create stock after delivery has arrived or products are produced

If the delivery of the ordered products has arrived or the production was finished, a receipt needs to be added to the inbound process of the purchase order to create stock. Use the GET /api/purchaseorders/{purchaseOrderId} endpoint to query the inboundProcessRef if not sure about the inboundProcess that the purchase order belongs to.

Adds a receipt to an inbound process.

post
Path parameters
inboundProcessIdstringRequired
Body
asnRefstringOptional

enables mapping a receipt to one of the ASNs in this inbound process

customAttributesobject | nullableOptional

Attributes that can be added to this entity. These attributes cannot be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.

receivedDatestring · date-timeRequired

date-time of the arrival of the items in the facility

statusstring · enumOptional

status of this receipt, only receipts with status 'FINISHED' are booked. IN_PROGRESS can be used to save partial receipts.

Possible values:
Responses
201
Receipt was added to the inbound process
application/json
post
POST /api/inboundprocesses/{inboundProcessId}/receipts HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 416

{
  "asnRef": "text",
  "comments": [
    {
      "content": "text",
      "userRef": "text"
    }
  ],
  "customAttributes": {},
  "receivedDate": "2025-07-08T22:46:24.316Z",
  "receivedItems": [
    {
      "acceptedQuantity": {
        "unit": "text",
        "value": 1
      },
      "comments": [
        {
          "content": "text",
          "userRef": "text"
        }
      ],
      "customAttributes": {},
      "rejectedQuantity": {
        "unit": "text",
        "value": 1
      },
      "stockProperties": {
        "expiry": "text"
      },
      "storageLocationRef": "text",
      "tenantArticleId": "text"
    }
  ],
  "status": "OPEN"
}
{
  "asnRef": "text",
  "comments": [
    {
      "content": "text",
      "documentSetRef": "text",
      "id": "text",
      "userRef": "text"
    }
  ],
  "customAttributes": {},
  "id": "text",
  "receivedDate": "2025-07-08T22:46:24.316Z",
  "receivedItems": [
    {
      "acceptedQuantity": {
        "unit": "text",
        "value": 1
      },
      "comments": [
        {
          "content": "text",
          "documentSetRef": "text",
          "id": "text",
          "userRef": "text"
        }
      ],
      "customAttributes": {},
      "id": "text",
      "rejectedQuantity": {
        "unit": "text",
        "value": 1
      },
      "stockProperties": {
        "expiry": "text"
      },
      "storageLocationRef": "text",
      "tenantArticleId": "text"
    }
  ],
  "status": "OPEN"
}

Example query for adding a receipt to an inboundProcess
{
  "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?