Managing Rules
Publishing Rules

Publishing rules

Once you've created a rule, you will need to publish it to make it available for use in your applications. Publishing a rule enables you to run it via the Rulebricks API, turn it into a Rulebricks form, and unlock it for use in Rule Flows.

Every time you publish a rule, a new version is created, and the changes you've made since your last publish are saved. You may publish and unpublish your rule as many times as you like.

Open the publish menu

To publish your rule, open the rule you want to publish in the Rulebricks editor. In the top right corner of the rule editor, you'll see a "Publish" button. Click this button to open the publish menu.

Publish Button

Publish your rule

In the publish menu, you'll see a history of prior versions.

When you're ready, click the "Publish" button to publish your rule.

Publish Menu

Rule versioning

Publishing your rule creates a new version, as you'll see appear on the "History" section of the Publish menu. Versions are simply annotated by an increasing number, like v1, v2, etc.

Differences between each versions are precisely tracked and can both be reviewed visually, by clicking the colored tags that appear in the details for each version, as well as be used to reconstruct your rule at a prior version as an API target.

To target specific prior versions of your rule, use the slugs that appear on the right side of each version in the history– simply append the number to the URL. For example, in the image from above, rather than targeting the rule using the slug "hlDPsJMVGQ", which would target the latest version of the rule, I'd simply use "hlDPsJMVGQ/2" to target the second version of the rule. Incorporating version numbers directly into rule slugs allows you to create development & release processes around your rules.

To the far right of each version listed in the history UI, you'll notice a clock icon– this allows you to "rollback" a rule to a prior version. It is important to bear in mind this can be a highly destructive operation– any versions between your current edits and the version you're rolling back to will permanently be lost as targets.


That's all there is to it. Note that any further changes you make to your rule in the editor will not be reflected in the published version until you publish another version. You are free to publish and unpublish your rule as many times as you like.

Note that new versions of your rule will take effect roughly 1 minute after you publish them. This is because we'll need to update our caches to reflect the latest version of your rule.