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).