Skip to main content

Stock Allocations

In EVA stock allocations are a way to limit or reserve stock between an organization and a supplier.

Stock allocations come in two types:

  • Reservations
  • Limitations

Reservations reserve a certain quantity of stock at the supplier, while Limitations limit the quantity of stock that can be used to supply the recipient.

Stock allocations can be configured by creating StockAllocationRules. To create one, we use CreateStockAllocationRule:

"Type": 1,
"OrganizationUnitSupplierID": 4,
"OrganizationUnitID": 4,
"ProductID": 48,
"ProductSearchTemplateID": null,
"ValueType": 1,
"Value": 30,
"StartDate": null,
"EndDate": null,
"RefillPeriodInDays": 5,
"Piority": 69

This service returns the ID for your newly created allocation rule.

OrganizationUnitSupplierIDID of the supplier relation for which you want to create a rule.
OrganizationUnitIDOrganizationUnitID of the OU being supplied.
ProductIDProduct to which the rule applies.
ProductSearchTemplateIDProductSearchTemplate to which the rule applies.
TypeEither Reservation (0) or Limitation (1).
ValueTypeEither Quantity (0) or Percentage (1).
ValueValue for ValueType. Should be between 0 and 100 if ValueType is Percentage.
RefillPeriodInDaysOnly applies to Type Limitation, see below for more information.
PriorityNumeric value, higher value is prioritized.

Optionally, you can specify a start and end date for your allocation rules.


A limitation requires input in either the ProductID or ProductSearchTemplateID.

StockAllocationRule typesโ€‹


A stock allocation rule of type Reservation reserves a certain quantity of stock for a certain store. Let's say we have three stores; store X, store Y and store Z. If the warehouse has 500 stock available and we make a reservation rule of 100 quantity for store X, it would look as follows:

100 units are exclusively available for store X, so store X has an availability of 500 and store Y and Z have an availability of 400.

The same is true for percentages: if the rule is a reservation of 10% between the warehouse and store A, then 50 is reserved for store X, and only 450 is available to Y and Z.


The type Limitation limits the amount of stock available for an organization. Let's say we have the same three stores. If the warehouse has 500 stock available and we make a limitation rule of 100 quantity for store X, it would look as follows:

Store X will have a quantity of 100 available, whereas Y and Z will have the full 500.

Now, when the supplier sends a quantity of 4 to store X, it would be updated as follows:

If the supplier would then send a quantity of 200 to any of the two other stores, the situation would be updated as follows:

If the available stock at the supplier were to drop below 96, the availability for store X would be updated accordingly, regardless of how much was allocated.

Limitation allocations are where the RefillPeriodInDays comes into play: the 'limited' amount available is periodically refilled to the allocated quantity based on that field. So if store X has 80 allocated to it because it sold 20, and the refill moment comes around, the 80 will be refilled to 100 again.

If the limitation is a percentage then the available quantity is calculated when the allocation is refilled. For example, when at the time of refill, the quantity available is 1000 and 10% is allocated to store X, an allocation of 100 is made available to store X, even if an hour later the total quantity available changes to 500. If the available stock is still 500 the next time the allocation is refilled, then an allocation of 50 is made to store X.

Additional servicesโ€‹