Creating Rules
The New Rule dialog creates a rule and its first version in three steps: you choose what the rule is written against and what kind of rule it is, you write the rule, and you name it. At the end you decide whether the new version goes live at once, waits, or waits for approval. Use it whenever you need a new business decision that your application does not have yet.
The components it uses:
- The New Rule dialog, with three steps. Its title says which step you are on, such as New Rule (Step 1 of 3).
- Step 1: five choices that decide what the rule is. Source is the source object the rule looks at. Source Version is the version of that source object the rule is written against. Rule Type decides whether the rule answers a question or does something. Is Reusable Rule? and Can Other Rules Execute It? decide whether other rules may use this one.
- Step 2: the Rule Editor tab, where you write the rule, the AI Rule Editor tab, where an AI can write it for you if your application offers one, and the Source Fields tab, which lists everything the source version offers.
- Step 3: the rule's and the version's names, descriptions and first internal notes, and the Create Rule button.
- The save's question: what happens to the new version once it is saved.
Only one New Rule, New Draft or Test dialog can be open at a time. While one is open, + New... and the buttons that would open another are off.
Starting a New Rule
You can start a new rule in three places:
- Click + New... at the top of the screen and select New Rule.... Step 1 opens with nothing chosen.
- In the Source Object dialog, click New Rule.... Step 1 opens with that source object already chosen.
- In the Source Version dialog, click New Rule.... Step 1 opens with that source object and that version already chosen.
Step 1: What the Rule Is
- In Source, select the source object the rule will look at.
- In Source Version, select its version. The list shows the newest version first, and the live version is marked (Live). Most rules are written against the live version; choose a newer one when the rule needs something only that version has.
- In Rule Type, select Evaluation Type for a rule that answers yes or no, or Execution Type for a rule that sets values or runs actions.
- For an evaluation rule, select Yes or No in Is Reusable Rule?. A reusable rule can be used by other rules in their conditions. For an execution rule, select Yes or No in Can Other Rules Execute It?. Such a rule can be run by other execution rules as one of their actions. The question that does not apply to your rule type stays off. See Reusable and Inline Rules.
- Click Next →. Step 2 opens.
Choose carefully: a rule's type, and whether other rules may use it, cannot be changed after the rule is created.
Step 2: Writing the Rule
Step 2 is titled New Rule (Step 2 of 3). The grey line at the top says which source object and version the rule is written against. Under it are three tabs:
- Rule Editor: the editor itself. The line above it repeats your choices from step 1, such as Rule Type: Evaluation and Reusable? No, and Rule Definition: Editable. Two icons sit in the editor's corners: Copy the rule as text copies the rule as one sentence, and View in Full Mode opens the editor in a larger dialog.
- AI Rule Editor: describe the rule in your own words and let the AI write it. This tab appears only if your application offers an AI model and you have permission to use it. See AI Rule Editor.
- Source Fields: every field, method, action and list that the source version offers, with their settings. See Browsing Fields.
To write the rule:
- Click anywhere in the editor's area. The editor starts the rule and opens a menu of what can come first.
- Build the rule by choosing from the menus and typing values. See The Rule Editor for how.
- To try the rule before you save it, click Test.... See Testing Rules.
- Click Next →. The repository checks the rule. If the rule is empty or unfinished, or something in it is not valid, the editor marks the elements that need attention and you stay on step 2. Hover over a marked element to see what is wrong. When the rule is complete and valid, step 3 opens.
← Back returns to step 1. Nothing you have done is lost when you move between steps.
Step 3: Naming and Saving
Step 3 is titled New Rule (Step 3 of 3). Its left half is about the rule, its right half about the rule's first version.
- Type a Rule Name. Choose a name people will recognise in a list of rules.
- Optionally, type a Rule Description: one or two sentences that say what the rule is for. Others see it as the rule's tooltip, and AI assistants read it.
- Optionally, type an Internal Note: a working comment about the rule, saved as its first note.
- Type a Rule Version Name, such as "v1".
- Optionally, type a Rule Version Description and a Rule Version Internal Note.
- Click Create Rule.
Both names are required: their labels are bold, and Create Rule stays off until both hold something.
The Save's Question
What happens next depends on your permissions.
If you may make rule versions live, the repository asks Ready for production?: "The rule version you are about to save is eligible to go live. You can make it live now, or save it and make it live later." Choose one:
- Save Version saves the rule and its version. The version is not live; you or someone else can make it live later.
- Save & Go Live saves the rule and makes the version live in one step. The Pay Attention confirmation opens: it says what will happen and takes an optional internal note. Click Next →, type live in the box, and click Go Live. If anything prevents the version from going live, nothing is saved, and the confirmation says what stands in the way.
- Cancel returns to step 3 without saving.
If you may ask for approval but not make versions live, the repository asks: "Would you like to request approval of the rule version you are about to save? The people who can put rule versions into production will be asked to approve it." Choose Request Approval to save and ask for approval, No Approval to save without asking, or Cancel. See Approvals.
If you may do neither, the rule is saved with no question.
When the rule is saved, a notification says so, the dialog closes, and the new rule appears at the top of the Rules grid.