Skip to main content
Was this helpful?

Condition Reference

All valid field and operator values when building automation rule conditions in PrimeCal.

Condition Fields

Enum ValueWire StringData TypeNotes
EVENT_TITLEevent.titlestringThe event's title/name
EVENT_DESCRIPTIONevent.descriptionstringEvent description body
EVENT_LOCATIONevent.locationstringEvent location string
EVENT_NOTESevent.notesstringEvent notes field
EVENT_DURATIONevent.durationnumberDuration in minutes
EVENT_IS_ALL_DAYevent.is_all_daybooleanTrue if event is all-day
EVENT_COLORevent.colorstringEvent color identifier
EVENT_STATUSevent.statusstringEvent status
EVENT_CALENDAR_IDevent.calendar.idnumberID of the parent calendar
EVENT_CALENDAR_NAMEevent.calendar.namestringName of the parent calendar
WEBHOOK_DATAwebhook.datadynamicDot-path access into webhook JSON payload (e.g., webhook.data.order.status)
NOTIFICATION_TYPEnotification.typestringThe dispatched notification's eventType (e.g. event.reminder). Only available on notification.dispatched rules.
NOTIFICATION_CHANNELnotification.channelarrayChannels 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 ValueWire StringDescription
CONTAINScontainsField contains the value as a substring (case-insensitive)
NOT_CONTAINSnot_containsField does not contain the value
MATCHESmatchesField matches the value as a regex pattern
NOT_MATCHESnot_matchesField does not match the regex pattern
EQUALSequalsField is exactly equal to the value
NOT_EQUALSnot_equalsField is not equal to the value
STARTS_WITHstarts_withField starts with the value
ENDS_WITHends_withField ends with the value
IS_EMPTYis_emptyField is null, undefined, or empty string
IS_NOT_EMPTYis_not_emptyField has a non-empty value

Numeric Operators

Enum ValueWire StringDescription
GREATER_THANgreater_thanField > value
LESS_THANless_thanField < value
GREATER_THAN_OR_EQUALgreater_than_or_equalField >= value
LESS_THAN_OR_EQUALless_than_or_equalField <= value

Boolean Operators

Enum ValueWire StringDescription
IS_TRUEis_trueField is truthy
IS_FALSEis_falseField is falsy

Array Operators

Enum ValueWire StringDescription
INinField value is in the provided list
NOT_INnot_inField value is not in the provided list
IN_LISTin_listAlias for in (frontend compatibility)
NOT_IN_LISTnot_in_listAlias for not_in (frontend compatibility)

Condition Logic

Conditions within a rule can be combined using:

EnumWire StringScopeDescription
ConditionLogic.ANDANDRule-levelAll conditions must pass (default)
ConditionLogic.ORORRule-levelAny condition must pass
ConditionLogicOperator.NOTNOTPer-conditionNegates 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 in value, e.g., webhook.data.customer.tier. Null-safe — missing paths evaluate as empty/null.
  • notification.type / notification.channel / notification.data.*: Only resolvable on rules whose triggerType is notification.dispatched (see Trigger Reference). Evaluating them on any other trigger type throws, the same way webhook.data.* throws outside webhook.incoming rules.
  • IN / IN_LIST: value is stored as a JSON array string, e.g., ["Work","Family"].