What you need
Data sources
- ERP system — Bills of materials (BOMs) with standard quantities, material issue transactions, and standard cost records
- Inventory management system — Current stock levels, material receipts with actual unit prices, and lot tracking data
Knowledge spaces
- BOM standards documentation — Upload your standard BOM definitions and approved material substitution lists
- Procurement policies — Price variance thresholds and approved vendor lists for reference
| Component | Name | Definition |
|---|---|---|
| Object | Material Issue | Maps to ERP material issue transactions. Represents a single material withdrawal against a work order |
| Object | BOM Line | Maps to the bill of materials detail table. Represents the planned quantity of a material for one unit of finished good |
| Metric | Quantity Variance | Actual quantity consumed minus standard quantity (from BOM), per work order or batch |
| Metric | Price Variance | (Actual unit price minus standard unit price) multiplied by actual quantity consumed |
| Dimension | Material Type | Groups materials by category: raw materials, packaging, consumables, components |
| Dimension | Supplier | Groups material issues by the vendor who supplied the material lot |
Agent setup
Create the agent
Go to Agent Space > New agent.
| Field | Value |
|---|---|
| Name | Material Variance Analyst |
| Role | Material cost and usage analyst |
| Goal | Identify material consumption variances and pricing discrepancies |
Set the description
You are a material cost analyst. When analyzing material usage, always separate quantity variance from price variance — they have different root causes and different owners. Present the largest dollar-impact variances first. For quantity variances, check whether a material substitution was made. For price variances, compare against the approved vendor price list. Use specific numbers: show the standard quantity, actual quantity, and difference. When variance exceeds 5% of standard cost, recommend an investigation and specify whether it is a production issue (quantity) or procurement issue (price).
Scope data access
Grant access to:
- ERP system data source (BOMs, material issue transactions, standard costs)
- Inventory management system data source (receipts and pricing)
- BOM standards documentation knowledge space
- Procurement policies knowledge space
- Material Issue and BOM Line objects in the semantic layer
Add skills
Calculate material usage variance
Calculate material usage variance
Trigger: User asks about material variance, waste, or BOM compliance
- Identify the work order, product, or material from the user’s request.
- Pull the BOM standard quantities for the finished good.
- Pull the actual material issue transactions for the specified work orders.
- Calculate quantity variance for each material line: actual quantity minus standard quantity.
- Calculate price variance for each material: (actual price minus standard price) multiplied by actual quantity.
- Sort by total dollar impact, largest first.
- Present a table with material name, standard quantity, actual quantity, quantity variance, standard price, actual price, and price variance.
Detect material substitutions
Detect material substitutions
Trigger: User asks about substitutions or unexpected materials
- Pull all material issue transactions for the specified work orders.
- Compare issued material item numbers against the BOM’s specified item numbers.
- Identify any material issued that does not appear on the BOM (potential substitution).
- Check the substitution against the approved substitution list in the knowledge space.
- Flag unapproved substitutions and include the cost difference versus the standard material.
Automation
Playbook: Weekly material variance report
Build the workflow
The playbook compiles the previous week’s material consumption against BOM standards and highlights the largest variances.
- Query step — Pull all material issue transactions for work orders completed in the previous 7 days, along with corresponding BOM lines.
- Python code step — Calculate quantity variance and price variance for every material-work order combination. Aggregate to material level and rank by total dollar impact.
- Condition step — Filter to materials where total variance exceeds 5% of standard cost or $500 in absolute terms.
- Format step — Build a report with two sections: top quantity variances (for production review) and top price variances (for procurement review).
The Python code step uses a Python code block to compute both quantity and price variances, aggregate them by material, and rank by dollar impact. You can customize the variance thresholds and add trend calculations comparing to the previous week.
Configure delivery
Send the full report via email to the production manager and procurement lead. Include the total variance dollar amount in the subject line.
What’s next
Work order cost tracking
Monitor overall production order costs and catch overruns before they escalate.
All manufacturing use cases
See the full list.

