Condition Reference
All valid field and operator values when building automation rule conditions in PrimeCal.
Condition Fields
| Enum Value | Wire String | Data Type | Notes |
|---|---|---|---|
EVENT_TITLE | event.title | string | The event's title/name |
EVENT_DESCRIPTION | event.description | string | Event description body |
EVENT_LOCATION | event.location | string | Event location string |
EVENT_NOTES | event.notes | string | Event notes field |
EVENT_DURATION | event.duration | number | Duration in minutes |
EVENT_IS_ALL_DAY | event.is_all_day | boolean | True if event is all-day |
EVENT_COLOR | event.color | string | Event color identifier |
EVENT_STATUS | event.status | string | Event status |
EVENT_CALENDAR_ID | event.calendar.id | number | ID of the parent calendar |
EVENT_CALENDAR_NAME | event.calendar.name | string | Name of the parent calendar |
WEBHOOK_DATA | webhook.data | dynamic | Dot-path access into webhook JSON payload (e.g., webhook.data.order.status) |
NOTIFICATION_TYPE | notification.type | string | The dispatched notification's eventType (e.g. event.reminder). Only available on notification.dispatched rules. |
NOTIFICATION_CHANNEL | notification.channel | array | Channels the notification was actually dispatched to (e.g. ["inapp", "email"]). Only available on notification.dispatched rules. |
Notification Fields
notification.type and notification.channel map onto the well-known payload shape emitted by NotificationsService.publish() rather than a raw dot-path: the payload's eventType field is exposed as notification.type, and its channels array as notification.channel (use contains/in/not_in to test membership, since it's an array). Any other notification.* path (e.g. notification.data.minutesBefore off an event.reminder payload's data object) falls through to dot-path traversal, mirroring webhook.data.* exactly. See Trigger Reference for the full notification.dispatched trigger and a worked example.
Condition Operators
String Operators
| Enum Value | Wire String | Description |
|---|---|---|
CONTAINS | contains | Field contains the value as a substring (case-insensitive) |
NOT_CONTAINS | not_contains | Field does not contain the value |
MATCHES | matches | Field matches the value as a regex pattern |
NOT_MATCHES | not_matches | Field does not match the regex pattern |
EQUALS | equals | Field is exactly equal to the value |
NOT_EQUALS | not_equals | Field is not equal to the value |
STARTS_WITH | starts_with | Field starts with the value |
ENDS_WITH | ends_with | Field ends with the value |
IS_EMPTY | is_empty | Field is null, undefined, or empty string |
IS_NOT_EMPTY | is_not_empty | Field has a non-empty value |
Numeric Operators
| Enum Value | Wire String | Description |
|---|---|---|
GREATER_THAN | greater_than | Field > value |
LESS_THAN | less_than | Field < value |
GREATER_THAN_OR_EQUAL | greater_than_or_equal | Field >= value |
LESS_THAN_OR_EQUAL | less_than_or_equal | Field <= value |
Boolean Operators
| Enum Value | Wire String | Description |
|---|---|---|
IS_TRUE | is_true | Field is truthy |
IS_FALSE | is_false | Field is falsy |
Array Operators
| Enum Value | Wire String | Description |
|---|---|---|
IN | in | Field value is in the provided list |
NOT_IN | not_in | Field value is not in the provided list |
IN_LIST | in_list | Alias for in (frontend compatibility) |
NOT_IN_LIST | not_in_list | Alias for not_in (frontend compatibility) |
Condition Logic
Conditions within a rule can be combined using:
| Enum | Wire String | Scope | Description |
|---|---|---|---|
ConditionLogic.AND | AND | Rule-level | All conditions must pass (default) |
ConditionLogic.OR | OR | Rule-level | Any condition must pass |
ConditionLogicOperator.NOT | NOT | Per-condition | Negates the individual condition |
The rule-level logic is stored on automation_rules.conditionLogic. The per-condition NOT modifier is stored on automation_conditions.logicOperator.
Condition Schema (DB)
automation_conditions
id integer PRIMARY KEY
ruleId integer NOT NULL FK → automation_rules.id ON DELETE CASCADE
field varchar(100)
operator varchar(50)
value text
groupId varchar(36) -- for grouping related conditions
logicOperator varchar(10) -- AND | OR | NOT
order integer -- display order
createdAt timestamp
updatedAt timestamp
Notes
event.duration: Computed at evaluation time as(endTime - startTime)in minutes. Use numeric operators.webhook.data: Supports dot-notation path traversal at evaluation time. The full path is stored invalue, e.g.,webhook.data.customer.tier. Null-safe — missing paths evaluate as empty/null.notification.type/notification.channel/notification.data.*: Only resolvable on rules whosetriggerTypeisnotification.dispatched(see Trigger Reference). Evaluating them on any other trigger type throws, the same waywebhook.data.*throws outsidewebhook.incomingrules.IN/IN_LIST:valueis stored as a JSON array string, e.g.,["Work","Family"].