Create Business Rule
create_business_ruleAdd a conditional rule to an existing SAS Business Rules rule set with defined conditions, actions, and rule-firing tracking. Use it to extend rule sets for new business decision logic.
Instructions
Create a new rule inside an existing SAS Business Rules rule set.
A rule set can hold multiple rules, each evaluated per its conditional
type. Condition/action expressions must include the variable name
directly (e.g. "credit_score < 650", not just "< 650") — the
API accepts the latter as valid but generates DS2 code with a missing
left-hand operand. Boolean signature variables must be compared with
= 0/= 1 in expressions, not = false/= true.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"ruleset_id": "<ruleset_id>",
"name": "<name>",
"conditional": "<conditional>",
"rule_fired_tracking_enabled": "<rule_fired_tracking_enabled>",
"conditions": "<conditions>",
"actions": "<actions>"
},
"name": "create_business_rule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Rule name (max 30 chars). | |
| actions | Yes | List of actions, each ``{"type": "assignment"|"return", "term": {"name", "dataType", "direction"}, "expression"}``, or ``{"type": "lookupValue", "term": {...}, "expression": "<key>", "lookup": "<lookup table name or ID>"}`` — assigns the value the lookup table stores for the key the expression evaluates to. | |
| conditions | Yes | List of conditions (multiple conditions AND together), each ``{"type": "complex", "expression", "term": {"name", "dataType", "direction"}}``, or ``{"type": "lookup", "term": {...}, "lookup": "<lookup table name or ID>"}`` — true when the term's value is a key of the lookup table. | |
| ruleset_id | Yes | The rule set UUID to add the rule to (not its name — list_business_rulesets returns both). | |
| conditional | Yes | "if" starts a new independent rule chain, "elseif" continues the previous rule's chain, "or" ORs into it. | |
| rule_fired_tracking_enabled | Yes | Whether to record when this rule fires. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||