Skip to content
SlashClone
Made by@dealdesk

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.

SkillRevOpsv1.0.0 (latest)Tested
Activity
New: be the first to try it
  1. 1{
  2. 2 "name": "quote-builder",
  3. 3 "owner": "dealdesk",
  4. 4 "version": "1.0.0",
  5. 5 "type": "skill",
  6. 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. 7 "category": "revops",
  8. 8 "license": "MIT",
  9. 9 "compat": [
  10. 10 "claude-code"
  11. 11 ],
  12. 12 "permissions": {
  13. 13 "shell": [
  14. 14 "node scripts/quote.mjs"
  15. 15 ],
  16. 16 "files": {
  17. 17 "read": [
  18. 18 "./data/**"
  19. 19 ],
  20. 20 "write": [
  21. 21 "./data/**",
  22. 22 "./out/**"
  23. 23 ]
  24. 24 }
  25. 25 },
  26. 26 "tests": {
  27. 27 "cases": [
  28. 28 {
  29. 29 "name": "volume and graduated tiers with a deal discount",
  30. 30 "inputs": {
  31. 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. 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. 33 },
  34. 34 "checks": [
  35. 35 {
  36. 36 "type": "command_exits_zero",
  37. 37 "command": "node scripts/quote.mjs data/price-book.csv data/selections.json --out out --today 2026-11-04"
  38. 38 },
  39. 39 {
  40. 40 "type": "file_exists",
  41. 41 "path": "out/quote-deal.json"
  42. 42 },
  43. 43 {
  44. 44 "type": "file_contains",
  45. 45 "path": "out/quote.md",
  46. 46 "text": "| **Total for term** | **$82,970.00** |"
  47. 47 },
  48. 48 {
  49. 49 "type": "output_matches_schema",
  50. 50 "path": "out/quote.json",
  51. 51 "schema": {
  52. 52 "type": "object",
  53. 53 "required": [
  54. 54 "lines",
  55. 55 "totals",
  56. 56 "warnings",
  57. 57 "valid_until"
  58. 58 ],
  59. 59 "properties": {
  60. 60 "valid_until": {
  61. 61 "const": "2026-12-04"
  62. 62 },
  63. 63 "totals": {
  64. 64 "type": "object",
  65. 65 "properties": {
  66. 66 "list_total": {
  67. 67 "const": 99000
  68. 68 },
  69. 69 "net_total": {
  70. 70 "const": 82970
  71. 71 },
  72. 72 "acv": {
  73. 73 "const": 38985
  74. 74 },
  75. 75 "discount_pct": {
  76. 76 "const": 16.2
  77. 77 }
  78. 78 }
  79. 79 },
  80. 80 "warnings": {
  81. 81 "type": "array",
  82. 82 "maxItems": 0
  83. 83 }
  84. 84 }
  85. 85 }
  86. 86 }
  87. 87 ]
  88. 88 },
  89. 89 {
  90. 90 "name": "warns when a line goes past its max discount",
  91. 91 "inputs": {
  92. 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. 93 "data/selections.json": "{\"customer\":\"Contoso Robotics Inc.\",\"term_months\":12,\"lines\":[{\"sku\":\"SUP-PREM\",\"quantity\":1,\"discount_pct\":25}]}"
  94. 94 },
  95. 95 "checks": [
  96. 96 {
  97. 97 "type": "command_exits_zero",
  98. 98 "command": "node scripts/quote.mjs data/price-book.csv data/selections.json --out out --today 2026-11-04"
  99. 99 },
  100. 100 {
  101. 101 "type": "output_matches_schema",
  102. 102 "path": "out/quote.json",
  103. 103 "schema": {
  104. 104 "type": "object",
  105. 105 "properties": {
  106. 106 "totals": {
  107. 107 "type": "object",
  108. 108 "properties": {
  109. 109 "net_total": {
  110. 110 "const": 4500
  111. 111 }
  112. 112 }
  113. 113 },
  114. 114 "warnings": {
  115. 115 "type": "array",
  116. 116 "minItems": 1,
  117. 117 "maxItems": 1
  118. 118 }
  119. 119 }
  120. 120 }
  121. 121 }
  122. 122 ]
  123. 123 }
  124. 124 ]
  125. 125 }