Skip to main content

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 free-from / contains banner

At the top of the tab, a single banner summarises the recipe:

  • Free from all 14 UK-regulated allergens (green) - none of the recipe's declared ingredients contain any of the 14 allergens.
  • Contains N allergens (amber) - the recipe contains one or more allergens, listed as chips beneath the banner.

If any ingredient in the recipe has not yet been declared, an additional warning appears:

Some ingredients have not been reviewed for allergens yet - the free-from claim is not yet verified. Review ingredients below.

This is the key safety behaviour: a recipe with undeclared ingredients can never be claimed as free-from until every supplier has an explicit declaration.

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:

  • Allergen chips are clickable - they jump to the ingredient's detail page 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 declared)" tag.
info

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:

  1. Looks up the preferred supplier for each ingredient.
  2. Reads that supplier's allergen declaration.
  3. Recursively rolls up any sub-recipe ingredients the same way.
  4. Combines everything into a single deduplicated list of allergens for the recipe.

The roll-up runs in the background whenever an ingredient's preferred supplier changes, when a supplier's allergen declaration is updated, or when the recipe itself is edited. The tab will show a "Recomputing..." note while this is in progress.

Verifying a free-from claim

Use the breakdown table as your audit trail:

  1. Confirm the green "Free from all 14" banner is showing.
  2. Confirm there is no "Some ingredients have not been reviewed" warning - if there is, the claim is not yet verified.
  3. Scan the breakdown for any "(not declared)" tags and resolve them by declaring those ingredients' suppliers.

Once every source has a declaration and the banner is green, 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. When SafetyBrik flags a recipe as needing review, the Edit in CostingBrik action 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.