Models in SFRA provide a JSON object layer for the application. The models convert objects returned by the B2C Commerce script APIs into pure JSON objects designed for the storefront. The models also apply business logic for the storefront.
A model passed in for rendering a template is assigned to the
viewData variable. You can add extra properties to the
viewData variable — properties that are not provided by the
app_storefront_base cartridge.
Anything in the modules folder or the
toplevel folder is globally available and extendable.
You can customize models to: