Days Available

Days Available is a product attribute representing the time since an item was created in Salesforce B2C Commerce

The attribute is calculated based on the current date and availableDate of the product. If an availableDate isn't imported the creationDate of the product in B2C Commerce is automatically determined and used instead. It isn't based on when the product went online or became available. Days Available is a global attribute, so its value is the same across all B2C Commerce sites that share products.

Days Available:

If a product (p) has an available date, then the days available of the product is equal to the current date minus the available date.

DaysAvailable(p) = Current Date - Available Date(p)

If product (p) doesn't have an available date, then the days available of the product is equal to the current date minus the creation date.

DaysAvailable(p) = Current Date - Creation Date(p)

Available Date Example

Days Available in days: 20

Days Available in hours: 480

No Available Date Example

Days Available in days: 21

Days Available in hours: 504