Skip to main content

Chaining actions

Jadu Central's rules engine allows you to chain two actions together. This means the returned reference of one action can be passed into another action.

note

To chain action 1 to action 2, both must be in the same rule, and action 1 must run before action 2.

Example: Attach a file to a case created by the form

A common use for chaining actions is to create a case, and then attach files to it.

We can do this in the following way:

  1. Create a rule with a Create case action.
  2. In the same rule, click the And link under the last Then block, This will add a second Then block.
  3. Set the type for this second action to be Attach File under Jadu Connect.
  4. When asked for a template, choose Create new.... We'll then be taken to the template builder for this action.
  5. Set the title of your template, and click Next.
  6. For the case reference mapping, tick Use a value from a previous action. This tells Jadu Central that we'll need to specify this when we add the template to a rule.
  7. Enable the toggle for each file upload question on your form where you want to attach those files to the Jadu Connect case. Optionally enable Generated PDF (if present) if your from is configured to run a PDF Generation action prior to this action, and you want to pass the PDF to the case.
  8. Leave the Run as signed in user toggle enabled. This ensures that the action is done by the signed in user, and not the user associated with the API key in Jadu Connect.
  9. Click Save to create the template. This will be populated into the Then block.
  10. Because we did not set the case reference mapping, Jadu Central will now ask us to pick a previous action to get this from. Select the create case action from (1) and confirm.
  11. You'll see that your attach file action has been added to your rule. Notice the chain button in the Then block. This denotes that it is chained to a previous action. Hovering over the button shows us which action it is chained to. Clicking the button allows you to change the chained action.
  12. Save the rule.