Conditional Logic Rules

Raisely supports the use of conditional logic in certain cases to help you describe conditions behaviour of records in Raisely. These get used in:

  • Payment Routing
  • Matched Giving
  • Badges

Logic is defined by one or more rules of the form

{ 
  "property": "profile.path", 
  "comparison": "eq", 
  "value": "team-sam", 
  "required":  true
}

property is the name of the property on the model that is to be checked
comparison specifies a logical operator to use
value is the value to compare the property to
required optionally indicates that this rule must always match

You can specify properties in nested records with javascript dot paths (eg user.fullName) and you can specify custom fields by including private or public in the path (eg private.age) to check a private field called age

When you have multiple conditions, you can set the conditions attribute to either ANY or ALL to set how the rules are applied.

Comparisons

ComparisonMeaning
eqEqual
neqNot equal
gtGreater than
gteGreater than or equal
lteLess than or equal
ltLess than
presentThe property is present
(javascript truthy)
absentThe property is absent
(javascript falsey)

For present and absent comparisons, the value in the rule is ignored.