Pricing Margin Alerts
When an ingredient cost change pushes any product below your target margin, BakeOnyx alerts you on the dashboard and via email — Growth+ only.
What It Does
Bakers miss margin erosion because costs creep up one ingredient at a time. This feature catches the exact moment an ingredient cost change bumps a product below your target margin — before you've baked dozens of that product at a loss.
How Margin Is Calculated
For every active product with a positive price and positive cost:
margin % = (basePrice − cost) / basePrice × 100
Products where basePrice = 0 or cost = 0 are skipped — we can't fairly judge them.
Setting Your Target
Default target is 60%. Adjust at Settings → Post-Order Growth Emails in the "Pricing margin alerts" card. Valid range: 0–100.
- Industry norm for bakeries: 60–70% gross margin
- Premium / custom work: 70–80%+ is typical
- Wholesale / commodity: 40–50% is more common
What Triggers a Check
Editing any ingredient's cost per unit via the Ingredients page fires a cascade:
- The ingredient's new cost propagates to all recipes that use it (
Recipe.costrecomputes) - Product costs that depend on those recipes recompute (
Product.cost) - A margin check runs — if any active product is now below your target, a job is enqueued
- At most one alert email per day per bakery is sent (dedup), regardless of how many ingredients you edited
Three Surfaces
1. Dashboard Banner
An amber banner at the top of your dashboard shows the count: "X products below your Y% margin target". Click through to your products page. Dismiss the banner for the current session; it reappears if the count changes.
2. Weekly Digest Section
The Monday digest includes your top 3 below-margin products with current margin percentage. Only appears if any are below target.
3. Email to You
Sent after ingredient cost changes that pushed products below target. Lists the top 10 offenders with price and margin. Includes a "Review products" CTA to the dashboard.
Turn Off the Email, Keep the Banner
The email toggle is independent from the surface visibility. Turn "Email me when products drop below target" off and you'll still see the dashboard banner and digest section — just without the extra email.
Preview Before Going Live
Click the Preview button in settings to email yourself a rendered sample of the alert. Uses real below-target products when any exist, or 3 synthetic samples otherwise. Subject is prefixed [Preview].
What's Not a Trigger
Purchase order receiving does not currently update Ingredient.costPerUnit. If you receive an ingredient at a different price than your last-set cost, you'll need to update the ingredient manually for the margin alert to fire. This is intentional — auto-updating costs from PO receiving is a bigger project (the received price might be a one-off promo, not your new steady-state cost).
Debugging Why an Alert Didn't Fire
Ask yourself in order:
- Is your bakery on Growth tier or higher?
- Did you save the ingredient cost change successfully?
- Is the affected product active (
isActive = true)? - Do the product and recipe have a non-zero cost? (Costs of 0 are excluded.)
- Was the actual margin below your target? (If target is 60% and the new margin is 61%, no alert.)
- Have you already received an alert today? (Dedup is per UTC day.)
Related Articles
The summary, FAQ, and statistics in this section were compiled from public sources and reviewed by the BakeOnyx editorial team. AI-assisted research.
Frequently Asked Questions
How does BakeOnyx calculate product margins?▾
BakeOnyx calculates margin percentage using the formula: `(basePrice - cost) / basePrice * 100`. This calculation is performed for every active product that has both a positive selling price and a positive cost. Products with a base price or cost of zero are excluded from this margin calculation to ensure accuracy and fairness.
What is the default target margin in BakeOnyx, and how can I change it?▾
The default target margin in BakeOnyx is set at 60%. You can adjust this target within the platform's settings. Navigate to Settings → Post-Order Growth Emails and locate the 'Pricing margin alerts' card to set your desired margin percentage, which can range from 0% to 100%.
What actions trigger a margin check in BakeOnyx?▾
A margin check is triggered in BakeOnyx whenever you edit the cost per unit of any ingredient. This change then cascades through your recipes, recalculating their costs, and subsequently recomputing the costs of all products that use those recipes. If any product's margin then falls below your target, an alert is generated.
How are margin alerts communicated to users?▾
BakeOnyx provides margin alerts through three main channels: an immediate banner on the dashboard highlighting the number of affected products, a section in the weekly digest detailing the top offenders, and an optional email notification sent daily. Users can customize which of these surfaces they wish to receive alerts from.
Can I disable the email alerts but still see dashboard notifications?▾
Yes, you can independently control the email notifications. Even if you turn off the 'Email me when products drop below target' setting, you will still see the margin alerts on your dashboard banner and in the weekly digest. This allows you to stay informed without receiving direct emails.
Why might a margin alert not fire after an ingredient cost change?▾
Several factors could prevent an alert. First, ensure your bakery is on the Growth+ tier or higher, as this feature is exclusive to that plan. Second, verify that you have saved the ingredient cost change. Lastly, remember that receiving inventory at a different price than the set cost does not automatically update the ingredient cost for alerts.