Objects
What are Objects?

Objects in Rulebricks

You've got a customer object with tier, credit_score, and lifetime_value. You'll use those fields in a dozen rules. Do you really want to type them out each time?

Objects are team-level schema definitions that provide field suggestions when you create rules or contexts. Define your data structure once, and every rule you build can pull from it.

Objects Team Tab

Rulebricks Admins can find this tab within the Team tab on your dashboard.

Data Clarity

Field suggestions

When building a rule, select an Object and its fields appear in the schema editor. No retyping, no typos.

Map Fields from Object

Automatic Dynamic Values

If your Object uses JSON Schema with enum fields, Rulebricks extracts those values and creates dropdown options in your rule conditions.

Enum Benefits

Consistency

When everyone builds rules from the same Objects, field names stay consistent across your workspace. This way, you'll never run into issues where rule one may have a schema like:

{
  "customer_id": "cust_12345",
  "order_total": 299.99,
  "is_priority": true
}

And rule two, designed elsewhere, uses:

{
  "customerId": "cust_12345",
  "total": 299.99,
  "priority": true
}

Accepted Formats

Objects can be defined using both JSON Schemas, or just an example JSON object. If you're planning to use our objects feature, it's worth noting using JSON Schemas has substantial benefits across our platform that may not be immediately obvious.

Even if you don't have a unified JSON schema anywhere, we make it really easy to make one using our "Smart Import" tool.

JSON Schema — Full schema definitions with types, validation rules, and enums

{
  "type": "object",
  "properties": {
    "customer_tier": {
      "type": "string",
      "enum": ["bronze", "silver", "gold", "platinum"]
    },
    "credit_score": {
      "type": "number",
      "minimum": 300,
      "maximum": 850
    }
  }
}

JSON Object — Plain example objects when you just want field suggestions without full validation

{
  "customer_id": "cust_12345",
  "order_total": 299.99,
  "is_priority": true
}

Rulebricks will automatically detect which format you're using.

Objects vs. Contexts

Two features that may initially appear somewhat similar on our platform are Objects and Contexts.

The Objects described here are designed for bringing the shape and fields of business objects that may live elsewhere into Rulebricks for consistency.

The Contexts feature, discussed later in this documentation, while able to create a view of your data relevant for decision making in a similar way, is designed exclusively for decisions where data arrives over time. Contexts are stateful and have lifespans associated with them.