Appearance
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 optionidvalues. - 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, andingredientsarrays. - Backend validation treats each entry as
nullable|arraywith*elementsrequired|string(inStoreItemRequest);ingredientsis 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-optionsendpoint 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, anddietary_supplementsas plain string arrays — they do not embed per-item icon/color metadata. - A
getTags()helper on the Item model mergesdietary_preferencesanddietary_supplements, but it is not exposed by any HTTP resource. There is no storedtagsfield on items.
Location
- Back office route:
/menus/itemsand/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.vuevia thesrc/composables/useItemSuggestions.tscomposable and thesrc/components/InlineSuggestionChip.vue/InlineSuggestionValue.vuecomponents. (The oldersrc/components/SuggestedProductSpecsSection.vueis 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) | Icon | Fill |
|---|---|---|
| Tree nuts | tree-nuts | #C4A66A |
| Almonds | tree-nuts | #C4A66A |
| Brazil nuts | tree-nuts | #C4A66A |
| Cashews | tree-nuts | #C4A66A |
| Hazelnuts | tree-nuts | #C4A66A |
| Macademia | tree-nuts | #C4A66A |
| Pecans | tree-nuts | #C4A66A |
| Pistachios | tree-nuts | #C4A66A |
| Walnuts | tree-nuts | #C4A66A |
| Queensland nuts | tree-nuts | #C4A66A |
| Peanuts | peanuts | #C69746 |
| Milk | milk | #90B2C4 |
| Eggs | eggs | #EFCC60 |
| Fish | fish | #92C2E0 |
| Crustaceans | crustaceans | #E57676 |
| Molluscs | mulluscs | #E89A77 |
| Gluten | gluten | #DBB467 |
| Wheat | gluten | #DBB467 |
| Barley | gluten | #DBB467 |
| Rye | gluten | #DBB467 |
| Oats | gluten | #DBB467 |
| Spelt | gluten | #DBB467 |
| Kamut | gluten | #DBB467 |
| Soy | soy | #94D38D |
| Celery | celery | #86E279 |
| Mustard | mustard | #E0B53B |
| Sesame | sesame | #BFA97C |
| Lupin | lupin | #E0B365 |
| Sulphites | sulphites | #8AA0AA |
Note: The label
Macademiais the actual stored value in code (it is a misspelling of "Macadamia"). The icon name for Molluscs ismulluscsin 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
| Property | Value |
|---|---|
| Field ID | allergens |
| Label | Allergens |
| Type | Multi-select (array of strings / reference IDs) |
| Required | No |
Description: Allergens present in the item. Validated as nullable|array, elements required|string.
Dietary Preferences
| Property | Value |
|---|---|
| Field ID | dietary_preferences |
| Label | Dietary preferences |
| Type | Multi-select (array of strings / reference IDs) |
| Required | No |
Description: Dietary compatibility labels. Validated as nullable|array, elements required|string.
Dietary Supplements
| Property | Value |
|---|---|
| Field ID | dietary_supplements |
| Label | Dietary Supplements |
| Type | Multi-select (array of strings / reference IDs) |
| Required | No |
Description: Nutritional additives. Validated as nullable|array, elements required|string. Stored separately from dietary preferences.
Ingredients
| Property | Value |
|---|---|
| Field ID | ingredients |
| Label | Ingredients |
| Type | Multi-select (array of strings / reference IDs) |
| Required | No |
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.
Related Features
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
tagsfield on items?" No. AgetTags()helper merges dietary preferences and supplements internally, but no item API returns atagsfield 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.