Skip to content

How the quantity is calculated ​

For every linked offer, Stock Sync works out one number: the stock to publish. This page gives every rule that goes into that number, in order, with examples you can check by hand.

The short version ​

Stock to publish = the PIM's available stock, cleaned up (no negatives, no decimals), capped at the marketplace's maximum (65,535 on eMAG and Fashion Days, 1,000,000 on ABOUT YOU). Only the stock of the vendors that count is used: operators can leave vendors out for all accounts or for one. When the account has a Lead-time limit, only the stock of the suppliers that can ship within it counts: 0 if none can. An orphaned offer always gets 0.

It is sent only when it differs from the number the marketplace last confirmed (Published).

That is all. There is no safety buffer (such as "stock minus 1"), no minimum, and no price, handling-time or delivery-promise logic.

The decision, step by step ​

Every rule in detail ​

Rule 1: only linked and orphaned offers have a number ​

Link statusStock to publish
LinkedCalculated by rules 2 to 5
Orphaned (product removed from the PIM)Always 0
Not linkedNone. Stock Sync never sends anything for it

See Matching offers to products.

Rule 2: the PIM numbers are cleaned up ​

Before anything else, each PIM stock number becomes a whole number of 0 or more:

PIM valueBecomes
77
−30
7.97 (always rounded down, never up)
empty, or not a number0

Rounding down is deliberate: publishing 8 when there are 7.9 pieces would oversell.

Rule 3: available stock is the number ​

Stock Sync publishes the PIM's available stock on every account: what we can sell now. There is nothing to choose.

The PIM's on hand stock (what is physically in the warehouse) is shown beside it on the offer page and in the Offers list's Stock breakdown (and its optional PIM stock column), for information only. It includes pieces Odoo has reserved for other orders, so publishing it would sell them twice. A change of on hand alone sends nothing.

Available can be higher than on hand (stock a supplier holds counts in available, not in our warehouse) or lower (pieces reserved for orders). Either way, available is what is sent.

Rule 3b: only the vendors that count ​

The PIM lists a product's stock per vendor (its supplier). Operators choose which vendors count, at two levels: for all accounts in Settings → Vendors, and for one account in its Stock rules. A vendor counts only if both levels let it through. Each level either leaves out the unticked vendors (All except…) or keeps only the ticked ones (Only these…).

The stock of a vendor that does not count is not published. Example: 5 pieces at Next Trade Other and 3 at another vendor, with Next Trade Other ignored: 3 is published, and the offer page says "Publishes 3 of 8 available: Next Trade Other is ignored app-wide." If all the stock is at ignored vendors the offer publishes 0, shows Eligible: No — all stock is at ignored vendors, and stays linked; it is not taken off the marketplace. A vendor that appears later is published under All except… and stays out under Only these… until someone ticks it.

Vendor rules come before the lead-time limit: the limit judges the stock that is left. Nothing is set on release day; every vendor counts until an operator leaves it out. Orders, Odoo and the PIM are not affected. Changing a rule starts a Recalculation of the accounts concerned. Step by step: Choose which vendors count.

Rule 4: never more than the marketplace accepts ​

eMAG and Fashion Days accept a stock between 0 and 65,535; ABOUT YOU accepts 0 to 1,000,000. A larger number is capped at the marketplace's highest value.

Rule 5: the lead-time limit ​

Each account can have a Lead-time limit, a whole number of days (for example 2, meaning the platform's 48-hour delivery promise). An empty field means No limit.

The PIM lists a product's stock per supplier, each with that supplier's delivery time (own stock is a supplier too, for example Next Trade ECOM/Stock). Each supplier's stock is judged by its own lead time:

  • the account has No limit: all the available stock counts;
  • a supplier whose lead time is equal to or shorter than the limit, or unknown: its stock counts;
  • a supplier whose lead time is longer than the limit: its stock is left out.

So an offer is eligible when all of its stock counts, partly eligible when only some does, and not eligible when none does. Stock at vendors that do not count (Rule 3b) is already left out before the limit is applied, and the offer page says which of the two held stock back: Partly — 3 of 8 by vendor rules, by vendor rules and lead time, or within 2 days. A product the PIM lists without suppliers is judged by its single lead time, as before.

Partly eligible publishes only the stock that counts. Example: 1 piece of own stock that ships in 2 days and 17 pieces at a supplier that needs 5 days, with a 2-day limit: 1 is published, not 18. The offer page shows Eligible: Partly — 1 of 18 within 2 days, the Offers list Partly · 1 of 18, and the Rules step of the stock path Partly eligible, "1 of 18 ship within 2 days". Until 19 October 2026 such a product published all 18 (fixed in COM-559).

An offer that is not eligible gets stock to publish 0, whatever the PIM says. The Offers list shows 5 d > 2 d in its Eligible column and "Not eligible — publishes 0" under the status, and the offer page Eligible: No — 5 days > 2 days, so you can see the lead time and the limit side by side. When the lead time comes back within the limit, the normal stock is published again at the next reading.

Where the lead time comes from is explained in Reading the catalog from the PIM.

Changing the limit starts a Recalculation of the whole account (or, if the account is paused or suspended, when it is resumed or recovered).

Rule 6: only differences are sent ​

The stock to publish is compared with Published, the number the marketplace last confirmed.

  • Equal: the offer is In sync. Nothing is sent. Stock Sync never sends the same number twice for no reason.
  • Different: the offer becomes Waiting to send, and the next sending round sends it if the account is Live, not paused and not suspended. See Sending stock to the marketplace.

Rule 7: ended offers are kept up to date but not sent ​

An offer the marketplace reports as Ended on the marketplace keeps a current stock to publish, but nothing is sent, because nobody can buy it. See Matching offers to products.

Table of examples ​

Every row can be checked with the rules above.

#PIM available / on handLead time / account limitStock to publishWhy
17 / 95 days / No limit7No limit, so eligible; available is sent
27 / 91 day / 2 days7Eligible; on hand is not sent
39 / 31 day / No limit9Available above on hand: still available
40 / 5unknown / No limit0Nothing available to sell; on hand is reserved
580,000 / 80,000unknown / No limit65,535The marketplace maximum
67 / 9unknown / 2 days7An unknown lead time counts as eligible
77 / 92 days / 2 days7Equal to the limit is still eligible
87 / 95 days / 2 days0Not eligible: "No — 5 days > 2 days"
97 / 92.5 days / 2 days02.5 is longer than 2
9a18 / 51 piece at 2 days, 17 at 5 days / 2 days1Partly eligible: only the supplier within the limit counts
9b18 / 51 piece at 2 days, 17 at 5 days / No limit18No limit, so all suppliers count
10−3 / 0— / No limit0A negative number becomes 0
114.8 / 6— / No limit4Rounded down
12(empty) / 9— / No limit0An empty value becomes 0
13anyany0The offer is Orphaned
14anyany—The offer is Not linked: nothing is calculated or sent

Worked examples ​

Example 1: an ordinary change ​

eMAG RO has a Lead-time limit of 2 days. Offer 101577 shows Published 4.

The PIM says 7 pieces available, 9 on hand, lead time 1 day.

  1. The offer is Linked.
  2. Lead time 1 day is within 2 days: eligible.
  3. The PIM's available stock: 7.
  4. 7 is under 65,535: stays 7.
  5. 7 is not 4: Waiting to send. eMAG RO is Live, so 7 is sent a second later and the offer becomes In sync, Published 7.

Example 2: a long lead time ​

The same offer, a week later. The product's stock now comes from a supplier with a lead time of 3 days. The PIM says 7 available.

  1. Linked.
  2. 3 days is longer than the 2-day limit: not eligible. The offer page shows Eligible: No — 3 days > 2 days.
  3. Stock to publish is 0, although the PIM says 7.
  4. 0 is not 7: 0 is sent. The offer stops selling on eMAG RO.

On Fashion Days RO, which has No limit, the same product still publishes 7.

When our own stock arrives and the PIM's lead time goes back to 1 day, the next reading makes the offer eligible again and 7 is sent.

Example 3: on hand changes, available does not ​

A delivery for a customer's order arrives at the warehouse. The PIM's on hand for product 300001 goes from 5 to 8; its available stays 3, because the pieces are reserved for that order.

At the next reading the product is recalculated: Stock to publish is still 3, so nothing is sent. The Offers list now shows "3 / 8".

Example 4: the cap and rounding together ​

The PIM holds 70,000.4 available for a bulk item. Rounded down: 70,000. Capped: 65,535. That is what is sent.

Where you see the numbers ​

On the Offers list, the Stock column shows three numbers, PIM available › Stock to publish › Marketplace shows, and its tooltip gives every step. The offer page and the side panel draw the same path as five steps (PIM stock › Rules › Stock to publish › Sent › Marketplace shows), with the step that is off coloured, and list the numbers under Details:

FieldWhich number
PIM stockThe two PIM numbers after rule 2, available / on hand; available is the one that is sent
EligibleYes, or No — 5 days > 2 days (the list's Eligible column: Yes or 5 d > 2 d)
Stock to publishThe result of rules 1 to 5
Published (the Sent step)The number the marketplace last confirmed
Marketplace showsWhat the marketplace last told Stock Sync: its confirmation of the last update, or the offer import if that came later

If a number looks wrong, Find out why a stock number is wrong walks you through these fields one by one.

Channel Hub — user guide for operators and viewers