Search HoldMyTwist

Browse all posts

Make Router: catch records that match no route

Add a backup way in make free. Try a match and non-match status using dummy data. See which path is taken.

A paper sorter sending envelopes along two branches into separate trays

Filters can cause an orphan situation. The Make Router fallback route (opens in a new tab) is used for records that don't meet any of the other routes.

A Router can execute all normal (filter) matching routes. Those routes are not exclusive based on their sequence.

If you only want one route per record. For that use Make's If-else module (opens in a new tab) which will process the first true condition or else if none are true. Order more specific conditions before the more general ones.

Before you start

First, you will need an account on Make. You can create a Make Free account (opens in a new tab) or login. For this exercise you can do it without integrating another app.

This Make Free is setting the status of a fictional status to a result variable. No messages are sent or any other app updated. Leave the scenario as Inactive.

1. Build the two branches

  1. Open up Scenarios
  2. Click on Create scenario
  3. Change the name of the scenario (top left) to Router fallback practice
  4. Drop in Tools > Set variable
  5. For the variable name: status
  6. For variable value: pending
  7. Click save for the module
  8. Drop in after Tools (Flow Control) > Router
  9. For the first branch, drop in Tools > Set variable
  10. For the variable name: route_result
  11. For the variable value: ready
  12. For the second branch, drop in (Tools) > Set variable
  13. Variable name: same as above
  14. Variable value: needs_review

2. Filter the approved branch

  1. In first branch choose the connection and click on it. This will bring you to the Set up a filter.
  2. For label select Approved
  3. For fallback select No
  4. Choose status from first tools module in first condition input field
  5. Leave Text operators: Equal to. For input field select approved and click on Save button.

Full Make editor showing the Approved route condition status equal to approved

Full Make editor showing the Approved route condition status equal to approved
Open full-size image

Watch out

The non-filter branch of ordinary branch can receive records even if there is another path. If you want to receive all of them in catch-all branch, just specifically choose the fallback. And in this exercise you just leave the condition of it blank, so you can receive all the unmached status to review result.

3. Set the fallback branch

The user click the second branches connection. The user set the label to Needs review. Set the route as a fallback. Yes. The user doesn't set any fields for the conditions. The user saves the filter and saves the scenario. Connection should be fallback.

Full Make editor with Yes selected for the Needs review fallback route

Full Make editor with Yes selected for the Needs review fallback route
Open full-size image

4. Test both outcomes

  1. run once. Status still pending.
  2. Verify that Approved branch has no records passing. Verify that fallback's Tools module executes. Look into the result bubble. Check route_result: needs_review.
  3. Set value for first module to be approved. Save. Run. Now, the first branch should yield ready. The fallback shouldn't execute.
  4. If you want to do the first example again, set it back to pending. Save.

Full Make editor showing pending blocked by Approved and processed by Needs review fallback

Full Make editor showing pending blocked by Approved and processed by Needs review fallback
Open full-size image

If the wrong branch runs

Make's router is essentially serial, it runs routes in sequence. You can see how that works and how fallbacks are handled in the Router documentation (opens in a new tab). You'll need both practice cases to work as intended before external actions will be plugged in.

Take a look at the output of the first tools module. How does it actually compare to the filter text (spelling, extra spaces, etc). Ensure that the token is from the first module. And that the second branch clearly indicates it's fallback.

Don't have an account? Get started with Make Free (opens in a new tab)

For filter controls check out beginner's guide to filters

Share this post