Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 15 Next »

Overwiew 

Purpose of Buffers: Buffers are used to reserve a certain number of stock units. Their primary role is to prevent issues like stock desynchronization across various sales channels. This is particularly useful in scenarios where there are both physical store sales and online sales.

Application by Stock Type: Buffers can be applied in different ways, either globally or by specific endpoints (like a particular store or warehouse). The key aspect of buffer application is that it is always open by stock type. This means each type of stock, like on_hand or ASN (Advanced Shipping Notice), is considered separately, and buffers for different stock types are not unified.

Types of Buffers

There are two types of buffers, detailed buffers and global buffers. The first will be assigned and deducted at endpoint level, the second will be assigned without a notion of endpoint and will be deducted once the stock locations have been aggregated. As a result, the global buffers are only taken into account in the stock query with unification by stock llocation.

Detailed Buffer

Declaration by item, stock location ID pair

The simplest buffers, corresponding to a number of buffered units for a couple item_id , endpoint_id.

Stock Location ID

Item ID

Quantity

Buffer group

store_1

i1

2

FR

store_1

i1

3

US

Declaration by key requests

Similar to previous, but more flexible. Allows to apply the buffer based on an existing Item and Stock Location Key Request. Key requests are prefilled Item queries, which allow for example retrieveing items from Spring Season, or Stock Locations from London

Stock Locations

Items

Quantity

Buffer group

London stores

Spring 25

3

UK

Paris stores

Spring 25

2

FR

Global Buffer

Allows a buffer to be allocated globally, i.e. without filtering the stock locations affected. If an endpoint filter is declared, it will be ignored. Allows a number of units to be buffered globally.

Stock Locations

Items

Quantity

Buffer group

Global

London stores

Spring 25

15

UK

true

Paris stores

Spring 25

10

FR

true

Creating buffers

Buffers can be created by API. Refere to our API documentation portal for more information : https://developers.onestock-retail.com/paths/buffers/patch

Impact of buffers on stock calculations

Taken into account in stock requests

Buffers are categorized into buffer groups. This categorization allows for efficient referencing from a stock query, making the management of buffers more structured and organized.

Bufferes are taken into account in Stock Queries when their groups are referenced in the query.

Global buffers will only take effect when the Stock Query is unified by stock location, otherwise it will not be taken into account.

Learn more about stock queries herer Configuration of stock queries

Calculation

When buffers are taken into account in a stock request, available stock is calculated as follows: 

Detailed stock query : Without stock location unification

Stock per stock location : 

MAX( 
    RawStock - ResStockLocation - Dispositions - MAX(BufPairs, BufKeyRequest) ,
    0 
)

With endpoint unification

MIN(
    SUM(
        MAX_per_stock_location(
            RawStock - ResStockLocation - Dispositions - MAX(BufPairs, BufKeyRequest),
            0
        )
    ),
    SUM(RawStock - ResStockLocation- Dispositions) - BufGlob
)


  • No labels