1{
2 "decision": "Order discount rate",
3 "hitPolicy": "FIRST",
4 "inputs": ["custType", "orderTotal", "yearsActive"],
5 "output": { "name": "rate", "type": "decimal" },
6 "rules": [
7 { "id": "R1", "when": ["\"W\"", ">= 10000", "-"], "then": 0.12 },
8 { "id": "R2", "when": ["\"W\"", "< 10000", "-"], "then": 0.08 },
9 { "id": "R3", "when": ["\"R\"", "-", "> 5"], "then": 0.05 },
10 { "id": "R4", "when": ["\"R\"", "-", "<= 5"], "then": 0 },
11 { "id": "R5", "when": ["-", "-", "-"], "then": 0 }
12 ],
13 "review": [
14 "rate is Single: 0.12 is stored as 0.119999997; result rounded to 4 dp",
15 "On Error Resume Next: overflow returns 0 discount silently"
16 ],
17 "source": "modPricing.bas:1-15"
18}