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.
- Activity
- New: be the first to try it
- Installs
- 0 installs
- Likes
- 0 likes
- Clones
- 0 clones
What it makes
Real output from this kit
- Sample file1 KB, download to openApprovalsFrom the kit's tests
- Sample file714 bytes, download to openApprovalsFrom the kit's tests
- Sample file785 bytes, download to openApprovalsFrom the kit's tests
How this works
- It is a skill: written instructions Claude reads when your request matches what the skill is for. You do not call it by name; just ask for the task.
- While it works, it reads and changes files in the places it lists, nowhere else.
- It runs these commands on your computer: node scripts/approvals.mjs.
- Nothing runs until you choose to use it, and you can remove it any time.
SKILL.md
Discount approval check
Answers "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.
When to use
- Before a quote or order form goes out.
- A rep asks how far they can go on discount or terms before they need someone else.
- Setting up or changing the approval policy itself (edit
data/approval-policy.jsonwith the user). - Not for deciding whether a deal is a good idea. The policy says who decides; you do not.
Inputs
- Deal in
data/deal.json. Same shape aspo-creatorand the-deal.jsonthatquote-builderwrites:lineswithquantity,list_price,net_price, optionalbilling: "one_time"andprice_period: "month"; plusterm_months,payment_terms,billing_frequency, optionalfree_months,nonstandard_terms(a list of short descriptions), andflags(any yes or no facts your policy checks, like"mfn": true). - Policy in
data/approval-policy.json. If the user has none, copy the kit'sexamples/approval-policy.jsontodata/and walk them through each threshold before relying on it. Say clearly the example is a starting point, not their real policy.
Policy format
{
"approvers": ["Sales manager", "VP Sales", "Finance", "Legal", "CFO"],
"rules": [
{ "id": "discount-15", "group": "discount", "approver": "Sales manager", "reason": "Discount over 15%",
"when": [{ "metric": "discount_pct", "op": ">", "value": 15 }] }
]
}when: all conditions must match.when_any: at least one must match.op:>,>=,<,<=,==,!=,in,not_in,is_true.group: a ladder. List its rules from lowest to highest; only the highest matching step counts.approvers: the order approvals are listed in.- 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'sflags.
Steps
- Make sure both files exist. If the user pasted deal terms, write
data/deal.jsonand confirm the numbers with them. Run:
node scripts/approvals.mjs data/deal.json data/approval-policy.json --out out --name approvals- Read
out/approvals.jsonand report with the template below. - If
could_not_checkis not empty, the deal is missing a fact a rule needs. Ask for it and rerun. Never treat an unchecked rule as passed. - If the rep wants to avoid an approval, use
headroomto 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.
Output to the user
**Northwind Traders LLC needs 3 approvals:** VP Sales, Finance, Legal.
- VP Sales: discount 27.1% is over 25%.
- Finance: Net 45 is longer than Net 30; quarterly billing on $31,200 ACV.
- Legal: 1 non-standard term (termination for convenience).
Room left: CFO approval starts past 40% discount.
Could not check: none.Guardrails
- The policy file is the source of truth. Do not apply thresholds from memory or "typical" policies.
- Never suggest splitting a deal, backdating, or moving terms into a side letter to dodge an approval.
- Never mark anything approved. This kit only says who must approve; the approvers decide.
- If the user edits the policy, show the changed rules and confirm before saving.
README.md
Discount approval check
Checks a deal against your team's approval policy and tells you who must approve it and why. The policy is a plain JSON file you own, so every rep gets the same answer.
Who it is for
Deal desk, sales managers, and reps who want to know before they send a quote whether they need a VP, finance, or legal to sign off, and how much room they have left.
Example
Input: examples/deal.json (60 seats at $420 instead of $600, onboarding at half price, 24 months, quarterly billing, Net 45, one non-standard term) and examples/approval-policy.json.
Output (out/approvals.md):
Needs 3 approval(s): VP Sales, Finance, Legal
VP Sales: Discount over 25% (actual 27.1)
Finance: Payment terms longer than Net 30 (actual 45); non-annual billing on $31,200 ACV
Legal: Non-standard contract terms (actual 1)
Room before the next approval: discount 27.1 now; CFO needed past 40What it can access
- Runs
node scripts/approvals.mjs(Node built-ins only, no network). - Reads
data/(plus the kit's ownexamples/), writesdata/andout/.
Setup
Copy examples/approval-policy.json to data/approval-policy.json and change the thresholds and approver names to match your real policy.
Files
- README.md
- SKILL.md
- examples/approval-policy.json
- examples/deal.json
- kit.json
- scripts/approvals.mjs
Did it work?
0worked for them0did not work
Sign in to say whether it worked for you.
Nobody has said yet. Tried it? Tell the next person.
