Derived Allergens
Understand how allergens automatically propagate through ingredients, combos, and variants.
What Are Derived Allergens?
Derived allergens are automatically calculated from relationships:
- From ingredients - Item contains milk because it contains cheese
- From combo components - Combo contains wheat because the burger does
- From variant options - Pizza contains all allergens from all size options
This automation:
- Reduces manual data entry
- Ensures consistency
- Catches allergens you might miss
Ingredient-Based Derivation
When you add ingredients to an item, allergens are suggested:
How It Works
- You add “parmesan cheese” to an item
- System recognizes cheese as a dairy product
- Suggests: This item Contains Milk
- You confirm or override the suggestion
Common Ingredient Mappings
| Ingredient | Derived Allergen |
|---|---|
| Cheese, butter, cream | Milk |
| Bread, flour, pasta | Wheat |
| Soy sauce, tofu | Soy |
| Peanut butter | Peanuts |
| Tahini, sesame oil | Sesame |
| Mayonnaise | Eggs |
| Fish sauce | Fish |
Confirming Suggestions
Suggestions appear in the allergen section:
- Open the item
- Go to Allergens tab
- See suggestions with “Suggested” label
- Click to confirm (Contains) or dismiss (Safe)
Overriding Suggestions
If a suggestion is wrong:
- Click the suggested allergen
- Select the correct status
- Add a note explaining why (optional)
- Save the item
Example: “Contains soy sauce” but you use a wheat-free version → Mark Wheat as Safe.
Combo Derivation
Combo allergens derive from all components and choices.
Fixed Components
If a fixed component contains an allergen, the combo contains it:
Burger Combo:
├── Burger (Contains: Wheat, Milk)
├── Fries (Safe for all)
└── Soda (Safe for all)
Derived: Burger Combo Contains: Wheat, MilkChoice Groups
Combos show allergens from ALL possible choices:
Pasta Bowl:
├── Pasta (Contains: Wheat)
└── Choose Your Sauce:
├── Marinara (Safe)
├── Alfredo (Contains: Milk)
└── Pesto (Contains: Nuts)
Derived: Pasta Bowl Contains: Wheat, Milk, NutsWhy All Choices?
When diners filter by allergen, they need to know if the combo MIGHT contain it. The parent shows all possibilities so diners investigate further before ordering.
Variant Derivation
Variant parents derive allergens from all options.
How It Works
Salad (Variant Parent):
├── With Chicken (Safe for most)
├── With Shrimp (Contains: Shellfish)
└── With Tofu (Contains: Soy)
Derived: Salad Contains: Shellfish, SoyOption Changes Propagate
When you update an option’s allergens:
- Change is saved to the option item
- Parent’s derived allergens update automatically
- Any combo using the parent also updates
Update Propagation
Changes ripple through the system:
Ingredient Updated
↓
Items Using Ingredient Updated
↓
Combos Using Those Items Updated
↓
Public Menu Reflects ChangesTiming
- Changes propagate within seconds
- Cached values refresh automatically
- Force refresh by editing and saving
Cache Management
For performance, allergen derivations are cached:
- Cache duration: ~1 minute
- Invalidated on component changes
- Manually refresh by editing the item
Viewing Derived Allergens
On Items
Open an item to see:
- Direct allergens - Set on this item
- Derived allergens - From ingredients/components
- Source - Where each allergen comes from
On Combos
Combo view shows:
- Component breakdown
- Per-component allergens
- Combined result
In Table View
The items table shows:
- Allergen badge count
- Derived indicator (if applicable)
- Click for full breakdown
Managing Derivations
Overriding Derived Allergens
If derivation is wrong, override at the item level:
- Open the combo or variant parent
- Go to Allergens
- Find the derived allergen
- Click to override
- Select the correct status
Overrides are stored separately and won’t be changed by automatic derivation.
Resetting to Derived
To remove an override and use derived values:
- Open the item
- Find the overridden allergen
- Click Reset to derived
- Allergen returns to automatic calculation
Troubleshooting
”Allergen not deriving correctly”
Check:
- Source item has the allergen marked
- Component/option is properly linked
- Wait a minute for cache refresh
- Edit and save to force update
”Derived allergen is wrong”
Common causes:
- Source ingredient changed
- Component was updated
- Override exists on the item
Fix: Review source items or set an override.
”Changes not propagating”
- Wait 1-2 minutes for cache
- Hard refresh the page
- Edit and save the parent item
- Check that source items are saved
Best Practices
- Start with ingredients - Add complete ingredient lists
- Review derivations - Don’t blindly trust automation
- Document overrides - Note why you overrode
- Check after changes - Verify propagation worked
- Audit periodically - Review derived allergens quarterly
Technical Details
Derivation Rules
- Contains propagates - If any source Contains, parent Contains
- Safe requires all Safe - Parent is Safe only if ALL sources are Safe
- Unconfirmed is neutral - Doesn’t affect derivation
- Overrides take precedence - Manual settings override derived
Performance
- Derivation happens at save time
- Results are cached for performance
- Complex menus may have brief delays
- Background jobs handle large updates