Po creator
@dealdesk/po-creator
Turn a deal into a clean order form or purchase order, in markdown and printable HTML. Computes line totals, discounts, contract value, and a billing schedule, and lists what finance needs before signature. Works offline from a JSON file or a short text form.
- Activity
- New: be the first to try it
- Installs
- 0 installs
- Likes
- 0 likes
- Clones
- 0 clones
- 1{
- 2 "name": "po-creator",
- 3 "owner": "dealdesk",
- 4 "version": "1.0.0",
- 5 "type": "skill",
- 6 "description": "Turn a deal into a clean order form or purchase order, in markdown and printable HTML. Computes line totals, discounts, contract value, and a billing schedule, and lists what finance needs before signature. Works offline from a JSON file or a short text form.",
- 7 "category": "revops",
- 8 "license": "MIT",
- 9 "compat": [
- 10 "claude-code"
- 11 ],
- 12 "permissions": {
- 13 "shell": [
- 14 "node scripts/po-creator.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": "JSON deal: totals, quarterly schedule, and a missing PO blocker",
- 30 "inputs": {
- 31 "data/deal.json": "{\"order_number\":\"OF-T-1\",\"customer\":{\"legal_name\":\"Northwind Traders LLC\",\"address\":\"100 Market Street\",\"billing_contact\":{\"name\":\"Accounts Payable\",\"email\":\"ap@northwind.example\"}},\"start_date\":\"2026-12-01\",\"term_months\":12,\"billing_frequency\":\"quarterly\",\"payment_terms\":\"Net 45\",\"po_required\":true,\"lines\":[{\"sku\":\"PLAT-SEAT\",\"description\":\"Platform seat\",\"quantity\":50,\"list_price\":600,\"net_price\":480},{\"sku\":\"SUP-PREM\",\"description\":\"Premium support\",\"quantity\":1,\"list_price\":6000,\"net_price\":6000},{\"sku\":\"ONB-STD\",\"description\":\"Onboarding\",\"quantity\":1,\"list_price\":5000,\"net_price\":4000,\"billing\":\"one_time\"}]}"
- 32 },
- 33 "checks": [
- 34 {
- 35 "type": "command_exits_zero",
- 36 "command": "node scripts/po-creator.mjs data/deal.json --out out --today 2026-11-04"
- 37 },
- 38 {
- 39 "type": "file_exists",
- 40 "path": "out/order-form.html"
- 41 },
- 42 {
- 43 "type": "file_contains",
- 44 "path": "out/order-form.md",
- 45 "text": "| **Total contract value** | **$34,000.00** |"
- 46 },
- 47 {
- 48 "type": "output_matches_schema",
- 49 "path": "out/order-form.json",
- 50 "schema": {
- 51 "type": "object",
- 52 "required": [
- 53 "totals",
- 54 "billing_schedule",
- 55 "blockers",
- 56 "ready_for_signature"
- 57 ],
- 58 "properties": {
- 59 "totals": {
- 60 "type": "object",
- 61 "properties": {
- 62 "list_total": {
- 63 "const": 41000
- 64 },
- 65 "tcv": {
- 66 "const": 34000
- 67 },
- 68 "acv": {
- 69 "const": 30000
- 70 },
- 71 "one_time_total": {
- 72 "const": 4000
- 73 },
- 74 "discount_pct": {
- 75 "const": 17.1
- 76 }
- 77 }
- 78 },
- 79 "billing_schedule": {
- 80 "type": "array",
- 81 "minItems": 4,
- 82 "maxItems": 4
- 83 },
- 84 "blockers": {
- 85 "const": 1
- 86 },
- 87 "ready_for_signature": {
- 88 "const": false
- 89 }
- 90 }
- 91 }
- 92 }
- 93 ]
- 94 },
- 95 {
- 96 "name": "short text form: two-year term, monthly-priced line, annual billing",
- 97 "inputs": {
- 98 "data/deal.txt": "number: OF-T-2\ncustomer: Contoso Robotics Inc.\naddress: 22 Harbor Road\nbilling contact: Finance Team, invoices@contoso.example\nsigner: Operations Lead, VP Operations\nstart: 2027-01-01\nterm: 24 months\nbilling: annual\npayment terms: Net 30\npo required: no\nline: PLAT-SEAT | Platform seat | 120 | 600 | 510\nline: API-1K | API calls per 1,000 | 500 | 2 | 1.6 | month\nline: ONB-PLUS | Onboarding plus training | 1 | 9000 | 9000 | one-time\n"
- 99 },
- 100 "checks": [
- 101 {
- 102 "type": "command_exits_zero",
- 103 "command": "node scripts/po-creator.mjs data/deal.txt --out out --name of-t-2 --today 2026-11-04"
- 104 },
- 105 {
- 106 "type": "output_matches_schema",
- 107 "path": "out/of-t-2.json",
- 108 "schema": {
- 109 "type": "object",
- 110 "properties": {
- 111 "end_date": {
- 112 "const": "2028-12-31"
- 113 },
- 114 "totals": {
- 115 "type": "object",
- 116 "properties": {
- 117 "tcv": {
- 118 "const": 150600
- 119 },
- 120 "acv": {
- 121 "const": 70800
- 122 },
- 123 "first_year_total": {
- 124 "const": 79800
- 125 }
- 126 }
- 127 },
- 128 "billing_schedule": {
- 129 "type": "array",
- 130 "minItems": 2,
- 131 "maxItems": 2
- 132 },
- 133 "blockers": {
- 134 "const": 0
- 135 }
- 136 }
- 137 }
- 138 }
- 139 ]
- 140 }
- 141 ]
- 142 }
- 143}
