Skip to content

Allergens & Dietary Information

Overview

Allergen and dietary information helps customers identify items that match their dietary requirements or avoid allergens. These values are managed per menu item, in the Product Specifications section of the item form.

Key Purpose: Record allergens, dietary preferences, and dietary supplements on menu items so they can be shown on ordering channels.

Purpose

This is largely a reference / how-to topic. Each menu item carries four separate arrays — allergens, dietary_preferences, dietary_supplements, and ingredients — that you populate from option lists in the item editor. The option lists themselves are sourced from a shared reference dataset (the global Item Database), not configured per merchant.

Key Concepts

  • Allergens: An array stored per item. The picker is sourced from a reference dataset; each option has an id, a label, an icon name, and a fill color. Items store the option id values.
  • Dietary Preferences: A separate array per item describing dietary compatibility (e.g., Vegan, Halal, Kosher).
  • Dietary Supplements: A third array per item describing nutritional additives (e.g., Protein, Caffeine). Stored independently from dietary preferences.
  • Ingredients: A fourth array in the same Product Specifications section, populated from the Item Database reference data and stored on the item as ingredients.
  • AI / Item-Database Suggestions: When you type an item name, the editor can fetch a suggested match from the global Item Database and offer its allergens, preferences, supplements, ingredients, calories, etc. You can accept or dismiss each suggestion individually.

Actions

Assign Allergens to an Item

Open a menu item, go to the Product Specifications section, and select allergens from the picker. The available options come from the shared reference dataset.

Assign Dietary Preferences

In the same Product Specifications section, select applicable dietary preferences (e.g., Vegan, Halal).

Assign Dietary Supplements

Select applicable dietary supplements (e.g., Protein, Caffeine). These are stored in a separate field from dietary preferences.

Assign Ingredients

In the same Product Specifications section, select the item's ingredients from the Ingredients picker. Options come from the same Item Database reference dataset as the other three lists.

Use Suggestions

When editing an item, the editor can suggest allergens, preferences, supplements, ingredients, calories, and prep time based on a matching item in the global Item Database. Accept or dismiss each suggestion individually, or use the Accept All / Decline All buttons (shown whenever any suggestion is visible) to apply or clear them in bulk.

Remove an Allergen / Preference / Supplement / Ingredient

Remove any assigned value from the corresponding multi-select to drop it from the item.

Business Rules

  • All allergen-related fields are optional. Items can be saved with empty allergens, dietary_preferences, dietary_supplements, and ingredients arrays.
  • Backend validation treats each entry as nullable|array with * elements required|string (in StoreItemRequest); ingredients is validated identically. There is no server-side check that an allergen value matches any fixed list — items store whatever string values the editor sends (in practice, reference-data option IDs).
  • The option lists shown in the item editor come from the global Item Database reference data (reference-data/all), which is cached and includes translations. They are not configured per merchant.
  • A separate backend Constants list (Constants::$ALLERGENS_LIST_OPTIONS) and its /allergens-options endpoint also exist; this is where allergen icon and color metadata is defined. (See the Reference Lists section below.)
  • Item resources (back office, kiosk, online ordering, and channel serialization) return allergens, dietary_preferences, and dietary_supplements as plain string arrays — they do not embed per-item icon/color metadata.
  • A getTags() helper on the Item model merges dietary_preferences and dietary_supplements, but it is not exposed by any HTTP resource. There is no stored tags field on items.

Location

  • Back office route: /menus/items and /menus/items/* (the item form)
  • Vue component: src/views/items/forms/ItemProductSpecifications.vue (Product Specifications section)
  • Suggestion UI: implemented inline in src/views/items/forms/ItemProductSpecifications.vue via the src/composables/useItemSuggestions.ts composable and the src/components/InlineSuggestionChip.vue / InlineSuggestionValue.vue components. (The older src/components/SuggestedProductSpecsSection.vue is unused/dead code, superseded by this inline UI.)
  • Reference-data API service: src/services/itemDatabaseService.ts (getReferenceData, getSuggestedItem, getMagicSuggestions)
  • Backend item request: app/Http/Requests/BackOffice/Item/StoreItemRequest.php
  • Backend model: app/RawModels/Item.php (getAllergens, getDietaryPreferences, getDietarySupplements, getTags)
  • Reference Constants: app/Constants.php ($ALLERGENS_LIST_OPTIONS, $DIETARY_PREFERENCES_OPTIONS, $DIETARY_SUPPLEMENTS_OPTIONS)
  • Reference endpoints controller: app/Http/Controllers/Api/ConstantController.php

Reference Lists

The lists below are the backend Constants used by the /allergens-options, /dietary-preferences-options, /dietary-supplements-options, and /tags-options endpoints. The item editor in the current back office sources its options from the Item Database reference dataset instead, so labels and translations shown there may differ. The Constants list is the canonical source of the allergen icon/color metadata.

Allergen Options

There are 29 allergen options in Constants::$ALLERGENS_LIST_OPTIONS. Each has a label, an icon, and a fill (hex color). Values are stored exactly as defined in code, including the spelling shown here.

Allergen (label)IconFill
Tree nutstree-nuts#C4A66A
Almondstree-nuts#C4A66A
Brazil nutstree-nuts#C4A66A
Cashewstree-nuts#C4A66A
Hazelnutstree-nuts#C4A66A
Macademiatree-nuts#C4A66A
Pecanstree-nuts#C4A66A
Pistachiostree-nuts#C4A66A
Walnutstree-nuts#C4A66A
Queensland nutstree-nuts#C4A66A
Peanutspeanuts#C69746
Milkmilk#90B2C4
Eggseggs#EFCC60
Fishfish#92C2E0
Crustaceanscrustaceans#E57676
Molluscsmulluscs#E89A77
Glutengluten#DBB467
Wheatgluten#DBB467
Barleygluten#DBB467
Ryegluten#DBB467
Oatsgluten#DBB467
Speltgluten#DBB467
Kamutgluten#DBB467
Soysoy#94D38D
Celerycelery#86E279
Mustardmustard#E0B53B
Sesamesesame#BFA97C
Lupinlupin#E0B365
Sulphitessulphites#8AA0AA

Note: The label Macademia is the actual stored value in code (it is a misspelling of "Macadamia"). The icon name for Molluscs is mulluscs in code (also a misspelling). Both are reproduced here exactly as stored.

Dietary Preference Options

There are 26 options in Constants::$DIETARY_PREFERENCES_OPTIONS (plain strings, no icons):

  • Alcohol-free
  • Dairy-free
  • Decaffeinated
  • Gluten-free
  • Halal
  • High protein
  • Keto
  • Kosher
  • Lactose-free
  • Low fat
  • Low sodium
  • No added MSG
  • No artificial colors
  • No artificial flavors
  • No artificial sweeteners
  • No preservatives
  • Non-GMO
  • Nut-free
  • Organic
  • Paleo
  • Single origin
  • Soy-free
  • Sugar-free
  • Vegan
  • Vegetarian
  • Wholegrain

Dietary Supplement Options

There are 9 options in Constants::$DIETARY_SUPPLEMENTS_OPTIONS (plain strings):

  • Aloe vera
  • Caffeine
  • Calcium
  • Electrolytes
  • Fiber
  • Iron
  • Magnesium
  • Probiotics
  • Protein

Tags Endpoint

The /tags-options endpoint returns the dietary-preference list and the dietary-supplement list concatenated into a single flat array. This is a convenience endpoint only; there is no stored tags field on items.


Fields

Allergens

PropertyValue
Field IDallergens
LabelAllergens
TypeMulti-select (array of strings / reference IDs)
RequiredNo

Description: Allergens present in the item. Validated as nullable|array, elements required|string.


Dietary Preferences

PropertyValue
Field IDdietary_preferences
LabelDietary preferences
TypeMulti-select (array of strings / reference IDs)
RequiredNo

Description: Dietary compatibility labels. Validated as nullable|array, elements required|string.


Dietary Supplements

PropertyValue
Field IDdietary_supplements
LabelDietary Supplements
TypeMulti-select (array of strings / reference IDs)
RequiredNo

Description: Nutritional additives. Validated as nullable|array, elements required|string. Stored separately from dietary preferences.


Ingredients

PropertyValue
Field IDingredients
LabelIngredients
TypeMulti-select (array of strings / reference IDs)
RequiredNo

Description: The item's ingredients. Validated as nullable|array, elements required|string. Options come from the Item Database reference data, and the field participates in the same accept/dismiss suggestion flow as allergens, preferences and supplements. Unlike the other three arrays, ingredients is returned only by the back-office item resource — it is not part of the kiosk or online-ordering item payloads.


Alcohol & Minimum Age

Allergens are separate from alcohol handling, but items also carry contains_alcohol, alcohol_type, and minimum_age fields. contains_alcohol is validated as required|boolean on the item request. The minimum-age behavior tied to alcohol is documented under Menu Items, not here.


Customer Impact

Customer-facing channels (kiosk and online ordering item resources) receive the allergens, dietary_preferences, and dietary_supplements arrays as plain strings. How these are rendered to customers on the storefront, kiosk, or receipts is handled in the respective storefront/kiosk apps and is not verified here.


Relations

Depends On

  • Menu Items: Allergen and dietary arrays are stored per item.
  • Item Database (reference data): Source of the option lists shown in the editor.

Affects

  • Online Ordering: Receives the allergen/dietary arrays for each item.
  • Kiosk: Receives the allergen/dietary arrays for each item.

Examples

The examples below use human-readable allergen labels for clarity. In practice the stored arrays contain the reference-data option IDs that the editor sends.

Item with Allergens

json
{
  "item": {
    "name": "Margherita Pizza",
    "allergens": ["Gluten", "Milk"],
    "dietary_preferences": ["Vegetarian"],
    "dietary_supplements": [],
    "ingredients": []
  }
}

Vegan Item

json
{
  "item": {
    "name": "Garden Salad",
    "allergens": [],
    "dietary_preferences": ["Vegan", "Gluten-free", "Dairy-free"],
    "dietary_supplements": [],
    "ingredients": []
  }
}

Item with No Allergen Data

json
{
  "item": {
    "name": "Still Water",
    "allergens": [],
    "dietary_preferences": [],
    "dietary_supplements": [],
    "ingredients": []
  }
}

FAQs

  • "Can I add custom allergens?" The item editor's options come from a shared reference dataset, so you pick from that list rather than typing free text. The backend itself does not restrict allergen values to a fixed enum, but the editor constrains the choices.
  • "What is the difference between dietary preferences and dietary supplements?" Dietary preferences describe dietary compatibility (e.g., Vegan, Kosher); dietary supplements describe nutritional additives (e.g., Protein, Caffeine). They are stored in separate arrays.
  • "Are allergens required when creating an item?" No. All four arrays (allergens, dietary preferences, dietary supplements, ingredients) are optional (nullable) and can be empty.
  • "Where do the suggestions come from?" From the global Item Database. When you enter an item name, the editor fetches a matching reference item (/suggestions) and offers its specifications, which you accept or dismiss individually.
  • "Is there a tags field on items?" No. A getTags() helper merges dietary preferences and supplements internally, but no item API returns a tags field and none is stored.

Troubleshooting

  • Allergen/dietary options not loading in the editor → The editor sources options from the Item Database reference data (reference-data/all). If options are empty, the reference data may not have loaded.
  • Suggestions not appearing → The Item Database may not have a matching entry for the item name. Try a more common name.
  • Allergens not displaying on a channel → Confirm the item has values assigned in Product Specifications and that the device/channel menu has been reloaded. Channel rendering itself is handled by the storefront/kiosk apps and is not verified here.