Quote builder
@dealdesk/quote-builder
Price a quote from your price book CSV and the products a customer picked. Handles flat, volume, and graduated tier pricing plus line and deal discounts, checks per-product discount limits, and writes a customer-ready quote and a deal file for the order form.
- Activity
- New: be the first to try it
- Installs
- 0 installs
- Likes
- 0 likes
- Clones
- 0 clones
- 1{
- 2 "name": "quote-builder",
- 3 "owner": "dealdesk",
- 4 "version": "1.0.0",
- 5 "type": "skill",
- 6 "description": "Price a quote from your price book CSV and the products a customer picked. Handles flat, volume, and graduated tier pricing plus line and deal discounts, checks per-product discount limits, and writes a customer-ready quote and a deal file for the order form.",
- 7 "category": "revops",
- 8 "license": "MIT",
- 9 "compat": [
- 10 "claude-code"
- 11 ],
- 12 "permissions": {
- 13 "shell": [
- 14 "node scripts/quote.mjs"
- 15 ],
- 16 "files": {
- 17 "read": [
- 18 "./data/**"
- 19 ],
- 20 "write": [
- 21 "./data/**",
- 22 "./out/**"
- 23 ]
- 24 }
- 25 },
- 26 "tests": {
- 27 "cases": [
- 28 {
- 29 "name": "volume and graduated tiers with a deal discount",
- 30 "inputs": {
- 31 "data/price-book.csv": "sku,name,unit,billing,pricing,min_qty,max_qty,unit_price,max_discount_pct\nPLAT-SEAT,Platform seat,seat per year,recurring,volume,1,49,600,30\nPLAT-SEAT,Platform seat,seat per year,recurring,volume,50,199,540,30\nPLAT-SEAT,Platform seat,seat per year,recurring,volume,200,,480,30\nAPI-1K,API calls per 1000,1k calls per year,recurring,tiered,1,1000,2.00,40\nAPI-1K,API calls per 1000,1k calls per year,recurring,tiered,1001,10000,1.50,40\nAPI-1K,API calls per 1000,1k calls per year,recurring,tiered,10001,,1.00,40\nSUP-PREM,Premium support,per year,recurring,flat,1,,6000,10\nONB-STD,Onboarding package,one-time,one_time,flat,1,,5000,20\n",
- 32 "data/selections.json": "{\"customer\":\"Northwind Traders LLC\",\"term_months\":24,\"deal_discount_pct\":10,\"lines\":[{\"sku\":\"PLAT-SEAT\",\"quantity\":60},{\"sku\":\"API-1K\",\"quantity\":2500},{\"sku\":\"SUP-PREM\",\"quantity\":1,\"discount_pct\":0},{\"sku\":\"ONB-STD\",\"quantity\":1}]}"
- 33 },
- 34 "checks": [
- 35 {
- 36 "type": "command_exits_zero",
- 37 "command": "node scripts/quote.mjs data/price-book.csv data/selections.json --out out --today 2026-11-04"
- 38 },
- 39 {
- 40 "type": "file_exists",
- 41 "path": "out/quote-deal.json"
- 42 },
- 43 {
- 44 "type": "file_contains",
- 45 "path": "out/quote.md",
- 46 "text": "| **Total for term** | **$82,970.00** |"
- 47 },
- 48 {
- 49 "type": "output_matches_schema",
- 50 "path": "out/quote.json",
- 51 "schema": {
- 52 "type": "object",
- 53 "required": [
- 54 "lines",
- 55 "totals",
- 56 "warnings",
- 57 "valid_until"
- 58 ],
- 59 "properties": {
- 60 "valid_until": {
- 61 "const": "2026-12-04"
- 62 },
- 63 "totals": {
- 64 "type": "object",
- 65 "properties": {
- 66 "list_total": {
- 67 "const": 99000
- 68 },
- 69 "net_total": {
- 70 "const": 82970
- 71 },
- 72 "acv": {
- 73 "const": 38985
- 74 },
- 75 "discount_pct": {
- 76 "const": 16.2
- 77 }
- 78 }
- 79 },
- 80 "warnings": {
- 81 "type": "array",
- 82 "maxItems": 0
- 83 }
- 84 }
- 85 }
- 86 }
- 87 ]
- 88 },
- 89 {
- 90 "name": "warns when a line goes past its max discount",
- 91 "inputs": {
- 92 "data/price-book.csv": "sku,name,unit,billing,pricing,min_qty,max_qty,unit_price,max_discount_pct\nSUP-PREM,Premium support,per year,recurring,flat,1,,6000,10\n",
- 93 "data/selections.json": "{\"customer\":\"Contoso Robotics Inc.\",\"term_months\":12,\"lines\":[{\"sku\":\"SUP-PREM\",\"quantity\":1,\"discount_pct\":25}]}"
- 94 },
- 95 "checks": [
- 96 {
- 97 "type": "command_exits_zero",
- 98 "command": "node scripts/quote.mjs data/price-book.csv data/selections.json --out out --today 2026-11-04"
- 99 },
- 100 {
- 101 "type": "output_matches_schema",
- 102 "path": "out/quote.json",
- 103 "schema": {
- 104 "type": "object",
- 105 "properties": {
- 106 "totals": {
- 107 "type": "object",
- 108 "properties": {
- 109 "net_total": {
- 110 "const": 4500
- 111 }
- 112 }
- 113 },
- 114 "warnings": {
- 115 "type": "array",
- 116 "minItems": 1,
- 117 "maxItems": 1
- 118 }
- 119 }
- 120 }
- 121 }
- 122 ]
- 123 }
- 124 ]
- 125 }
- 126}
