The Feature Nutrition widget in Sanity enables the content teams to manage what nutritional fields are displayed in the whitelabel application (under the Nutrition & Allergen modal), as well as the order those fields are displayed.
Feature Nutrition Configuration
Each nutrition & allergen value that is desired to be displayed in the whitelabel application should be added to the tables within the Feature Nutrition widget with their Nutrition Key (e.g. calories, fat, sodium):
The configuration above will reflect as follows within the whitelabel application:
The widget allows users to also group nutrition values, add translations and has rounding rules that control whether and how the values are rounded.
The widget display options are configured at a market-level, it is not possible to determine a custom list of values or ordering at a product-level.
To enable Nutrition Explorer, configure the LD Flag enable-feature-nutrition-integration
as TRUE, and if you would also like the allergens to display enable enable-nutrition-explorer-allergens
as TRUE.
Once the enable-feature-nutrition-integration
is set to TRUE, then the nutritional & allergen information in the whitelabel application becomes read as-is from Sanity based on the values in the Feature Nutrition widget. That is, rounding of values and conversions (e.g. kJ, per 100g) are not performed automatically by whitelabel, but are managed and read directly from the Feature Nutrition widget.
Please reach out to your CSM to enable the mentioned LD flags in Production or Staging for your brand.
Sanity document for Items/Combos/Modifiers contains two different nutrition configs: nutrition & nutritionWithModifiers. Whether the whitelabel app relies on the nutrition or nutritionWithModifiers from the Sanity document to showcase nutritional values is controlled by this flag.
When Feature Nutrition is enabled (enable-feature-nutrition-integration
= TRUE), the Nutrition Keys which are not added under the Items section will not display in the whitelabel application. Additionally, the fields that are not added won’t be modifiable via the Nutrition and Nutrition with Modifier sections in Sanity Menu Item document (the fields will disappear upon a click).
Markets utilizing the Feature Nutrition Widget for displaying nutritional values can choose whether or not to display the unit of value beside the number. Below is an example where units are attached both to the nutritional item’s description and its value. To display units in descriptions, these must be manually entered in Sanity (e.g. "Fett (g)" or "Brennwert (kJ / kcal)").
To omit units from values, select "Omit Unit from Value" under Feature Nutrition => Edit Nutrition Item. This change allows for greater flexibility and control over what is displayed in the description, without automatically displaying units next to values on the Whitelabel platform:
Product Size
The configuration option Product Size has been added to Sanity to indicate the serving size together with the nutrition values. This enhancement is valuable for markets where the serving size is legally required to be shared.