Recipe allergen roll-up
Every recipe in CostingBrik has an Allergens tab alongside Recipe details and Version history. It shows the consolidated allergen profile for the recipe, built automatically from the ingredients (and any sub-recipes) it uses.
Opening the Allergens tab
From any recipe detail page, click the Allergens tab. You can also deep-link straight to it - useful from SafetyBrik when reviewing an allergen matrix:
/costing/recipes/{recipe-id}?tab=allergens
The summary banner
At the top of the tab, a single banner summarises the recipe. It is in one of four states:
- No ingredients contain any of the 14 UK-regulated allergens (green) - every ingredient, sub-recipes included, has been reviewed and none of them contains a regulated allergen. Underneath it says "Based on the allergens declared for its ingredients. Cross-contact in the kitchen is not covered."
- Contains N allergens (amber) - the recipe contains one or more allergens, listed as chips beneath the banner.
- Allergens not fully known (amber) - something in the recipe has not been reviewed yet. Any allergens that are known are still shown as chips, with the warning: "Some ingredients have not been reviewed for allergens yet, so this recipe may contain allergens not shown here. Review the ingredients marked below."
- Recomputing allergens - the recipe's allergens are being worked out again after a recent change: "Recomputing after a recent change. Check again shortly." This normally takes a few seconds.
A recipe's allergens are not fully known when:
- any ingredient anywhere in the recipe, sub-recipes included, has not been declared - on every supplier SKU you buy it under or, when it has no supplier, on the ingredient itself;
- an ingredient's allergen record has not yet caught up with what its SKUs declare; or
- the recipe has no ingredients yet.
This is the key safety behaviour: a recipe is never shown as having no allergens until every ingredient, through every sub-recipe, is declared on every SKU you buy or, when it has none, on the ingredient.
Source breakdown
Below the banner, the Source breakdown table lists every ingredient (and sub-recipe) the recipe uses, alongside the allergens contributed by each source. This is how you trace exactly which ingredient is responsible for an allergen showing up on a recipe.
For each row:
- On an ingredient row, the allergen chips are clickable - they open the ingredient's Allergens tab so you can review or update the declaration.
- Sub-recipe rows are marked with a "(sub-recipe)" tag and have a chevron you can expand to see the ingredients inside. Use Expand all to expand every sub-recipe at once.
- Undeclared ingredients are flagged with an amber "(not yet reviewed)" tag and a Declare allergens link that opens the ingredient at its allergen step.
- Sub-recipes with something unreviewed inside are flagged "(some ingredients not yet reviewed)", with a line naming what needs review, for example "Not yet reviewed: Eggs, Pine nuts".
- When nothing is known yet about an unreviewed row's allergens, its allergens column shows
?rather than looking empty.
Sub-recipe rows expand one level at a time to keep the view predictable. To drill deeper into a nested sub-recipe, use the View recipe link to open it directly - it has its own Allergens tab with the same breakdown.
How the roll-up is calculated
Brikly walks the recipe's ingredients and:
- Takes the allergens of every SKU you buy for each ingredient, at every site, so an allergen any of them contains is listed. Archived SKUs don't count. An ingredient with no supplier uses its own declaration.
- Recursively rolls up any sub-recipe ingredients the same way.
- Combines everything into a single deduplicated list of allergens for the recipe.
Which SKU is preferred makes no difference: it sets the cost, not the allergens. The roll-up runs in the background whenever an ingredient gains a SKU, or one is archived or brought back, when an allergen declaration is updated, or when you change which ingredients or sub-recipes the recipe uses. Changing only quantities, the yield, labour or packaging cannot change a recipe's allergens, so saving it does not mark the recipe as recomputing. Brikly still rechecks the recipe and the recipes built on it in the background afterwards. While a recompute runs, the recipe, and every recipe built on it, shows Recomputing allergens.
A few other actions recompute allergens too:
- Duplicating a recipe. The copy keeps the original's recipe type and sites (all sites, or the same chosen sites), and its allergens are worked out for it straight away.
- Restoring an archived recipe. It shows as recomputing for a moment before its allergens appear.
- Merging ingredients, or relinking recipe lines whose ingredient was removed. The recipes affected, and the recipes built on them, recompute.
An hourly background check also picks up any recipe whose allergens were left recomputing or have drifted from their ingredients, and puts it right.
Verifying a recipe's allergens
Use the breakdown table as your audit trail:
- Confirm the banner is green, or shows "Contains N allergens" with the allergens you expect.
- Confirm it does not say Allergens not fully known - if it does, some ingredients still need review.
- Scan the breakdown for any "(not yet reviewed)" or "(some ingredients not yet reviewed)" tags and resolve them with Declare allergens.
Once every source has a declaration and the banner no longer says "not fully known", the recipe's allergen profile is verified end-to-end.
How this feeds into SafetyBrik
The recipe-level allergen roll-up is the same data SafetyBrik uses to build allergen matrices and customer-facing allergen statements. On the SafetyBrik allergen matrix, each recipe's Edit in CostingBrik button (the pencil) deep-links straight into this tab so you can see the breakdown and fix declarations at source. Save in CostingBrik, and SafetyBrik picks up the change automatically.