Date Tokens
Rule conditions on Date and Datetime fields accept relative dates as well as fixed calendar dates. A relative date is re-evaluated every time the rule runs, so a condition like “closes this quarter” keeps meaning the current quarter instead of the quarter you happened to build the rule in.
These are the same idea as the relative dates in a Salesforce report filter (LAST WEEK, NEXT 30 DAYS), written in Novigem’s own token syntax.
Entering a relative date
In the Rule Builder, a condition on a Date or Datetime field shows a calendar date picker by default. Select Use relative date above the row to switch that value to a text field and type a token instead. Use calendar date switches back.
Tokens are validated as you leave the field, so a typo is caught while you are building the rule rather than silently never matching.
Tokens only apply to the comparison operators: equals, notEquals, greaterThan, lessThan, greaterOrEqual, and lessOrEqual. The isBlank and isChanged operators take "true" or "false" instead.
If you author conditions directly in the JSON editor, a token is just the condition’s value:
{
"conditions": [
{
"field": "CloseDate",
"operator": "greaterThan",
"value": "TODAY"
}
]
}Token reference
Day, week, and month offsets
Replace n with a whole number of days, weeks, or months. n must be zero or positive here: to go the other direction, use the matching _AGO or _FROM_NOW token.
| Token | Resolves to |
|---|---|
TODAY | Today’s date |
YESTERDAY | Today minus 1 day |
TOMORROW | Today plus 1 day |
N_DAYS_AGO:n | Today minus n days |
N_DAYS_FROM_NOW:n | Today plus n days |
N_WEEKS_AGO:n | Today minus n weeks |
N_WEEKS_FROM_NOW:n | Today plus n weeks |
N_MONTHS_AGO:n | Today minus n months (calendar months) |
N_MONTHS_FROM_NOW:n | Today plus n months (calendar months) |
Example · Opportunities created in the last 30 days:
{
"field": "CreatedDate",
"operator": "greaterOrEqual",
"value": "N_DAYS_AGO:30"
}Period boundaries
These resolve to the first or last day of a period. On their own they mean the current period. Add a signed offset to shift whole periods: :-1 is the previous period, :1 the next, :-3 three periods back.
| Token | Resolves to |
|---|---|
START_OF_WEEK[:n] | First day of the current week, shifted n weeks |
END_OF_WEEK[:n] | Last day of the current week, shifted n weeks |
START_OF_MONTH[:n] | First day of the current month, shifted n months |
END_OF_MONTH[:n] | Last day of the month n months away |
START_OF_QUARTER[:n] | First day of the current quarter, shifted n quarters |
END_OF_QUARTER[:n] | Last day of the quarter n quarters away |
START_OF_YEAR[:n] | January 1 of the current year, shifted n years |
END_OF_YEAR[:n] | December 31 of the year n years away |
START_OF_WEEK and END_OF_WEEK follow the Week Start Day setting under Novigem Admin → Settings → General (Monday by default), so a rule’s idea of “this week” always matches the weekly leaderboard and weekly challenge resets. See General Settings.
Quarter and year tokens use calendar periods, not your org’s fiscal year. START_OF_QUARTER is January 1, April 1, July 1, or October 1. Fiscal-period tokens are not supported yet.
Date ranges
Novigem has no single “this month” token. A range is expressed as two conditions on the same field, which keeps the meaning of every operator unambiguous. Combined with signed offsets, this covers the relative dates you would reach for in a report filter:
| Report filter | Novigem conditions |
|---|---|
| THIS WEEK | ≥ START_OF_WEEK and ≤ END_OF_WEEK |
| LAST WEEK | ≥ START_OF_WEEK:-1 and ≤ END_OF_WEEK:-1 |
| THIS MONTH | ≥ START_OF_MONTH and ≤ END_OF_MONTH |
| NEXT MONTH | ≥ START_OF_MONTH:1 and ≤ END_OF_MONTH:1 |
| LAST 3 MONTHS | ≥ START_OF_MONTH:-3 and ≤ END_OF_MONTH:-1 |
| THIS QUARTER | ≥ START_OF_QUARTER and ≤ END_OF_QUARTER |
| LAST YEAR | ≥ START_OF_YEAR:-1 and ≤ END_OF_YEAR:-1 |
| LAST 30 DAYS | ≥ N_DAYS_AGO:30 and ≤ TODAY |
Example · Deals closing this quarter:
{
"conditions": [
{
"field": "CloseDate",
"operator": "greaterOrEqual",
"value": "START_OF_QUARTER"
},
{
"field": "CloseDate",
"operator": "lessOrEqual",
"value": "END_OF_QUARTER"
}
]
}Things to know
Comparisons happen on the date, not the time. On a Datetime field the time part of the record’s value is dropped before comparing. CloseDate greaterThan TODAY therefore does not match anything dated today itself, only tomorrow onward. If you mean “today or later”, use greaterOrEqual.
“Today” is the acting user’s today. Dates resolve in the time zone of the user whose save triggered the rule, exactly like a SOQL TODAY filter. A record saved at 23:30 in Tokyo and one saved at 09:00 in Los Angeles can land on different calendar dates. If your team spans time zones, prefer a wider window (N_DAYS_AGO:1) over an exact edge-of-day comparison.
Tokens are case-insensitive, though the Rule Builder writes them in upper case. today and TODAY behave identically.
Fixed dates must be ISO format, YYYY-MM-DD. Locale formats like 28-05-2026 or 05/28/2026 are rejected because they are ambiguous. The calendar picker handles this for you; only JSON authors need to care.
Unrecognized tokens never match. A misspelled token, an offset outside the supported range, or a token used on a field that is not a Date or Datetime causes the condition to evaluate as false. The rule does not error, and no points are awarded, so an invalid token shows up as a rule that quietly stops firing.
If a date rule is not awarding points, check the token spelling first. Then check the Ledger to confirm the rule is being reached at all.
Offset limits
Offsets are capped at roughly 100 years. Anything larger fails closed.
| Token family | Maximum offset |
|---|---|
N_DAYS_* | 36500 |
N_WEEKS_*, START_OF_WEEK, END_OF_WEEK | 5214 |
N_MONTHS_*, START_OF_MONTH, END_OF_MONTH | 1200 |
START_OF_QUARTER, END_OF_QUARTER | 400 |
START_OF_YEAR, END_OF_YEAR | 100 |
Common patterns
Reward advancing deals that close this quarter
- Object: Opportunity, Trigger Type: Update
- Conditions:
StageNameisChanged=trueANDCloseDategreaterOrEqualSTART_OF_QUARTERANDCloseDatelessOrEqualEND_OF_QUARTER
Keep close dates in the future
- Object: Opportunity, Trigger Type: Update
- Conditions:
CloseDateisChanged=trueANDCloseDategreaterThanTODAY - Rewards reps for pushing a stale close date forward rather than leaving it in the past.
Reward fast follow-up on new leads
- Object: Lead, Trigger Type: Update
- Conditions:
StatusisChanged=trueANDCreatedDategreaterOrEqualN_DAYS_AGO:2
Reward next-period pipeline building
- Object: Opportunity, Trigger Type: Update
- Conditions:
CloseDategreaterOrEqualSTART_OF_MONTH:1ANDCloseDatelessOrEqualEND_OF_MONTH:1
Related
- Rules field reference: all operators, condition groups, and actor modes
- Core Concepts: Rules: how rules award points
- General Settings: the Week Start Day setting
- Ledger: confirm what a rule actually awarded