Availability is the normalized ratio between the Allocation attribute and the Available To Sell (ATS) attribute of a B2C Commerce product inventory record. Special rules apply for variation products, product sets, and potentially product bundles. Availability is the same for all sites that share an Inventory list, so it's basically a site-specific value.
Availability:
- Isn’t staged and values are specific to each instance
- Is a ratio value from 0.0 through 1.0
- Salesforce B2C Commerce computes values in real time
Standard Product
Example: Standard Product and Bundled Products Within an Inventory List
Allocation(p: 50)
ATS(p: 10)
Availability(p: 10 / 50 = 0.20)
Base Product and Variations
If the number of online variations is zero, then the availability of the base product is zero.
Otherwise, the availability of a base product is equal to the sum of the availability of each variation product divided by the total number of variation products. Availability is calculated using the following formula:
Availability(mp) = SUM(Availability(vpX)) / X)
Where:
mp is a base product
vpX are online variantion products of the base product
X is the number of online variation products
Example: Base Product Within an Inventory List
Variation product 1
Allocation: 50
ATS: 10
Availability: 0.20
Variation product 2
Allocation: 100
ATS: 10
Availability: 0.10
Base Product
Availability: (0.20 + 0.10) / 2 = 0.15
Product Bundle
A product bundle’s availability is the availability of its least available product, because products in a bundle can't be purchased separately. B2C Commerce calculates availability using the following formula:
Availability(bp) = MIN(Availability(cpX))
Product Set
A product set’s availability is the availability of its most available product, because products are purchased individually, but are promoted through a set. So customers can purchase any item in a set that’s still available. B2C Commerce calculates availability using the following formula:
Availability(sp) = MAX(Availability(cpX))
Where
sp is a product set
cpX are online products in the set
Example: Product Set Within an Inventory List
Product 1 in set
Allocation: 50
ATS: 10
Availability: 0.20
Product 2 in set
Allocation: 100
ATS: 10
Availability: 0.10
Product set
Availability: MAX(0.20, 0.10) = 0.20