Salesforce stock calculation explained (no headaches, I promise)

Salesforce stock calculation explained (no headaches, I promise)

Salesforce stock calculation explained (no headaches, I promise)

  • Jonatan Jumbert

  • 1 minute read

I bet my left arm you don't know how Salesforce calculates the available units you have to sell in your store. 😏

(Nope, perpetual stock doesn't count. Nice try tho.)

Here's the magic formula: ATS = max(0, allocation + preorderBackOrderAllocation - turnover - onOrder)

Confused? Quick explanation:

  • ATS (Available to Sell): units ready for sale

  • Allocation: units you list for sale

  • Preorder/Backorder Allocation: units you let customers buy early or when out-of-stock

  • Turnover: units sold since last stock update

  • On Order: units already ordered but not yet shipped (this is optional, you choose)

Simple English: your ATS is either zero or the sum of units listed + preorder units minus those sold and pending shipment—whichever is higher. Salesforce won't let you sell negative stock. 😉

There you go, you've learned something new today.

You're welcome.

(We're already outta here, won't bother you more.)