Broadleaf Microservices
  • v1.0.0-latest-prod

Defining Rules

Table of Contents

Metadata

To make it easy for admin users to quickly write rules, Broadleaf provides a handy RuleBuilderField field component in the Metadata library.

On the entity which holds the rule string, you can simply define the field as a RuleBuilderField, and the frontend will display a helpful component that guides the user on how to build the rule.

Here’s an example from the Offer entity’s metadata:

Rule builder example

As you can see, the concept of a "rule" is abstracted into user-friendly building blocks.