The Workflow Library

Library / Lead routing / lead-routing-033

Route leads by postal code / zip using a lookup table (postal-to-territory)

Lead routingContactSales Hub ProfessionalAdvanced~45 min to buildalso needs Marketing Hub ProfessionalFull spec

This spec is filed under Sales Hub Professional, and one of its steps belongs to another subscription: add to static list needs Marketing Hub Professional. Both are required to build it as written.

Outcome. A lead's postal code decides its territory automatically, without a rep or manager manually re-checking country or state fields.

Workflow map Enrollment, branches and actions at a glance lead-routing-033
flowchart TD
    A[Form submitted with postal code] --> B[Hidden field maps postal code to Territory client-side]
    B --> C[Territory set on contact]
    C --> D[lead-routing-001 enrolls and rotates]
    E[Daily scheduled check] --> F{Territory unknown, postal code known?}
    F -->|Yes| G[Add to Needs postal-to-territory mapping list]
    G --> H[Sales ops updates mapping, bulk-imports Territory]
    H --> D
    F -->|No| E
action or delay branch public on every spec, paid or not

When to use it, when not to

  • UseUse it when territories are drawn at a finer level than country or state (specific zip or postal code ranges split between reps in the same city or region).
  • UseUse it as the enrichment step that feeds lead-routing-001, not as a replacement for it: this fiche's job is to fill Territory, lead-routing-001's job is to rotate once it is filled.
  • SkipDo not use it if territories already line up cleanly with country or state; branch directly on those default properties instead, see lead-routing-006.
  • SkipDo not expect a live, native postal-code lookup inside a single workflow step. HubSpot workflows do not have a built-in "look up this value in a table" action; this fiche uses a pre-built mapping applied before or at lead creation, not a real-time calculation, see Known pitfalls.
The preview ends here. Six sections are in the library. counted, not blurred
PrerequisitesEvery property with its label, internal name, type and options, plus the assets the workflow needs before you start.4 items
EnrollmentThe trigger, the criteria exactly as they are ticked in the UI, the re-enrollment rule and the suppression list.2 parts
StepsEach action in order with its parameters, its branches and its delays, written as you tick them.2 numbered actions
Known pitfallsTraps seen in production, each with what breaks and what to do instead.4 pitfalls
Test plan, variants and build specHow to prove it works in a test portal, where to look when it does not, the variants for other objects or tiers, and the YAML build spec.3 variants, 3 sections
FilesThe properties JSON creates the fields in one API call, the workflow JSON documents the build.PDF, Markdown, JSON
Install1 click. The installer creates the properties this spec declares and the workflow itself, switched off, then opens a task for the prerequisites that are assets rather than properties, such as a team, a static list or a marketing email. What it created is listed on the install page.1 click, switched off
Unlock the full library, 149 EUR

or the lead routing pack, 39 EUR

One-time, excl. VAT. 30-day refund, no questions asked. Founding prices until 31 October, then 199 and 59 EUR. Includes every spec added later, up to the full 500, and the one-click installer on the full library. Building on client portals? The agency licence at 449 EUR covers unlimited client portals.