Skip to main content

Rules and actions

The rules engine in Jadu Central is used to integrate a form with third party systems. Reusable templates are created to send submission data to these systems, the templates are then used in rules.

Using Jadu Central's rule engine, it is also possible to chain actions. This means it is possible to perform more actions on the result of the first. For example, a form can create a case and immediately transition it.

What is a Rule?

A rule consists of three key pieces of information:

WhenThis tells us when the rule will be evaluated. This can either be when the user reaches the end of the form or when the user submits the form.
And/OrWe can add conditions to our rules by adding multiple and/or blocks. A rule will only fire its actions if the conditions are satisfied.
ThenEach then block can be thought of as an action to fire. Then blocks are ran sequentially, starting with the first one. A Then block determines the type of action to be fired e.g. Create Case in Jadu Connect, and the template to use for this.

Adding a rule

Rules are responsible for firing actions when customers fill in your form.

To create a rule:

  1. Open the form, and click the Rules tab. Click the Create Rule button and the rule designer will be shown.
  2. Enter a title for the rule.
  3. Select when the rule will be run, either "when the user submits the form" or "when the user reaches the end of the form". Different actions should be run at different times. Different actions are associated with when the rule runs. For example, submitting data to Jadu Connect or sending an email can be done on submission, but making a payment can only be done on reaching the end of the form.
  4. In the Then block, select the type of action you wish to fire. The using template dropdown will appear. Either select an existing template, or click Create new.... The template will differ depending on the action chosen.
  5. Optionally add some conditions to your rule, to ensure it only runs in certain circumstances e.g. for signed in customers only, or if a particular question was answered.
  6. Enable the rule by clicking the Enable toggle.
  7. Click the Save button to save your changes. The rule designer will close, and your rule will be listed on the page.

Rules before submission

Some rules are evaluated before submission. These can fire actions that affect the 'Review' page of the form. Payment actions must be taken before the form is submitted.

A payment action will change the 'Review' page, by adding some text to say that the payment is required, and changing the label of the button from Submit Form to Proceed to Payment.

Rules after submission

Some rules are evaluated after submission, which can send the submitted data to other systems.

An example of an action that runs after submission is creating a case in Jadu Connect. The form collects all data necessary from the customer, and the Connect action sends this to Jadu Connect when the user submits the form.