Estimator Engine — Service Pricing Calculator skill
Use when calculating service estimates for jobs.
by hewi333·MIT license·★ 122 Stars on the repo·GitHub ↗
npx degit hewi333/Mom-n-Pop-Skills/skills/estimator-engine#main ~/.claude/skills/estimator-engineChecked ·commit main
Inside this skill
SKILL.md · the author's own words# Estimator Engine — Service Pricing Calculator ## Overview A deterministic pricing engine for a service business. Takes property/job details and returns a structured estimate with line items, ranges… ## When to Use - **Website estimator form** — visitor enters sqft, gets instant price range - **Referral qualification** — quick ballpark before site visit - **Agent creates formal estimate** — detailed line items for QuickBooks - **Insurance claim scoping** — severity tier mapping to pricing multipliers ## Don't Use For - Dynamic pricing / demand-based surges - Multi-trade construction estimates - Recurring subscription pricing
Word-for-word excerpt, not a result. Read the full SKILL.md ↓
Files of Estimator Engine — Service Pricing Calculator
Show the full text331 lines
Estimator Engine — Service Pricing Calculator
Overview
A deterministic pricing engine for a service business. Takes property/job details and returns a structured estimate with line items, ranges, and confidence levels. Designed for agent-mediated use: owners text property details, agent returns instant estimate.
When to Use
- Website estimator form — visitor enters sqft, gets instant price range
- Referral qualification — quick ballpark before site visit
- Agent creates formal estimate — detailed line items for QuickBooks
- Insurance claim scoping — severity tier mapping to pricing multipliers
Don't Use For
- Dynamic pricing / demand-based surges
- Multi-trade construction estimates
- Recurring subscription pricing
Configuration
All pricing is config-driven. Copy the config block below into a pricing_config.json
file or environment variables, then plug in your own rates. The numbers shown are
EXAMPLES — replace them with your real rate card.
# Example configuration — REPLACE ALL VALUES with your own rates
PRICING_CONFIG = {
"regions": {
"standard": {
"label": "Standard Region",
"counties": ["[REGION_1]", "[REGION_2]"] # list your service areas here
},
"premium": {
"label": "Premium Region",
"counties": ["[PREMIUM_REGION_1]"] # e.g., further travel, higher costs
}
},
"residential_commercial": {
"standard": {
"tiers": [
{"max_sqft": 1000, "rate_per_sqft": 1.55, "minimum": 1200, "cigarette_ext_addon": 350},
{"max_sqft": 1500, "rate_per_sqft": 1.30, "minimum": 0, "cigarette_ext_addon": 450},
{"max_sqft": 2500, "rate_per_sqft": 1.25, "minimum": 0, "cigarette_ext_addon": 550},
{"max_sqft": 5000, "rate_per_sqft": 1.20, "minimum": 0, "cigarette_ext_addon": 650},
{"max_sqft": 10000, "rate_per_sqft": 1.15, "minimum": 0, "cigarette_ext_addon": 750},
{"max_sqft": 999999, "rate_per_sqft": 1.10, "minimum": 0, "cigarette_ext_addon": 850}
],
"addons": {
"pet_trauma_per_sqft": 0.35,
"surface_defense_per_sqft": 0.35,
"high_rise_flat": 350
}
},
"premium": {
"tiers": [
{"max_sqft": 1500, "rate_per_sqft": 1.70, "minimum": 1500, "cigarette_ext_addon": 450},
{"max_sqft": 2500, "rate_per_sqft": 1.55, "minimum": 0, "cigarette_ext_addon": 550},
{"max_sqft": 5000, "rate_per_sqft": 1.50, "minimum": 0, "cigarette_ext_addon": 650},
{"max_sqft": 10000, "rate_per_sqft": 1.45, "minimum": 0, "cigarette_ext_addon": 750},
{"max_sqft": 999999, "rate_per_sqft": 1.40, "minimum": 0, "cigarette_ext_addon": 850}
],
"addons": {
"pet_trauma_per_sqft": 0.35,
"surface_defense_per_sqft": 0.35,
"high_rise_flat": 350
}
}
},
"apartments": {
"standard": {
"rates": {"1_bed": 900, "2_bed": 1000, "3_bed": 1100},
"addons": {"pet_trauma_flat": 150, "surface_defense_flat": 100}
},
"premium": {
"rates": {"1_bed": 900, "2_bed": 1000, "3_bed": 1100},
"premium_surcharge_flat": 500,
"addons": {"pet_trauma_flat": 150, "surface_defense_flat": 100}
}
},
"estimate_number_prefix": "EST",
"estimate_valid_days": 30,
"range_uncertainty_pct": 0.15 # ±15% around calculated total
}
⚠️ The numbers above are EXAMPLES. They show the structure of a tiered pricing model (per-sqft rates, minimums, add-on surcharges, region differentials). Replace every value with your own business's actual rates.
Pricing Model Structure
Location Tiers
- Standard Region: Your local/primary service area (lower travel cost)
- Premium Region: Further service areas with higher travel cost
Property Types
- Residential / Commercial — priced by square footage tiers
- Apartments — flat rate by bedroom count
EXAMPLE Pricing (Standard Region)
Residential / Commercial — Base Treatment
| Square Footage | Rate (psf) | Ext Add-on (Cigarette >5yrs) |
|---|---|---|
| 1,000 sf or less | $1.55 psf (min $1,200) | +$350 |
| 1,000–1,500 sf | $1.30 psf | +$450 |
| 1,500–2,500 sf | $1.25 psf | +$550 |
| 2,500–5,000 sf | $1.20 psf | +$650 |
| 5,000–10,000 sf | $1.15 psf | +$750 |
| 10,000 sf or more | $1.10 psf | +$850 |
Add-ons (Standard):
- Pet/Trauma: +$0.35 psf
- Surface Defense: +$0.35 psf
- High Rise Condo: +$350 per job
Apartments — Base Treatment
| Unit Size | Base Price |
|---|---|
| 1 Bedroom | $900 |
| 2 Bedroom | $1,000 |
| 3 Bedroom | $1,100 |
Add-ons (Standard Apartments):
- Pet/Trauma: +$150
- Surface Defense: +$100
EXAMPLE Pricing (Premium Region)
Residential / Commercial — Base Treatment
| Square Footage | Rate (psf) | Ext Add-on (Cigarette >5yrs) |
|---|---|---|
| 1,500 sf or less | $1.70 psf (min $1,500) | +$450 |
| 1,500–2,500 sf | $1.55 psf | +$550 |
| 2,500–5,000 sf | $1.50 psf | +$650 |
| 5,000–10,000 sf | $1.45 psf | +$750 |
| 10,000 sf or more | $1.40 psf | +$850 |
Add-ons (Premium):
- Pet/Trauma: +$0.35 psf
- Surface Defense: +$0.35 psf
- High Rise Condo: +$350 per job
Apartments — Base Treatment
Same base rates as Standard, plus a Premium Region surcharge of +$500 to each tier.
Add-ons (Premium Apartments):
- Pet/Trauma: +$150
- Surface Defense: +$100
CALCULATION RULES
- Determine location: Standard or Premium (based on configured region mapping)
- Determine property type: Residential/Commercial or Apartment
- For Res/Comm: find sf tier → multiply rate × square footage (apply minimum if applicable)
- For Apartments: use flat rate by bedroom count
- Add applicable surcharges: Pet/Trauma, Surface Defense, Ext (cigarette >5yrs), High Rise
- Premium apartments: add the configured premium surcharge to the flat rate
Minimums (from pricing tables)
- Standard Res/Comm ≤1,000 sf: $1,200 minimum (example)
- Premium Res/Comm ≤1,500 sf: $1,500 minimum (example)
- Apartments: flat rates already include minimums
API Interface
Input Schema
class EstimateRequest:
property_address: str # Full address (used to determine region/location)
property_type: str # "residential_commercial" or "apartment"
sqft: int = 0 # Required for residential_commercial
bedrooms: int = 0 # Required for apartment (1, 2, or 3)
is_premium_region: bool = False # Auto-determined from region config, but can override
add_ons: List[str] = [] # ["pet_trauma", "surface_defense", "cigarette_ext", "high_rise"]
Output Schema
class EstimateResponse:
estimate_number: str # EST-YYYY-NNNN
line_items: List[LineItem]
subtotal: float
total: float
range_low: float # -15% for uncertainty
range_high: float # +15% for uncertainty
confidence: str # high/medium/low
assumptions: List[str]
valid_days: int = 30
Line Item Structure
class LineItem:
description: str
quantity: float
unit: str # "sf", "each", "job"
unit_price: float
total: float
notes: str
Quick Start
from estimator import estimate_job
# Residential/Commercial example (Standard pricing)
request = {
"property_address": "123 Main St, [CITY], [STATE] [ZIP]", # Standard Region
"property_type": "residential_commercial",
"sqft": 2500,
"add_ons": ["pet_trauma"]
}
result = estimate_job(request)
# Returns structured estimate with line items, ranges, total
# Apartment example (Premium Region)
request = {
"property_address": "456 Ocean Dr, [CITY], [STATE] [ZIP]", # Premium Region
"property_type": "apartment",
"bedrooms": 2,
"add_ons": ["surface_defense"]
}
result = estimate_job(request)
# Returns structured estimate
Agent Integration Patterns
Website Estimator Form → Instant Range
User: "2500 sqft house, [CITY], pet odor, add surface defense"
Agent: Determines Standard Region, Res/Comm tier 1500-2500 = $1.25/sf
Base: 2500 × $1.25 = $3,125
Pet/Trauma: 2500 × $0.35 = $875
Surface Defense: 2500 × $0.35 = $875
Total: $4,875 → Returns "Estimated $4,100–$5,600 (est. $4,875)"
Formal Estimate for QuickBooks
User: "Create estimate for John Smith, 123 Main St [CITY], 2500 sqft house, pet trauma, surface defense"
Agent: Creates estimate record in CRM, generates QuickBooks estimate with line items, emails PDF
Quick Quote
User: "Realtor needs ballpark for 2-bed apartment, cigarette smoke >5yrs"
Agent: Premium Region, Apartment 2-bed = $1,000 + $500 Premium + $150 cigarette
Total: $1,650 → Returns "$1,400–$1,900" + disclaimer
Common Pitfalls
- Region misclassification — Make sure your region mapping is configured correctly and matches across estimator-engine, website, and CRM
- Property type confusion — Apartments use flat bedroom rates, NOT square footage pricing
- Premium apartment surcharge — Must add the configured premium surcharge to the flat rate for Premium Region apartments
- Cigarette >5yrs — Only applies as "Ext Add-on" flat fee per tier (not per sf)
- Minimums — Check configured minimums for small square footage tiers
- High Rise Condo — Flat fee per job (applies to both Standard and Premium)
- Pet/Trauma + Surface Defense — Both are per-sf for Res/Comm, flat fee for Apartments
Verification Checklist
- Region correctly maps to Standard vs Premium (from your config)
- Property type determines pricing method (sf tiers vs bedroom flat rate)
- Square footage tier lookup returns correct rate
- Minimums enforced (from your config)
- Add-ons calculate correctly (per-sf for Res/Comm, flat for Apartments)
- Cigarette >5yrs uses tier-based flat fee (not per-sf)
- Premium apartments add surcharge to flat rate
- High Rise Condo adds configured flat fee
- Range ±15% around calculated total
- Estimate number format: EST-YYYY-NNNN (sequential)
- Output includes assumptions list for transparency
One-Shot Recipes
"Quick ballpark for website (Standard Res/Comm)"
from estimator import quick_quote
quick_quote(property_type="residential_commercial", sqft=2000, is_premium_region=False, add_ons=["pet_trauma"])
# → "Estimated $3,400–$4,600" (2000 × $1.25 = $2,500 + 2000 × $0.35 = $700 + 2000 × $0.35 = $700 = $3,900)
"Full estimate for QuickBooks (Premium Apartment)"
from estimator import formal_estimate
estimate = formal_estimate(
customer_name="Jane Doe",
property_address="456 Ocean Dr, [CITY], [STATE] [ZIP]",
property_type="apartment",
bedrooms=2,
is_premium_region=True,
add_ons=["cigarette_ext", "surface_defense"]
)
# → Creates CRM estimate record, returns QB-ready line items
# Base: $1,000 (2-bed) + $500 (Premium) = $1,500
# Cigarette ext: +$150, Surface Defense: +$100 = $1,750 total
"Batch quote for realtor list"
from estimator import batch_quote
properties = [
{"address": "456 Palm Ave [CITY], [STATE] [ZIP]", "property_type": "residential_commercial", "sqft": 3200, "add_ons": ["cigarette_ext"]}, # Standard Region
{"address": "789 Ocean Dr [CITY], [STATE] [ZIP]", "property_type": "apartment", "bedrooms": 2, "add_ons": ["pet_trauma"]}, # Standard Region
{"address": "1000 Collins Ave [CITY], [STATE] [ZIP]", "property_type": "residential_commercial", "sqft": 2800, "is_premium_region": True, "add_ons": ["high_rise"]}, # Premium Region
]
for prop in properties:
print(batch_quote(prop))
| 1 | |
| 2 | name estimator-engine |
| 3 | description "Use when calculating service estimates for jobs. Computes pricing based on square footage, ceiling height, service type, travel distance, and severity tiers. Config-driven — plug in your own rate card." |
| 4 | version "1.0.0" |
| 5 | author Hermes Agent |
| 6 | license MIT |
| 7 | metadata |
| 8 | hermes |
| 9 | tags [estimator, pricing, small-business, service-quoting] |
| 10 | related_skills [crm-lite, quickbooks-online, stripe-payments] |
| 11 | |
| 12 | |
| 13 | # Estimator Engine — Service Pricing Calculator |
| 14 | |
| 15 | ## Overview |
| 16 | A deterministic pricing engine for a service business. Takes property/job details and returns a structured estimate with line items, ranges, and confidence levels. Designed for agent-mediated use: owners text property details, agent returns instant estimate. |
| 17 | |
| 18 | ## When to Use |
| 19 | **Website estimator form** — visitor enters sqft, gets instant price range |
| 20 | **Referral qualification** — quick ballpark before site visit |
| 21 | **Agent creates formal estimate** — detailed line items for QuickBooks |
| 22 | **Insurance claim scoping** — severity tier mapping to pricing multipliers |
| 23 | |
| 24 | ## Don't Use For |
| 25 | Dynamic pricing / demand-based surges |
| 26 | Multi-trade construction estimates |
| 27 | Recurring subscription pricing |
| 28 | |
| 29 | ## Configuration |
| 30 | |
| 31 | All pricing is **config-driven**. Copy the config block below into a `pricing_config.json` |
| 32 | file or environment variables, then plug in your own rates. The numbers shown are |
| 33 | **EXAMPLES** — replace them with your real rate card. |
| 34 | |
| 35 | |
| 36 | # Example configuration — REPLACE ALL VALUES with your own rates |
| 37 | PRICING_CONFIG = { |
| 38 | "regions": { |
| 39 | "standard": { |
| 40 | "label": "Standard Region", |
| 41 | "counties": ["[REGION_1]", "[REGION_2]"] # list your service areas here |
| 42 | }, |
| 43 | "premium": { |
| 44 | "label": "Premium Region", |
| 45 | "counties": ["[PREMIUM_REGION_1]"] # e.g., further travel, higher costs |
| 46 | } |
| 47 | }, |
| 48 | "residential_commercial": { |
| 49 | "standard": { |
| 50 | "tiers": [ |
| 51 | {"max_sqft": 1000, "rate_per_sqft": 1.55, "minimum": 1200, "cigarette_ext_addon": 350}, |
| 52 | {"max_sqft": 1500, "rate_per_sqft": 1.30, "minimum": 0, "cigarette_ext_addon": 450}, |
| 53 | {"max_sqft": 2500, "rate_per_sqft": 1.25, "minimum": 0, "cigarette_ext_addon": 550}, |
| 54 | {"max_sqft": 5000, "rate_per_sqft": 1.20, "minimum": 0, "cigarette_ext_addon": 650}, |
| 55 | {"max_sqft": 10000, "rate_per_sqft": 1.15, "minimum": 0, "cigarette_ext_addon": 750}, |
| 56 | {"max_sqft": 999999, "rate_per_sqft": 1.10, "minimum": 0, "cigarette_ext_addon": 850} |
| 57 | ], |
| 58 | "addons": { |
| 59 | "pet_trauma_per_sqft": 0.35, |
| 60 | "surface_defense_per_sqft": 0.35, |
| 61 | "high_rise_flat": 350 |
| 62 | } |
| 63 | }, |
| 64 | "premium": { |
| 65 | "tiers": [ |
| 66 | {"max_sqft": 1500, "rate_per_sqft": 1.70, "minimum": 1500, "cigarette_ext_addon": 450}, |
| 67 | {"max_sqft": 2500, "rate_per_sqft": 1.55, "minimum": 0, "cigarette_ext_addon": 550}, |
| 68 | {"max_sqft": 5000, "rate_per_sqft": 1.50, "minimum": 0, "cigarette_ext_addon": 650}, |
| 69 | {"max_sqft": 10000, "rate_per_sqft": 1.45, "minimum": 0, "cigarette_ext_addon": 750}, |
| 70 | {"max_sqft": 999999, "rate_per_sqft": 1.40, "minimum": 0, "cigarette_ext_addon": 850} |
| 71 | ], |
| 72 | "addons": { |
| 73 | "pet_trauma_per_sqft": 0.35, |
| 74 | "surface_defense_per_sqft": 0.35, |
| 75 | "high_rise_flat": 350 |
| 76 | } |
| 77 | } |
| 78 | }, |
| 79 | "apartments": { |
| 80 | "standard": { |
| 81 | "rates": {"1_bed": 900, "2_bed": 1000, "3_bed": 1100}, |
| 82 | "addons": {"pet_trauma_flat": 150, "surface_defense_flat": 100} |
| 83 | }, |
| 84 | "premium": { |
| 85 | "rates": {"1_bed": 900, "2_bed": 1000, "3_bed": 1100}, |
| 86 | "premium_surcharge_flat": 500, |
| 87 | "addons": {"pet_trauma_flat": 150, "surface_defense_flat": 100} |
| 88 | } |
| 89 | }, |
| 90 | "estimate_number_prefix": "EST", |
| 91 | "estimate_valid_days": 30, |
| 92 | "range_uncertainty_pct": 0.15 # ±15% around calculated total |
| 93 | } |
| 94 | |
| 95 | |
| 96 | > ⚠️ **The numbers above are EXAMPLES.** They show the *structure* of a tiered |
| 97 | > pricing model (per-sqft rates, minimums, add-on surcharges, region differentials). |
| 98 | > Replace every value with your own business's actual rates. |
| 99 | |
| 100 | ## Pricing Model Structure |
| 101 | |
| 102 | ### Location Tiers |
| 103 | **Standard Region:** Your local/primary service area (lower travel cost) |
| 104 | **Premium Region:** Further service areas with higher travel cost |
| 105 | |
| 106 | ### Property Types |
| 107 | **Residential / Commercial** — priced by square footage tiers |
| 108 | **Apartments** — flat rate by bedroom count |
| 109 | |
| 110 | ### EXAMPLE Pricing (Standard Region) |
| 111 | |
| 112 | #### Residential / Commercial — Base Treatment |
| 113 | |
| 114 | | Square Footage | Rate (psf) | Ext Add-on (Cigarette >5yrs) | |
| 115 | |---|---|---| |
| 116 | | 1,000 sf or less | $1.55 psf (min $1,200) | +$350 | |
| 117 | | 1,000–1,500 sf | $1.30 psf | +$450 | |
| 118 | | 1,500–2,500 sf | $1.25 psf | +$550 | |
| 119 | | 2,500–5,000 sf | $1.20 psf | +$650 | |
| 120 | | 5,000–10,000 sf | $1.15 psf | +$750 | |
| 121 | | 10,000 sf or more | $1.10 psf | +$850 | |
| 122 | |
| 123 | **Add-ons (Standard):** |
| 124 | Pet/Trauma: +$0.35 psf |
| 125 | Surface Defense: +$0.35 psf |
| 126 | High Rise Condo: +$350 per job |
| 127 | |
| 128 | #### Apartments — Base Treatment |
| 129 | |
| 130 | | Unit Size | Base Price | |
| 131 | |---|---| |
| 132 | | 1 Bedroom | $900 | |
| 133 | | 2 Bedroom | $1,000 | |
| 134 | | 3 Bedroom | $1,100 | |
| 135 | |
| 136 | **Add-ons (Standard Apartments):** |
| 137 | Pet/Trauma: +$150 |
| 138 | Surface Defense: +$100 |
| 139 | |
| 140 | ### EXAMPLE Pricing (Premium Region) |
| 141 | |
| 142 | #### Residential / Commercial — Base Treatment |
| 143 | |
| 144 | | Square Footage | Rate (psf) | Ext Add-on (Cigarette >5yrs) | |
| 145 | |---|---|---| |
| 146 | | 1,500 sf or less | $1.70 psf (min $1,500) | +$450 | |
| 147 | | 1,500–2,500 sf | $1.55 psf | +$550 | |
| 148 | | 2,500–5,000 sf | $1.50 psf | +$650 | |
| 149 | | 5,000–10,000 sf | $1.45 psf | +$750 | |
| 150 | | 10,000 sf or more | $1.40 psf | +$850 | |
| 151 | |
| 152 | **Add-ons (Premium):** |
| 153 | Pet/Trauma: +$0.35 psf |
| 154 | Surface Defense: +$0.35 psf |
| 155 | High Rise Condo: +$350 per job |
| 156 | |
| 157 | #### Apartments — Base Treatment |
| 158 | |
| 159 | Same base rates as Standard, plus a **Premium Region surcharge** of +$500 to each tier. |
| 160 | |
| 161 | **Add-ons (Premium Apartments):** |
| 162 | Pet/Trauma: +$150 |
| 163 | Surface Defense: +$100 |
| 164 | |
| 165 | |
| 166 | |
| 167 | ### CALCULATION RULES |
| 168 | |
| 169 | **Determine location:** Standard or Premium (based on configured region mapping) |
| 170 | **Determine property type:** Residential/Commercial or Apartment |
| 171 | **For Res/Comm:** find sf tier → multiply rate × square footage (apply minimum if applicable) |
| 172 | **For Apartments:** use flat rate by bedroom count |
| 173 | **Add applicable surcharges:** Pet/Trauma, Surface Defense, Ext (cigarette >5yrs), High Rise |
| 174 | **Premium apartments:** add the configured premium surcharge to the flat rate |
| 175 | |
| 176 | ### Minimums (from pricing tables) |
| 177 | **Standard Res/Comm ≤1,000 sf:** $1,200 minimum (example) |
| 178 | **Premium Res/Comm ≤1,500 sf:** $1,500 minimum (example) |
| 179 | **Apartments:** flat rates already include minimums |
| 180 | |
| 181 | ## API Interface |
| 182 | |
| 183 | ### Input Schema |
| 184 | |
| 185 | class EstimateRequest: |
| 186 | property_address: str # Full address (used to determine region/location) |
| 187 | property_type: str # "residential_commercial" or "apartment" |
| 188 | sqft: int = 0 # Required for residential_commercial |
| 189 | bedrooms: int = 0 # Required for apartment (1, 2, or 3) |
| 190 | is_premium_region: bool = False # Auto-determined from region config, but can override |
| 191 | add_ons: List[str] = [] # ["pet_trauma", "surface_defense", "cigarette_ext", "high_rise"] |
| 192 | |
| 193 | |
| 194 | ### Output Schema |
| 195 | |
| 196 | class EstimateResponse: |
| 197 | estimate_number: str # EST-YYYY-NNNN |
| 198 | line_items: List[LineItem] |
| 199 | subtotal: float |
| 200 | total: float |
| 201 | range_low: float # -15% for uncertainty |
| 202 | range_high: float # +15% for uncertainty |
| 203 | confidence: str # high/medium/low |
| 204 | assumptions: List[str] |
| 205 | valid_days: int = 30 |
| 206 | |
| 207 | |
| 208 | ### Line Item Structure |
| 209 | |
| 210 | class LineItem: |
| 211 | description: str |
| 212 | quantity: float |
| 213 | unit: str # "sf", "each", "job" |
| 214 | unit_price: float |
| 215 | total: float |
| 216 | notes: str |
| 217 | |
| 218 | |
| 219 | ## Quick Start |
| 220 | |
| 221 | |
| 222 | from estimator import estimate_job |
| 223 | |
| 224 | # Residential/Commercial example (Standard pricing) |
| 225 | request = { |
| 226 | "property_address": "123 Main St, [CITY], [STATE] [ZIP]", # Standard Region |
| 227 | "property_type": "residential_commercial", |
| 228 | "sqft": 2500, |
| 229 | "add_ons": ["pet_trauma"] |
| 230 | } |
| 231 | |
| 232 | result = estimate_job(request) |
| 233 | # Returns structured estimate with line items, ranges, total |
| 234 | |
| 235 | # Apartment example (Premium Region) |
| 236 | request = { |
| 237 | "property_address": "456 Ocean Dr, [CITY], [STATE] [ZIP]", # Premium Region |
| 238 | "property_type": "apartment", |
| 239 | "bedrooms": 2, |
| 240 | "add_ons": ["surface_defense"] |
| 241 | } |
| 242 | |
| 243 | result = estimate_job(request) |
| 244 | # Returns structured estimate |
| 245 | |
| 246 | |
| 247 | ## Agent Integration Patterns |
| 248 | |
| 249 | ### Website Estimator Form → Instant Range |
| 250 | |
| 251 | User: "2500 sqft house, [CITY], pet odor, add surface defense" |
| 252 | Agent: Determines Standard Region, Res/Comm tier 1500-2500 = $1.25/sf |
| 253 | Base: 2500 × $1.25 = $3,125 |
| 254 | Pet/Trauma: 2500 × $0.35 = $875 |
| 255 | Surface Defense: 2500 × $0.35 = $875 |
| 256 | Total: $4,875 → Returns "Estimated $4,100–$5,600 (est. $4,875)" |
| 257 | |
| 258 | |
| 259 | ### Formal Estimate for QuickBooks |
| 260 | |
| 261 | User: "Create estimate for John Smith, 123 Main St [CITY], 2500 sqft house, pet trauma, surface defense" |
| 262 | Agent: Creates estimate record in CRM, generates QuickBooks estimate with line items, emails PDF |
| 263 | |
| 264 | |
| 265 | ### Quick Quote |
| 266 | |
| 267 | User: "Realtor needs ballpark for 2-bed apartment, cigarette smoke >5yrs" |
| 268 | Agent: Premium Region, Apartment 2-bed = $1,000 + $500 Premium + $150 cigarette |
| 269 | Total: $1,650 → Returns "$1,400–$1,900" + disclaimer |
| 270 | |
| 271 | |
| 272 | ## Common Pitfalls |
| 273 | |
| 274 | **Region misclassification** — Make sure your region mapping is configured correctly and matches across estimator-engine, website, and CRM |
| 275 | **Property type confusion** — Apartments use flat bedroom rates, NOT square footage pricing |
| 276 | **Premium apartment surcharge** — Must add the configured premium surcharge to the flat rate for Premium Region apartments |
| 277 | **Cigarette >5yrs** — Only applies as "Ext Add-on" flat fee per tier (not per sf) |
| 278 | **Minimums** — Check configured minimums for small square footage tiers |
| 279 | **High Rise Condo** — Flat fee per job (applies to both Standard and Premium) |
| 280 | **Pet/Trauma + Surface Defense** — Both are per-sf for Res/Comm, flat fee for Apartments |
| 281 | |
| 282 | ## Verification Checklist |
| 283 | |
| 284 | [ ] Region correctly maps to Standard vs Premium (from your config) |
| 285 | [ ] Property type determines pricing method (sf tiers vs bedroom flat rate) |
| 286 | [ ] Square footage tier lookup returns correct rate |
| 287 | [ ] Minimums enforced (from your config) |
| 288 | [ ] Add-ons calculate correctly (per-sf for Res/Comm, flat for Apartments) |
| 289 | [ ] Cigarette >5yrs uses tier-based flat fee (not per-sf) |
| 290 | [ ] Premium apartments add surcharge to flat rate |
| 291 | [ ] High Rise Condo adds configured flat fee |
| 292 | [ ] Range ±15% around calculated total |
| 293 | [ ] Estimate number format: EST-YYYY-NNNN (sequential) |
| 294 | [ ] Output includes assumptions list for transparency |
| 295 | |
| 296 | ## One-Shot Recipes |
| 297 | |
| 298 | ### "Quick ballpark for website (Standard Res/Comm)" |
| 299 | |
| 300 | from estimator import quick_quote |
| 301 | quick_quote(property_type="residential_commercial", sqft=2000, is_premium_region=False, add_ons=["pet_trauma"]) |
| 302 | # → "Estimated $3,400–$4,600" (2000 × $1.25 = $2,500 + 2000 × $0.35 = $700 + 2000 × $0.35 = $700 = $3,900) |
| 303 | |
| 304 | |
| 305 | ### "Full estimate for QuickBooks (Premium Apartment)" |
| 306 | |
| 307 | from estimator import formal_estimate |
| 308 | estimate = formal_estimate( |
| 309 | customer_name="Jane Doe", |
| 310 | property_address="456 Ocean Dr, [CITY], [STATE] [ZIP]", |
| 311 | property_type="apartment", |
| 312 | bedrooms=2, |
| 313 | is_premium_region=True, |
| 314 | add_ons=["cigarette_ext", "surface_defense"] |
| 315 | ) |
| 316 | # → Creates CRM estimate record, returns QB-ready line items |
| 317 | # Base: $1,000 (2-bed) + $500 (Premium) = $1,500 |
| 318 | # Cigarette ext: +$150, Surface Defense: +$100 = $1,750 total |
| 319 | |
| 320 | |
| 321 | ### "Batch quote for realtor list" |
| 322 | |
| 323 | from estimator import batch_quote |
| 324 | properties = [ |
| 325 | {"address": "456 Palm Ave [CITY], [STATE] [ZIP]", "property_type": "residential_commercial", "sqft": 3200, "add_ons": ["cigarette_ext"]}, # Standard Region |
| 326 | {"address": "789 Ocean Dr [CITY], [STATE] [ZIP]", "property_type": "apartment", "bedrooms": 2, "add_ons": ["pet_trauma"]}, # Standard Region |
| 327 | {"address": "1000 Collins Ave [CITY], [STATE] [ZIP]", "property_type": "residential_commercial", "sqft": 2800, "is_premium_region": True, "add_ons": ["high_rise"]}, # Premium Region |
| 328 | ] |
| 329 | for prop in properties: |
| 330 | print(batch_quote(prop)) |
| 331 |
Discussion
Alternatives
Browse more free Claude skills or everything in Sales.