Automation Answers

Why Is My Make Router Using the Wrong Route?

A Make router sends bundles down the wrong route when route filters overlap, compare text instead of numbers, meet blank values, or run in an unexpected order.

By Automation Ace Editorial Team · Reviewed for technical accuracy by Troy Tessalone · Published · Updated

Short answer

Why Is My Make Router Using the Wrong Route?

A Make router passes each bundle to every route whose filter allows it, one route after another, in the router's route order. Bundles go down the wrong route, several routes, or none when filters overlap, compare numbers or dates as text, or meet blank or differently formatted values. Check each filter against the live bundle, make the conditions exclusive, and set a fallback route for anything that matches nothing.

Common causes

  • Two route filters can both be true, so the bundle runs down both routes.
  • A number or date is compared with a text operator, so values sort the wrong way.
  • The mapped value is empty in some runs, so no filter passes.
  • Extra spaces or different capitalization stop an equals comparison from matching.
  • Routes run in an order you didn't expect, so a later route sees data an earlier route already changed.

Diagnostic steps

  1. In the run history, click the bundle on the router and note the exact value each filter checked.
  2. Use numeric and date operators for numbers and dates, and clean values with functions like trim() and lower() first.
  3. Rewrite filters so they can't overlap, for example less than 1000 and greater than or equal to 1000.
  4. Mark one route as the fallback route so bundles that match nothing still go somewhere you can see.
  5. Set the route order on purpose when one route depends on another.

Example

A router sends high-value leads to sales and others to marketing. A lead worth 1,200 goes to marketing because the filter compares the text 1,200 with the number 1000. Converting it with parseNumber() and using a numeric operator routes it to sales.

Caveats

Every route a bundle enters uses operations, so overlapping routes cost more as well as causing duplicates. For many branches based on one value, a switch() function or a lookup table can be simpler than many routes.