Automation case / 04 · Deterministic routing & designed uncertainty

Automating inbound lead validation and routing

A fictional automation case. The process—stages, ownership and closure—is in the Process Architecture case; this one is only about executing the routing reliably.

Fictional scenario

Independently created. Contains no employer or client implementation detail, internal names or figures.

01The outcome

Clear leads routed automatically; unclear ones stopped at a named review with the reason; every lead has an owner or a visible reason why not.

The reality

Routing rules are clear for most leads—but ambiguous geography, existing customers and missing owners make the automation guess.

Architecture question

Which routing decisions are deterministic, and where must the automation stop and ask?

Key decision

Give every routing check a deterministic outcome and an explicit “when unsure” path, instead of defaulting to a catch-all queue.

ContextWeb forms from many countries create leads that must reach the right subsidiary and owner within minutes. Most can be routed by country and product line. Some cannot: the country field disagrees with the email domain, the company is already a customer, or no owner is mapped for a new region.

Trigger

A form submission creates a lead.

Done means
  • The lead has an owner, or is in review with a reason
  • Existing customers reach their account owner
  • Notification sent once
  • Rerouting is recorded, not repeated
Systems and partiesWebsiteCRMMarketing automation

02The reality · current state

What the automation does today.

  • Ambiguous leads are routed to a default queue nobody watches
  • Existing customers are routed as new business
  • A rerouted lead triggers the welcome sequence again
  • Failed assignments are silent
  • Re-running routing after a rule change reassigns worked leads

03Target steps

Each step with its mode, its actor and its guard.

  1. 01
    Validation

    Required fields, consent and plausibility.

    AutomatedCRM
  2. 02
    Deduplication

    Match against leads, contacts and customer accounts.

    AutomatedCRMGuardEmail + company match
  3. 03
    Geography resolution

    Country from form, domain and phone; agreement required.

    AutomatedCRM
  4. 04
    Subsidiary resolution

    Country + product line → selling company.

    AutomatedCRM
  5. 05
    Owner assignment

    Territory rule → owner; capacity respected.

    AutomatedCRMGuardAssign once; reroute explicitly
  6. 06
    Notification

    Owner notified once; SLA clock starts.

    AutomatedCRM

04Key dimension · Deterministic routing & designed uncertainty

Every check has an answer—including “not sure”

The deterministic outcome runs automatically. The uncertain one stops at a person, with the reason.

Routing checks: deterministic outcome and what happens when unsure
CheckDeterministic outcomeWhen unsure
ValidationAutomated Complete and plausible → continueHuman Implausible data → held, not deleted
Duplicate customerAutomated Known account → account ownerHuman Probable match → match review
GeographyAutomated Form, domain and phone agree → countryHuman Disagree → regional review
SubsidiaryAutomated Country + product line → companyHuman No mapping → configuration owner
OwnerAutomated Territory rule → ownerHuman No owner or at capacity → team lead

A default catch-all queue is not a routing rule. It is an unowned exception.

05Execution safety

If it can run twice, it is designed to run twice.

Execution patternSynchronous validation + asynchronous routing job per lead

The submitter must not wait for routing, but routing must finish within minutes and be re-runnable.

Routing key
Lead ID + rule version
Assign-once guard
Worked leads are never reassigned by a rerun
Reroute
An explicit action with a reason; no welcome sequence again
Unsure path
Every check can stop in review with its reason

06Exceptions & recovery

Not every failure is a retry.

  • Ambiguous geography ValidationSignals disagreeRegional review with the signals shownRegional sales operations
  • Probable existing customer DuplicateMatch score in the review bandMatch review; no new-business routingSales operations
  • No owner mapped ConfigurationTerritory lookup emptyTeam lead queue; configuration ticketConfiguration owner
  • Assignment service slow Transient · retryTimeout on assignmentRetry with the same keyAutomation

07The trade-offs

Credible options, judged against these premises.

Rejected

Round-robin to a default queue

One region, one product

Cost: Hides every uncertain lead
Rejected

Manual triage for all leads

Very low volume

Cost: Slow response; rules everyone knows done by hand
Selected

Deterministic checks with declared review paths

Many regions and lines

Cost: Needs owners for each review path

08The second layer

Questions that change the design.

Rule vs judgement

  1. What is deterministic, and what is judgement?
  2. What happens when geography is ambiguous?
  3. What happens with a duplicate customer?

Change

  1. How is rerouting handled?
  2. What happens after a rule change?
  3. Can the process safely re-run?

Visibility

  1. How is failed assignment surfaced?
  2. Who owns each review path?
  3. When does the response clock start?

09Decisions & outputs

What the work produces.

  1. 01Routing decision table
  2. 02Review paths with owners
  3. 03Assign-once guard
  4. 04Reroute action
  5. 05Failed-assignment view