Rules Engine
MonetizeNow's rules engine lets you describe your business policies once, as IF this, THEN that rules, and have MonetizeNow apply them to every quote.
For example:
- IF any line is discounted more than 50% THEN the Deal Desk must approve the quote.
- IF payment terms aren't Net 30 THEN Legal must approve.
- IF the billing contact has no full address THEN stop the rep from submitting.
- IF Analytics Seats are on the quote without Gold Support THEN suggest the upsell.
- IF Platinum Support is sold THEN add the service-level wording to the quote.
| I want to… | Go to |
|---|---|
| Understand the building blocks | How the rules engine works |
Decide between != and NOT | != or NOT? Which one to use |
| Build my first rule | Tutorial: your first rule |
| Combine conditions, compare fields, count or sum lines | How-to guides |
| Look up an operator | Reference |
| Get ideas | Rules worth building |
How the rules engine works
Explanation
One engine, several kinds of rule
Every kind of rule uses the same condition builder. What differs is the THEN: what happens when the rule matches.
| Rule type | Where | When it matches… | Details |
|---|---|---|---|
| Approval Rules | Settings → Rules → Approval Rules | the quote needs approval from a person or team before it can be sent | Approval Rules |
| Validation Rules | Settings → Rules → Validation Rules | the rep sees an Error (blocks submission), Warning or Info message | Validation Rules |
| Conditional Terms | Settings → Rules → Conditional Terms | terms are added to the quote | Conditional Terms |
| Record Automation | Settings → Rules → Record Automation | fields are set on new bill groups, or the customer portal changes | Record Automation |
| Quote Share Rules | Settings → Quote Share | Quote Share settings change for that quote | Quote Share |
This page covers the IF part, which works the same everywhere. Approval rules, validation rules and conditional terms are checked against quotes; the screenshots here use approval rules.
Conditions and criteria
The IF part of a rule is made of conditions, numbered 1, 2, 3…
Each condition:
- looks at one kind of record, its target object: the Quote, its Quote Offerings, its Quote Items, its Quote Conditional Terms or its Quote Documents;
- contains one or more criteria (a field, an operator and a value), such as Discount Percent > 50.
The key idea: all the criteria in one condition are checked against the same record. Separate conditions are checked independently.
- "Analytics Seats has a discount over 50%" → one Quote Item condition with two criteria (Product = Analytics Seats, Discount Percent > 50). It only matches if a single line is both.
- "Analytics Seats is on the quote, and any line has a discount over 50%" → two conditions. They can be matched by different lines.
A condition on Quote Offerings or Quote Items is true if any offering or item matches. Use an aggregate condition to look at them together.
flowchart TD
Q[Quote] --> O1[Quote Offering: Time Lord Enterprise]
Q --> O2[Quote Offering: TARDIS Data Warehouse]
O1 --> I1[Quote Item: Analytics Seats]
O1 --> I2[Quote Item: Gold Support]
O2 --> I3[Quote Item: TARDIS Data Warehouse]
Quote Offering and Quote Item conditions can also use fields from their parents, for example Quote Offering → Offering Name or Quote → Net Terms on a Quote Item condition.
How conditions are combined
The IF dropdown decides how conditions combine:
| Option | The rule matches when… |
|---|---|
| All Conditions Are Met | every condition is true |
| Any Condition Is Met | at least one condition is true |
| Custom Logic Is Met | your own formula is true, for example (1 OR 2) AND NOT 3 |
Each condition has the same dropdown, including Custom Logic Is Met, for combining its own criteria. Each condition also has a NOT box that reverses its result (true becomes false).
!= or NOT? Which one to use
These two look alike but answer different questions when a condition looks at Quote Items or Quote Offerings, because a quote has many of them.
| You write | It asks | On a quote with Analytics Seats, Gold Support and TARDIS Data Warehouse |
|---|---|---|
| Quote Item: Product != Gold Support | Is there any line that isn't Gold Support? | True: the Seats line isn't Gold Support |
| Quote Item: Product = Gold Support, with NOT ticked | Is there no line that is Gold Support? | False: there is a Gold Support line |
So:
- To check that a product is missing from the quote, use = with NOT (or Product = Gold Support with
NOTin custom logic). Don't use!=. - Use != (or Not In) when you want to describe one line, usually together with other criteria in the same condition. For example, Product != Gold Support and Discount Percent > 20 means "a line other than Gold Support has more than 20% off".
On the Quote itself there's only one record, so the two are the same: Net Terms != Net 30 and NOT [Net Terms = Net 30] give the same result.
| Goal | Use |
|---|---|
| "The quote doesn't include product X" | Quote Item condition: Product = X, tick NOT |
| "A line other than X has property Y" | Quote Item condition: Product != X and Y, in the same condition |
| "A quote-level field isn't a value" | Quote condition: !=, or = with NOT. Either works |
Tutorial: your first rule
Tutorial. About 5 minutes. You'll build an approval rule that sends any quote with a line discounted more than 50% to the Deal Desk team, then test it on a real quote.
You need: Tenant Admin or Sales Admin, and at least one quote.
1. Start a new rule
Go to Settings → Rules → Approval Rules and click New. Enter a Name, Deep discounts need Deal Desk approval, and a Description.
2. Choose how conditions combine
Leave IF as All Conditions Are Met.
3. Choose what to look at
In condition 1, change the target object from Quote to Quote Item: you want to check each line.
4. Add the criterion
Set Compare From Field to Discount Percent, Operator to > and Compare To to 50.
5. Say what happens
Under THEN, open Approver 1, switch to the Team tab and choose Deal Desk.
6. Test it
Expand Test Rule, choose a quote (here, Bad Wolf Media – Enterprise expansion, which has Analytics Seats at 55% off) and click Test Rule. Green results mean the rule matches this quote; each condition shows its own result.
7. Save
Click Save. From now on, every quote with a line discounted over 50% needs the Deal Desk's approval.
What you learned: a rule is a target object, criteria, a way to combine them, and an outcome, and you can test it on a real quote before it affects anyone.
How-to guides
Combine conditions with custom logic
How-to
- Add each condition you need with + Add Condition (under the conditions). They're numbered 1, 2, 3…
- Set IF to Custom Logic Is Met.
- Type the formula using the numbers,
AND,OR,NOTand brackets, for example(1 OR 2) AND NOT 3.
Every condition must appear in the formula, and every number must match a condition:
1 AND (2 OR 4)isn't valid if there's no condition 4, or if condition 3 is missing.1 OR 2isn't valid if the rule has only one condition.
Use the copy icon on a condition to duplicate it, and the bin icon to remove it.
Check two things on the same line
How-to
Add both criteria inside one condition with + Add Condition within that condition's box. Both are checked against the same Quote Item.
Compare one field with another
How-to
In Compare To, change Value to Field and choose the other field. You can pick any field of the same type from the same target object, including its parent's fields (for example Quote → Contract Start Date on a Quote Offering condition). For example, Expiration Date > Field: Contract Start Date catches quotes that would still be open after the contract should have started.
This is most useful with custom fields synced from your CRM, for example comparing the quote's expiration date with an opportunity close date mapped through Salesforce or HubSpot field mapping.
To allow some slack between two dates, use the Differs From Date Field operator instead. You set how far apart they may be (More Than / Less Than a number of days, weeks, months or years) and in which direction (Before, After or Either Direction). For example, Quote Offering → Start Date differs from Contract Start Date by more than 5 days after.
Count, sum or compare lines (aggregate conditions)
How-to. Quote Offering and Quote Item conditions only.
An aggregate condition looks at all the offerings or items that match the condition's criteria, together.
- In a Quote Item (or Quote Offering) condition, set the criteria that pick the lines, for example Product In Analytics Seats, Platinum Support.
- Click + Aggregate Condition.
- Choose the Operator and, where needed, the Field and Value, for example Has Different Value on Quantity.
| Aggregate operator | You choose | True when… |
|---|---|---|
| Has Same Value / Has Different Value | a Field | the matching lines all share, or don't all share, that field's value |
| Count Equals / Greater Than / Less Than / Greater Than or Equal To / Less Than or Equal To | a Value | the number of matching lines compares to your value |
| Sum Equals / Greater Than / Less Than / Greater Than or Equal To / Less Than or Equal To | a numeric Field and a Value | the total of that field across the matching lines compares to your value |
For Quote Items, tick Evaluate each offering ramped segment individually to check each scheduled-change segment on its own. For example, quantities must match within each segment but can differ between segments.
On amendment and renewal quotes, deleted offerings and items are ignored unless you tick Include Deleted Records on the condition.
Check every day of a quote
How-to. Approval rules, validation rules and conditional terms only.
The FOR dropdown sets how dates on the quote are treated:
| Option | Meaning |
|---|---|
| All days of the Quote (default) | The quote is checked as a whole. |
| Every day of the Quote | The quote is split into date ranges and each one is checked separately. The rule matches if any range matches. |
Use Every day of the Quote for rules like "Silver and Gold can't be on a contract at the same time". An amendment that upgrades from Silver to Gold, with no overlapping dates, then passes.
Test a rule
How-to
- Expand Test Rule at the bottom of the rule.
- Choose a quote in Choose a quote to test rule against.
- Click Test Rule. You'll see whether the rule is valid, whether it evaluated to true, and the result of each condition.
True means the rule applies. For an approval rule, true means the quote needs this approval. Testing never changes the quote, and works before you save.
Rules worth building
Ideas
| Rule | Type | IF | THEN |
|---|---|---|---|
| Deep discounts | Approval | Quote Item → Discount Percent > 50 | Deal Desk team approves |
| Non-standard payment terms | Approval | Quote → Net Terms Not In Net 30 | Legal approves |
| Manager approval for their reps | Approval | Quote → Owner's Team = your team and Amount > 50,000 | The team's manager approves |
| No backdating | Validation (Error) | Quote → Contract Start Date: Before Current Month = True | "Start date can't be in a past month." |
| Clean billing data | Validation (Error) | Quote → Contacts → Billing Address → Line 1: Exists = False | "Add a complete billing address." |
| PO number format | Validation (Warning) | Quote → PO Number: Character Length < 10 | "PO numbers are 10 characters." |
| Upsell nudge | Validation (Info) | 1: Quote Item → Product = Analytics Seats; 2: Quote Item → Product = Gold Support, with NOT ticked (see != or NOT? above) | "Consider upselling to Gold Support." |
| Matching quantities | Validation (Warning) | Quote Item → Product In Seats, Platinum Support; aggregate: Quantity Has Different Value | "Seats and Platinum Support should match." |
| Too many one-off charges | Approval | Quote Item → Product → Type = One-Time; aggregate: Count Greater Than 3 | Deal Desk approves |
| SLA wording | Conditional Term | Quote Item → Product = Platinum Support | Add the service-level terms |
| Long contracts | Approval | Quote → Contract Length > 36 | Finance approves |
Reference
Target objects for quote rules
| Target object | Holds |
|---|---|
| Quote | Quote-level fields: amount, currency, net terms, dates, contacts, owner and Owner's Team, PO and VAT numbers, quote custom fields, account fields |
| Quote Offering | Each offering (bundle): offering, rate, billing frequency, dates, amounts, discounts, plus its quote's fields |
| Quote Item | Each product line: product, quantity, prices, discounts, revenue, plus its offering's and quote's fields |
| Quote Conditional Terms | The conditional terms on the quote: name, the rule that added it, and whether it was edited |
| Quote Documents | Documents attached to the quote: document type, status, position and original source |
Operators
The operators you can choose depend on the field's type.
| Operator | Field types | True when… | Example |
|---|---|---|---|
| = / != | Text, number, currency, date, true/false, list, reference | the value matches / doesn't match | Net Terms = Net 30 |
| > / >= / < / <= | Number, currency, date | greater / at least / less / at most | Amount > 1,000,000 |
| In / Not In | List, reference | the value is / isn't one of those you pick | Net Terms In Net 30, Net 60 |
| Exists | All types except true/false fields and lists of text | the field has a value (True) or is empty (False) | PO Number Exists = True |
| Contains / Does Not Contain | Text | the text includes / doesn't include a phrase | Description Contains "renewal" |
| Starts With / Ends With | Text | the text starts / ends with a phrase | Custom ID Starts With "EU-" |
| Character Length > / < / = | Text | the number of characters compares to a number | PO Number Character Length = 10 |
| Includes / Not Includes | Lists of text, such as Account → Account-level CCs | the list contains / doesn't contain a value | Account-level CCs Includes "[email protected]" |
| First Day Of Month / Last Day Of Month | Date | the date is (True) or isn't (False) the first / last day of a month | Start Date First Day Of Month = False |
| Before Current Month / After Current Month | Date | the date is before / after the current month | Start Date Before Current Month = True |
| More Than N Days / Weeks / Months / Years In Past | Date | the date is more than N units before today | Created more than 30 days in past |
| More Than N Days / Weeks / Months / Years In Future | Date | the date is more than N units after today | Start Date more than 90 days in future |
| Differs From Date Field | Date | the date is more / less than an amount from another date field, before, after or either way | Offering Start Date differs from Contract Start Date by more than 5 days |
Compare To
| Option | Compares with |
|---|---|
| Value | A value you type or pick |
| Field | Another field on the same record, of a matching type |
Custom logic syntax
| Element | Meaning |
|---|---|
1, 2, 3… | Condition numbers |
AND, OR, NOT | Combine, or reverse a condition (NOT 3 works like ticking NOT on condition 3) |
( ) | Group |
Every condition must be used, and every number must refer to a condition that exists.
Updated 8 days ago
What’s Next
Review how to configure rules to streamline your sales processes.
