Skip to content

Playground

Write any policy rule and test it against your own data. Edit both panes and click Run to evaluate.

Interactive Example

Policy Rule
Test Data (JSON)
A **User** gets registered
if __email__ of **User** is a valid email
and __phone__ of **User** is a valid phone
and __name__ of **User** is not empty.
{
"User": {
"email": "alice@example.com",
"phone": "+1-555-123-4567",
"name": "Alice"
}
}
A **user** passes the age check
if __age__ of **user** is greater than or equal to 18.

A **user** passes the credit check
if __credit_score__ of **user** is greater than 700.

A **user** qualifies for loan
if the **user** passes the age check
and the **user** passes the credit check.
{
"user": {
"age": 30,
"credit_score": 750
}
}
A **Employee** qualifies for promotion
if __hire_date__ of **Employee** is older than 2 years
and __department__ of **Employee** is in ["engineering", "product", "design"]
and __performance__ of **Employee** is equal to "exceeds expectations".
{
"Employee": {
"hire_date": "2021-03-15",
"department": "engineering",
"performance": "exceeds expectations"
}
}

Copy any example above into the playground, adjust the data, and run it!