Shelf-Life Accounting and Write-Offs in MySales: Automation and Accuracy in Product Orders

Shelf-Life Accounting and Write-Offs in MySales: Automation and Accuracy in Product Orders

For products with a limited shelf life, it is not enough just to forecast sales and determine the quantity for the next order.

It is also important to understand what stock will actually remain until the next delivery, what part of it may be written off, and how much product the store will be able to sell before the shelf life expires.

In MySales, shelf life and forecasted write-offs are taken into account when calculating the need. This helps maintain the required level of product availability while simultaneously controlling the risk of OOS, overstock, and write-offs.

In this section, we will consider:

  • how shelf life affects the order calculation;

  • which parameters are used for stock control;

  • what D1 and D1D2 mean;

  • how forecasted write-offs affect stock and need;

  • how the need for the next delivery cycle is formed;

  • how the shelf-life limitation works in a practical example.

Before You Begin

During the order calculation, MySales takes into account not only the sales forecast.

Depending on the SKU settings, the calculation may use:

  • current stock;

  • forecasted stock;

  • goods in transit;

  • sales forecast;

  • forecasted write-offs;

  • Safety Stock;

  • Presentation Stock;

  • shelf life;

  • maximum allowed stock;

  • allowed write-off level;

  • schedule of next deliveries.

Therefore, the final order quantity depends on two key questions:

How much product will be needed?

and

How much product is safe to maintain considering the shelf life?

How MySales Takes Shelf Life into Account

For products with a limited shelf life, MySales uses shelf life control parameters that help avoid stock exceeding the potential sales volume within the allowed period.

The main principle:

The system determines the future need and compares it with the allowed stock level for a product with a limited shelf life.

This is especially important for:

  • fresh categories;

  • culinary products;

  • dairy products;

  • bakery products;

  • ready-to-eat;

  • other perishable products.

This approach helps not only maintain availability but also avoid situations where an excessive order later turns into write-offs.

Shelf Life Control Parameters

Parameters related to shelf life and stock limitation are available in:

Replenishment → Item Parameters

Parameter

Purpose

Parameter

Purpose

Shelf term

Product shelf life in days

Max SD

Maximum stock in days of sales

Sh.life %

Share of shelf life used in the calculation

Shelf limit

Stock limitation based on shelf life

Waste limit

Control of the allowed write-off level

% max SS

Limitation of the Safety Stock impact on maximum stock

Shelf life control, therefore, is not limited to only one Shelf term parameter.

Shelf term

Shelf term defines the product shelf life in days.

The base shelf life value is related to the product data:

PRODUCTS.SHELF_DAYS

The parameter is available in:

Replenishment → Item Parameters

In a simplified form, the allowed stock based on shelf life can be represented as follows:

Maximum Stock = Average Daily Forecast × Shelf term

Example

If:

Average Daily Forecast = 10 units/day

and:

Shelf term = 14 days

then:

Maximum Stock = 10 × 14 = 140 units

Therefore, the forecasted sales volume over 14 days is 140 units.

This logic helps avoid forming stock in a volume that may not be sold before the shelf life expires.

Sh.life %

Sh.life % allows only a defined part of the shelf life to be used in the calculation.

For example, even if the physical shelf life is 10 days, the stock does not necessarily have to be planned for this entire period.

This makes it possible to leave an additional time buffer before the actual shelf life expires and reduce the risk of unsold stock.

Max SD

Max SD is used to control the maximum stock in days of sales.

For example:

Shelf term = 30 days

Max SD = 14 days

In such a scenario, the product can physically be stored longer, but the planned stock may be limited to a shorter horizon.

This helps control overstock even for products with a relatively long shelf life.

Shelf limit

Shelf limit is related to the application of the stock limitation based on shelf life.

After determining the need, the system can compare it with the allowed stock level.

Thus, a high forecast, Safety Stock, or other need components should not automatically lead to excessive stock.

Waste limit

Waste limit is used to control the allowed level of future write-offs.

For certain categories, a complete absence of write-offs is not always the optimal business goal.

For example, in culinary products or ready-to-eat, a certain quantity of product may be necessary to maintain sufficient display and availability even at the end of the day.

Therefore, the system should help maintain the balance:

Availability ↔ Write-offs

% max SS

Safety Stock is used to protect against OOS and unexpected changes in demand.

However, for products with a short shelf life, an excessively large safety stock may increase the risk of future write-offs.

% max SS is used to control the impact of Safety Stock on maximum stock.

How the Parameters Work Together

Interrelated parameters are used to control shelf life:

Shelf term → Sh.life % → Max SD → Shelf limit → Waste limit → % max SS

Together, they help control:

  • the demand period that is reasonable to cover with stock;

  • maximum allowed stock;

  • application of the shelf-life restriction;

  • allowed level of future write-offs;

  • impact of Safety Stock on total stock.

This makes it possible to adapt replenishment logic to products with different shelf lives and different sales speeds.

What D1 and D2 Are

During the order calculation, MySales evaluates stock and need relative to the next deliveries.

D1 — the next delivery.

D2 — the next delivery after D1.

Thus, the calculation covers two main periods:

O1 → D1
the period from the moment of the current calculation until the next delivery;

D1 → D2
the period that must be covered by the next delivery.

Forecasted write-offs are taken into account specifically for these periods.

Write-offs D1

Write-offs D1 — forecasted write-offs until the next delivery D1.

If part of the current stock will be written off before the next delivery, it cannot be considered actually available stock.

Therefore, forecasted write-offs reduce Stock D1.

Stock D1 Calculation

In a simplified form:

Stock D1 = max(0, Stock O1 − Forecast O1D1 − Write-offs O1D1 + In-transit O1D1)

where:

Stock O1 — current stock;

Forecast O1D1 — sales forecast until D1;

Write-offs O1D1 — forecasted write-offs until D1;

In-transit O1D1 — goods in transit expected before D1.

Example

Assume:

Stock O1 = 90

Forecast O1D1 = 50

Write-offs O1D1 = 5

In-transit O1D1 = 10

Then:

Stock D1 = max(0, 90 − 50 − 5 + 10)

Stock D1 = 45

Therefore, at the moment of the next delivery, the system expects 45 units of available stock.

If forecasted write-offs were not taken into account, the calculated stock would be 50 units. This would mean an overestimated assessment of the actually available stock.

Write-offs D1D2

Write-offs D1D2 — forecasted write-offs during the period between D1 and D2.

Unlike write-offs before D1, they are included in the future need because part of the product during this period may be lost and will not be available for sale.

In simple terms:

Write-offs D1
→ reduce the stock that will be available at D1.

Write-offs D1D2
→ increase the need for the period between D1 and D2.

How the Need Is Formed

After determining Stock D1, the system calculates the need for the next delivery cycle.

In a simplified form:

Calculated Need = round(Forecast D1D2 + Write-offs D1D2 + Safety Stock D1D2 + Presentation Stock − Stock D1)

Component logic:

Forecast D1D2
Covers forecasted sales in the D1D2 period.

Write-offs D1D2
Take forecasted product losses into account.

Safety Stock D1D2
Protects against deviations of actual demand from the forecast.

Presentation Stock
Maintains the required quantity of product for display.

Stock D1
Reduces the need because this product will already be available at D1.

How Shelf-Life Limit Affects the Order

After determining the need, it must be compared with the allowed stock based on shelf life.

Conceptually:

Final Order = min(Calculated Need, Shelf-Life Limit)

If:

Calculated Need ≤ Shelf-Life Limit

the limitation does not reduce the need.

If:

Calculated Need > Shelf-Life Limit

the quantity is limited to the allowed level.

Thus:

  • forecasted write-offs may increase the need;

  • shelf-life restriction may limit the final quantity.

These two mechanisms work together so that compensation for future losses does not create new overstock.

Full Calculation Example

Let us consider a simplified example for one SKU.

Parameter

Value

Parameter

Value

Forecast D1D2

100

Write-offs D1D2

10

Safety Stock D1D2

15

Presentation Stock

5

Stock O1

90

Forecast O1D1

50

Write-offs O1D1

5

In-transit O1D1

10

Shelf term

14 days

Average Daily Forecast

10 units/day

Step 1. Calculate Stock D1

Stock D1 = max(0, 90 − 50 − 5 + 10)

Stock D1 = 45

By the time of the next delivery, the expected amount is:

45 units of available stock

Step 2. Calculate the D1D2 Need

Calculated Need = round(100 + 10 + 15 + 5 − 45)

Calculated Need = 85

Before applying the shelf-life restriction, the need is:

85 units

Step 3. Determine the Allowed Stock Based on Shelf term

Maximum Stock = Average Daily Forecast × Shelf term

Maximum Stock = 10 × 14

Maximum Stock = 140

Approximate allowed stock:

140 units

Step 4. Compare the Need with the Limitation

Final Order = min(85, 140)

Final Order = 85

Since the calculated need is lower than the allowed level, the shelf-life restriction does not reduce the order.

If the Need Exceeds the Allowed Stock

For example:

Calculated Need = 170

Shelf-Life Limit = 140

Then:

Final Order = min(170, 140)

Final Order = 140

In this case, the shelf-life restriction limits the quantity to the allowed level.

Why the System Takes Both Write-Offs and Shelf Life into Account

At first glance, these mechanisms may seem opposite.

Write-offs may increase the need because part of the product will be lost.

The shelf-life limitation, on the contrary, may reduce the final quantity so that the new order does not create excessive stock.

In fact, the system answers two different questions.

1. How Much Product Will Be Needed?

Forecast + Write-offs + Safety Stock + Presentation Stock − Available Stock

2. How Much Product Is Safe to Maintain?

This is determined by shelf life parameters and stock limitations.

The combination of these two logics helps avoid compensating for some write-offs by creating new overstock.

Where to View Shelf Life Parameters

Go to:

Replenishment → Item Parameters

For the corresponding SKU, the following parameters are available:

  • Shelf term;

  • Max SD;

  • Sh.life %;

  • Shelf limit;

  • Waste limit;

  • % max SS.

Other replenishment logic parameters that may affect order formation are also available in this section.

How to Set Shelf term

Open:

Replenishment → Item Parameters

Find the required SKU and store.

In the Shelf term parameter, specify the required term in days, for example:

Shelf term = 14

The base shelf life value is related to:

PRODUCTS.SHELF_DAYS

The parameter is used when calculating the allowed stock based on shelf life.

Where to View D1 and D1D2 Write-Offs

Forecasted write-offs are analyzed at the order line level:

Order → Lines

For the corresponding SKU and store, the following indicators are used:

  • Write-off D1;

  • Write-off D1D2.

They help understand:

  • what part of the stock may be lost before D1;

  • what write-offs are forecasted between D1 and D2;

  • why the calculated need may differ from the regular Forecast.

The values are used in the Order Lines table view.

Additional Factors

When calculating future need, changes in demand, including seasonal peaks and promotions, may also be taken into account.

At the same time, shelf life logic helps avoid creating stock that will not be sold in time.

If write-offs are forecasted, they are taken into account in the need calculation so that available stock is not overestimated.

Packaging rules and minimum order quantity may also affect the final quantity.

How to Read the Result

Forecasted write-offs do not mean that the system simply adds an equivalent quantity of product to the order.

During the calculation, two sides are evaluated simultaneously.

Need

Forecast + Write-offs + Safety Stock + Presentation Stock − Stock

Risk of Excessive Stock

Shelf term + Sh.life % + Max SD + Shelf/Waste restrictions + % max SS

As a result, the order should simultaneously:

  • cover forecasted demand;

  • take expected losses into account;

  • maintain Safety Stock;

  • provide Presentation Stock;

  • not create excessive stock for a product with a limited shelf life.

Result

Taking shelf life and write-offs into account allows MySales to form the need considering not only forecasted sales but also actually available stock, future losses, and the risk of excessive stock.

As a result, the system helps:

  • more accurately estimate stock at the moment of the next delivery;

  • not consider as available the product that is forecasted to be written off;

  • take future losses in the D1D2 period into account;

  • control the stock of products with a short shelf life;

  • take Safety Stock and Presentation Stock into account;

  • balance availability and write-offs;

  • reduce the risk of OOS;

  • control overstock;

  • reduce the need for manual order adjustments.

As a result, MySales helps answer not only the question:

“How much product needs to be ordered?”

but also the more important one:

“How much product needs to be ordered now in order to cover future need while at the same time not creating a new risk of write-offs?”

This is precisely the business value of automatically taking shelf life and write-offs into account in the replenishment process.