Skip to content
SlashClone
Made by@dealdesk

Discount approval check

@dealdesk/discount-approval-check

Check a deal against your own approval policy file and get the list of who must approve and why: discount ladders, payment terms, billing frequency, term length, free months, non-standard terms, and deal size. Also shows how much room is left before the next approval.

SkillRevOpsv1.0.0 (latest)Tested
Activity
New: be the first to try it
  1. 1---
  2. 2name: discount-approval-check
  3. 3description: Check a deal against an editable approval policy and list exactly who must approve it and why (discount ladders, payment terms past Net 30, monthly or quarterly billing, long terms, free months, non-standard terms, MFN clauses, large deals), plus how much room is left before the next approval. Use when the user asks "who needs to approve this deal?", "can I give 30% off?", "does this need CFO sign-off?", "check this against our discount policy", or before sending a quote or order form.
  4. 4license: MIT
  5. 5---
  6. 6
  7. 7# Discount approval check
  8. 8
  9. 9Answers "who has to sign off on this?" from a policy file the team owns, so the answer is the same for every rep and every deal. The script evaluates the rules; you explain the result and help the rep choose: get the approvals, or change the deal.
  10. 11## When to use
  11. 13- Before a quote or order form goes out.
  12. 14- A rep asks how far they can go on discount or terms before they need someone else.
  13. 15- Setting up or changing the approval policy itself (edit `data/approval-policy.json` with the user).
  14. 16- Not for deciding whether a deal is a good idea. The policy says who decides; you do not.
  15. 18## Inputs
  16. 201. **Deal** in `data/deal.json`. Same shape as `po-creator` and the `-deal.json` that `quote-builder` writes: `lines` with `quantity`, `list_price`, `net_price`, optional `billing: "one_time"` and `price_period: "month"`; plus `term_months`, `payment_terms`, `billing_frequency`, optional `free_months`, `nonstandard_terms` (a list of short descriptions), and `flags` (any yes or no facts your policy checks, like `"mfn": true`).
  17. 212. **Policy** in `data/approval-policy.json`. If the user has none, copy the kit's `examples/approval-policy.json` to `data/` and walk them through each threshold before relying on it. Say clearly the example is a starting point, not their real policy.
  18. 23## Policy format
  19. 25```json
  20. 27 "approvers": ["Sales manager", "VP Sales", "Finance", "Legal", "CFO"],
  21. 28 "rules": [
  22. 29 { "id": "discount-15", "group": "discount", "approver": "Sales manager", "reason": "Discount over 15%",
  23. 30 "when": [{ "metric": "discount_pct", "op": ">", "value": 15 }] }
  24. 31 ]
  25. 33```
  26. 35- `when`: all conditions must match. `when_any`: at least one must match.
  27. 36- `op`: `>`, `>=`, `<`, `<=`, `==`, `!=`, `in`, `not_in`, `is_true`.
  28. 37- `group`: a ladder. List its rules from lowest to highest; only the highest matching step counts.
  29. 38- `approvers`: the order approvals are listed in.
  30. 39- Metrics: `discount_pct` (whole deal, off list), `recurring_discount_pct`, `max_line_discount_pct`, `acv`, `tcv`, `one_time_total`, `term_months`, `payment_terms_days`, `billing_frequency`, `free_months`, `nonstandard_terms` (count), and any key in the deal's `flags`.
  31. 41## Steps
  32. 431. Make sure both files exist. If the user pasted deal terms, write `data/deal.json` and confirm the numbers with them.
  33. 442. Run:
  34. 46 ```bash
  35. 47 node scripts/approvals.mjs data/deal.json data/approval-policy.json --out out --name approvals
  36. 48 ```
  37. 503. Read `out/approvals.json` and report with the template below.
  38. 514. If `could_not_check` is not empty, the deal is missing a fact a rule needs. Ask for it and rerun. Never treat an unchecked rule as passed.
  39. 525. If the rep wants to avoid an approval, use `headroom` to show the exact limit ("27.1% now; CFO needed past 40%"). Offer options that change the deal shape (longer term, annual billing, fewer free months), not ways to hide terms.
  40. 54## Output to the user
  41. 56```markdown
  42. 57**Northwind Traders LLC needs 3 approvals:** VP Sales, Finance, Legal.
  43. 59- VP Sales: discount 27.1% is over 25%.
  44. 60- Finance: Net 45 is longer than Net 30; quarterly billing on $31,200 ACV.
  45. 61- Legal: 1 non-standard term (termination for convenience).
  46. 63Room left: CFO approval starts past 40% discount.
  47. 64Could not check: none.
  48. 65```
  49. 67## Guardrails
  50. 69- The policy file is the source of truth. Do not apply thresholds from memory or "typical" policies.
  51. 70- Never suggest splitting a deal, backdating, or moving terms into a side letter to dodge an approval.
  52. 71- Never mark anything approved. This kit only says who must approve; the approvers decide.
  53. 72- If the user edits the policy, show the changed rules and confirm before saving.