Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Fonctionnalité 

...

Functionality 

Buffers are used to protect a certain number of stock units. The most common use case is to protect a few units (2-3) du stock sur le stock vendable global, pour ainsi mitiger la désynchronisation entre les ventes en magasin et les ventes en ligneof stock from the overall saleable stock, in order to mitigate desynchronisation between in-store and online sales.

Info

Application par type de stock

Les buffers peuvent être appliques de manier globale ou par endpoint, par contre, leur application est toujours ouverte par type de stock. Il n'y a pas une application unifiée qu'englobe plusiers types de stock à la fois.

Example : S'il y a un buffer glob de 2 pour le type de stock on_hand et un autre de 3 pour le type de stock ASN, quand les buffers sont appliques de manier global, leur application corresponde à la sum de l'application globale pour on_hand + l'application global pour l'Buffers can be applied globally or by endpoint, but their application is always open by stock type. There is no unified application that encompasses more than one type of stock at a time.

Example: If there is a global buffer of 2 for the on_hand stock type and another of 3 for the ASN stock type, when the buffers are applied globally, their application corresponds to the sum of the global application for on_hand + the global application for ASN.


Buffer groups

Tout Any buffer à un buffer_group auquel il appartient et que permet lui faire référence depuis une requete de stockto a buffer_group to which it belongs and that allows it to be referred to from a stock request

Buffer groups

...

in stock requests
Code Block
languagejs
{
    "aggregates": {
        "0": {
            "deduction": {
                "endpoint_buffer": [
                    "FR",
					"IT"
                ],
                "global_buffer": [
					"stores_FR"
                ]
            }
        }
    }
}

Types

...

of Buffers

Il existe deux types de There are two types of buffers, le buffers endpoint et le buffers and global . Le premier seront assigne et déduit a niveau endpoint, le deuxieme seront assigne sans un notion d'endpoint et seront déduit un fois l'endpoints ont été agrégé. Comme resultat, le buffers global sont prise en compte seulement dans le requete de stock avec d'unification par 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 endpoints have been aggregated. As a result, the global buffers are only taken into account in the stock query with unification by endpoint.

Buffer endpoint

Declaration

...

by item, endpoint ID

...

pair

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

...

Declaration avec key requests

Très similaire aux buffers en dur, mais plus flexibles. Ils permettent de indiquer des filtres pour prendre en compte de manier dynamique des endpoints et Very similar to hard buffers, but more flexible. They allow you to specify filters to take into account the dynamic handling of endpoints and items.

endpoint_id

item_id

qty

buffer_group

endpoint_type = store AND address.region.country.code = FR

*

9

FR

endpoint_type = warehouse 

*

12

WORLD

Buffer Global

Permet affecter un buffer de manier global, donc sans renseigner de filtrage sur les endpoints affecté. Si un filtre endpoint est declaré il sera ignoré. Permet buffériser une nombre de unites a niveau globalAllows a buffer to be allocated globally, i.e. without filtering the endpoints affected. If an endpoint filter is declared, it will be ignored. Allows a number of units to be buffered globally.

item_id

qty

buffer_group

category = "bebe"

9

FR

*

12

WORLD

Structure d'un buffer

...

Buffer structure

API signature

Routes BIP - Buffer Inventory Processor

  • item_filter: Si If nil, s'applique à tous les applies to all items

    • id (string): item_id sur le quel le buffer serai appliqué (buffer en duron which the buffer will be applied (hard buffer)

    • request_name (string): Permet appliquer le buffer a un request de items (tous les items avec un certain catégorie). Doit être vide si id est Used to apply the buffer to a request item (all items with a certain category). Must be empty if id is set

  • endpoint_filter:   Si If nil, s'applique à tous les applies to all endpoints

    • id (string): endpoint_id sur le quel le buffer serai appliqué (buffer en durto which the buffer will be applied (hard buffer)

    • request_name (string): Permet appliquer le buffer a un request de endpoints (tous endpoints du Used to apply the buffer to a request endpoint (all endpoints of type store). Doit être vide si id est Must be empty if id is set

  • stock_type (string): required type de stock sur lequel le buffer est appliquéof stock on which the buffer is applied.

  • global (bool): true dans le cas d'un buffer global, false sinonin the case of a global buffer, false otherwise.

  • buffer_group (string): required buffer group au quel appartient le buffer, permet lui fair référence dans une requete de stockto which the buffer belongs, allows it to be referenced in a stock request..

  • qty (int): required nombre de unites bufférisésnumber of buffered units

Impact

...

Prise en compte dans le requêtes de stock

Les buffers globals/endpoints que sont appliques dépende de la configuration des requêtes de stock. Dans la requete de stock on liste les buffers groups - les groups dans lesquels les buffers sont reparties - que doive être prise en compte. S'il y a 3 buffers globales configures pour une même clé de stock, et le but se d'appliquer arbitrairement 1 de ces 3. Il suffit de les repartir dans 3 buffers groups différents, et d'indiquer QUE 1 seul dans la requête de stock.

Calcul

Quand les buffers sont prise en compte dans un requete de stock, le calcul de stock disponible ce fait comme suit : 

...

of buffers on stock calculations

Taken into account in stock requests

The global buffers/endpoints that are applied depend on the configuration of the stock requests. The stock request lists the buffer groups - the groups into which the buffers are distributed - that need to be taken into account. If there are 3 global buffers configured for the same stock key, and the aim is to apply arbitrarily 1 of these 3, all you have to do is distribute them in 3 different buffers groups, and indicate ONLY 1 in the stock request.

Calculation

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

Without endpoint unification

Info

Detaille

Stock par per endpoint => MAX( RawStock - ResEndpoint - Dispositions - MAX ( BufDur, BufEndpoint ) , 0 )

...

With endpoint unification

...

Code Block
MIN(
    SUM(
        MAX_par_endpoint(
            RawStock - ResEndpoint - Dispositions - MAX(BufDur, BufEndpoint),
            0
        )
    ),
    SUM(RawStock - ResEndpoint - Dispositions) - BufGlob
)