Route Leads by State

Presets that send each state to the destinations that serve it.

Most home-services destinations only cover certain states. This guide builds presets that send each state's leads to the destinations that serve it, with everything else going to your general list.

The example is a roofing offer. TX and FL leads go to two destinations, and AZ leads go to a third.

What you'll need

Create a preset for each group of states

A preset is a saved rule. It does nothing until a branch uses it in step 2.

  1. Go to Routing and open the Presets tab.
  2. Click New preset and type a Name, for example Texas and Florida.
  3. Click Add rule and pick Field, location or parameter.
  4. In the new row, pick the field state, change the comparison to is one of, and type TX, FL as the values.
  5. Click Create preset.
  6. Repeat for Arizona, with AZ as the only value.

New presets made here are shared with Every routing setup (shared), so you can use them in any routing setup.

You do not have to worry about how the state was written. Form answers such as Texas and tx are turned into TX when the lead arrives.

The lead sendsThe lead holdsWhere it goes with these presets
TX, tx or TexasTXBranch Texas and Florida
arizonaAZBranch Arizona
OhioOHEverything else
Tex. or a typoNo state, and a warningEverything else
NothingNo stateEverything else

Full state names and two-letter codes are recognised in any mix of capitals, and so are DC, Puerto Rico, Guam, the Virgin Islands, American Samoa and the Northern Mariana Islands. Anything else is not kept as the state: the lead is still saved and routed, its row in Lead logs shows a warning, and the open lead says Some answers did not come through as expected. with the answer it could not read.

Answered state, or the state from the IP?

state is what the person told you. To use where their connection came from instead, pick State or region, from the IP in the field list. The two can differ, so choose one and use it for every preset in the routing setup.

Add a branch for each preset

A branch pairs one preset with the destinations that should be offered its leads.

  1. Go to Routing and open your routing setup.
  2. Click Add a branch.
  3. Under Which leads, keep Use a saved preset selected and pick Texas and Florida.
  4. Under Offer to, in order, use Add a destination to pick Roofing Partner A, then Roofing Partner B.
  5. Click Add branch.
  6. Repeat for Arizona, adding Roofing Partner C.

If a form attached to this routing setup does not send state, the sheet warns you that its leads will never match this branch.

Check the order and Everything else

Branches are checked top to bottom, and the first match wins. The number on each branch is its place in that order. Drag a branch to move it. These two presets do not share a state, so their order does not matter here, but it will if you later add a preset that overlaps.

Branches in the List view

Below the branches is Everything else, for leads no branch matched, including leads with no state or one EventsIQ did not recognise. Add your general destinations there. With nothing in it, those leads are saved but not sold.

Everything else is not a fallback

A lead that matches a branch stays in that branch. If Roofing Partner A and Roofing Partner B both decline a TX lead, it is not passed to Everything else. If you want it to go on to your general destinations, add them to the end of that branch's own list as well.

Test each state

The test sends nothing to any destination, logs nothing and does not count against a cap.

  1. Click Test a lead at the top. The Test tab opens on the right.

  2. Keep Type answers selected and enter this under Answers, as JSON:

    json
    1{
    2    "firstname": "Priya",
    3    "lastname": "Shah",
    4    "state": "TX"
    5}
  3. Click Run test. You should see It matches branch 1: Texas and Florida., with your two destinations under Offered to, in order.

  4. Change the state to FL and run it again. It should match the same branch.

  5. Change the state to AZ and run it again. It should match branch 2: Arizona.

  6. Remove the state line and run it once more. You should see No branch matched., and Everything else takes the lead.

Type the code, as a lead will hold it

The Test tab uses your answers exactly as you type them, before the clean-up a real lead gets. So type TX rather than Texas here. Capitals do not matter. To test with a real lead's answers, pick A past lead instead of Type answers.

Branch by branch in the result says what each branch decided. If the routing setup is still paused and all four tests look right, click Go live at the top.

Troubleshooting

Every lead goes to Everything else
  • The form does not send state. A rule on a missing field is false, not an error, so the branch is passed over. Open the Forms tab in the routing setup to see what each form is missing.
  • The form's question is not set to the state field. On a website form, check Destinations receive it as on that question.
  • The branch's Branch on switch is off, or the preset's Preset on switch is off.
Go live says there are problems
  • This branch has no destinations. Add one to the branch, or remove the branch.
  • Preset "Arizona" has no rules and can never match. Open the preset and add a rule. A preset with no rules never matches, on purpose.
A lead matched the right branch but was not sold

Everyone in that branch declined. Open the lead in Activity → Lead logs and read What happened, in order. If you want these leads to reach more destinations, add them to the end of the branch.

A lead went to the wrong branch

Two presets probably share a state, and the first one won. Run the same answers under Test a lead, read Branch by branch, and drag the branch you want higher.

Where to go next

Was this page helpful?