create_business_rule
Add a new rule to a SAS Business Rules rule set with conditions, actions, and conditional type. Supports if, elseif, and or chaining with optional firing tracking.
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.
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"}``. | |
| conditions | Yes | List of conditions (multiple conditions AND together), each ``{"type": "complex", "expression", "term": {"name", "dataType", "direction"}}``. | |
| ruleset_id | Yes | The rule set UUID to add the rule to. | |
| 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 | |||