Customer & Sales package

Lead routing and enrichment

Enrich each inbound lead, score it with a routing table, create it in the CRM with its territory owner, and alert sales or start nurture.

Headless / APIIntermediate~15 min setupv1.0.0

About this package

What it does

Lead routing and enrichment handles every inbound lead the moment it arrives. Your website or forms tool posts the lead (email, name, company, country, company size, source and message) to the workflow; nobody has to triage a shared inbox.

The workflow takes the email domain and asks your enrichment service for the company's industry, size band, employee count, revenue and LinkedIn page. The Territories table maps the country to a region, owner and CRM queue, with a Rest of world row for anything not listed. The Lead score & routing decision table turns company size, industry, region and source into a segment, a score and a priority.

The lead is created in the CRM with its owner and score. Sales-ready leads (score 60 or more by default) are emailed to the owner with the context they need for first contact; the rest are added to the territory's nurture list in your marketing platform. Adapt the scoring rules, the territories and the three API calls to your stack.

Headless / API

Headless: your website or forms tool posts each new lead to the start API or an inbound webhook.

Another system starts it over REST or an inbound webhook. No UI is needed; people only appear where a decision needs a human.

The flow

Step by step

  1. 1

    Lead received

    The website or forms tool posts the email, name, company, country, employees, source and message.

  2. 2

    Enrich the company

    The email domain is sent to the enrichment service for industry, size band, employees, revenue and LinkedIn page.

  3. 3

    Find the territory

    The Territories table maps the country to a region, owner and CRM queue, with a Rest of world fallback.

  4. 4

    Score and segment

    The Lead score & routing decision table returns the segment, score and priority.

  5. 5

    Create in the CRM

    The lead is created with its owner, queue, score and segment.

  6. 6

    Alert or nurture

    Sales-ready leads are emailed to the owner; the rest join the territory nurture list.

Lead routing — An inbound lead from the website or forms tool is enriched, scored and routed: it is created in the CRM with its territory owner; sales-ready leads are emailed to the owner, the rest join a nurture list. The same canvas you get in the designer after installing.

Forms

Inputs and task forms

The inputs a caller passes when it starts a run, and the forms people complete when the process needs a decision.

Start inputs

Lead routing

Passed by the calling system

Email * email · emailname@company.comWork email of the lead
First name first_name · textFirst name
Last name last_name · textLast name
Job title job_title · textJob title as entered on the form
Company * company · textCompany name as entered on the form
Country * country · textCountry (ISO code, e.g. NZ, US)
Employees employees · number0Company size from the form; replaced by the enriched value when available
Source * source · textLead source: demo_request, contact_form, webinar, content_download, event
Message message · textFree-text message from the form
Campaign utm_campaign · textCampaign tag from the landing page
Sales-ready score sales_ready_score · number0Score at or above which a lead goes straight to sales

Headless

Call it from your systems

Every workflow can be started over REST, MCP or the CLI, whatever its trigger, with the sample input below. Runs start straight away on the published version; replace <workflow id> with the id the install created.

REST

shell
curl -X POST "$USERTASKS_URL/api/v1/workflows/start" \
  -H "Authorization: Bearer $USERTASKS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"workflow_id":"<workflow id>","variables":{"email":"ana.ruiz@tailwindtraders.example.com","first_name":"Ana","last_name":"Ruiz","job_title":"Head of Operations","company":"Tailwind Traders","country":"AU","employees":500,"source":"demo_request","message":"We want to automate store onboarding across 40 sites.","utm_campaign":"ops-automation-q4"}}'

CLI

shell
usertasks workflows inputs <workflow id>          # the start form: keys, types, required
usertasks workflows run <workflow id> --input email=ana.ruiz@tailwindtraders.example.com --input first_name=Ana --input last_name=Ruiz --input job_title="Head of Operations" … --wait

Inbound webhook

shell
usertasks webhooks create <workflow id>          # prints the hook slug and secret once
curl -X POST "$USERTASKS_URL/api/webhooks/inbound?hook=<slug>" \
  -H "Authorization: Bearer <webhook secret>" -H "Content-Type: application/json" \
  -d '{"email":"ana.ruiz@tailwindtraders.example.com","first_name":"Ana","last_name":"Ruiz","job_title":"Head of Operations","company":"Tailwind Traders","country":"AU","employees":500,"source":"demo_request","message":"We want to automate store onboarding across 40 sites.","utm_campaign":"ops-automation-q4"}'

What's included

10 assets, ready to adapt

TypeNameDetails
Email templateNew lead assignedSent to the territory owner when a sales-ready lead is assigned to them.
Data tableTerritoriesSales territory by country: region, the owning rep and the CRM queue. Countries not listed go to the Rest of world row (country code "*").
IntegrationCRM
IntegrationEnrichment service
IntegrationMarketing platform
API referenceAdd to nurture listPOST /marketing/lists/{{list_id}}/members — Add the contact to a marketing nurture list so it receives the nurture sequence.
API referenceCreate leadPOST /leads — Create or update the lead in the CRM with its score, segment and owner.
API referenceEnrich companyPOST /enrichment/company — Firmographics for a company from its email domain: industry, size band, employee count, revenue and LinkedIn page.
Decision tableLead score & routing9 rules — Segment, score and priority for an inbound lead from company size, industry, region and lead source. First matching rule wins.
WorkflowLead routing19 steps — An inbound lead from the website or forms tool is enriched, scored and routed: it is created in the CRM with its territory owner; sales-ready leads are emailed to the owner, the rest join a nurture list.

Territories · 10 sample rows

Country codeCountryRegionOwnerOwner emailCRM queueNurture list

Requirements

What you connect it to

Credentials never travel in a package. The install wizard asks for what your environment must provide, or installs it incomplete until you finish setup.

Needs

  • REST API — A REST API integration: set its base URL and credentials on install.
  • Inbound webhook — An inbound webhook created for the workflow, so other systems can start it.
  • Email (optional) — Email delivery configured for the instance (EMAIL_PROVIDER), used for notifications.

After installing

  1. Enrichment service: set the base URL and API key of your company-enrichment provider. Enrich company posts the email domain to /enrichment/company; adjust the path and response model to your provider. If enrichment fails the lead is still routed with the form values.
  2. CRM: set the base URL and API token of your CRM. Create lead posts to /leads with the owner, score and segment.
  3. Marketing platform: set the base URL and API token. Add to nurture list posts to /marketing/lists/{list_id}/members.
  4. Edit the Territories rows (owners, queues, nurture lists) and the Lead score & routing rules; change sales_ready_score on the workflow to move the sales threshold.
  5. Inbound webhook: create a webhook for the workflow and point your forms tool at it, or call the start API.
  6. Email (optional): configure EMAIL_PROVIDER so owners get the new-lead email (the step continues on error).

Asked for on install

  • Integration “CRM”Required

    • Tokenconfig.auth_config.token
    • Base urlconfig.base_urldefault https://crm.example.com/api· optional
  • Integration “Enrichment service”Required

    • Key valueconfig.auth_config.key_value
    • Base urlconfig.base_urldefault https://enrichment.example.com/v1· optional
  • Integration “Marketing platform”Required

    • Tokenconfig.auth_config.token
    • Base urlconfig.base_urldefault https://marketing.example.com/api· optional

Install

Install it in your workspace

Works on UserTasks cloud and on any self-hosted instance. Installing creates the assets above; nothing runs until you complete setup and start it.

In the app

  1. Download lead-routing-enrichment-1.0.0.utpkg.
  2. Open Automations → Packages and drag the file onto the page (or choose Import package). Browse gallery there lists every gallery package without downloading by hand.
  3. Pick the file. The wizard verifies the checksum, every file hash and the signature, and shows the readme.
  4. Review the changes (what is created) and the data rows.
  5. Fill in the requirements, or tick Keep incomplete and finish later with Complete setup.
  6. Done: the workflow is published and active once setup is complete.

With the CLI

shell
curl -fLO https://usertasks.com/gallery/lead-routing-enrichment-1.0.0.utpkg
usertasks packages inspect lead-routing-enrichment-1.0.0.utpkg       # offline: checksum, hashes, signature
usertasks packages install lead-routing-enrichment-1.0.0.utpkg --dry-run
usertasks packages install lead-routing-enrichment-1.0.0.utpkg       # prompts for each requirement
usertasks packages install lead-routing-enrichment-1.0.0.utpkg --keep-incomplete --yes   # in CI; finish with:
usertasks packages complete lead-routing-enrichment -f values.yaml

Verify the download

File SHA-256
b979f2604a9922c5f3833ac5cb2f1f0d4e93f285020bf350c72f786b2e8ec27d
Package checksum (what is signed)
sha256:b06ec50ac9fe8591d8ec4eba3026fbcc01a7ac2de57b6a7c8b100b21d7dc68dc
Signer
Unsigned preview build — compare the SHA-256 above

shasum -a 256 lead-routing-enrichment-1.0.0.utpkg should print the file SHA-256. How gallery packages are signed.

Versions

Version 1.0.0

  1. v1.0.02026-10-26First release.

Installing a newer version upgrades in place: local credentials and requirement values are kept, and changes you made are flagged first. How packages work

More packages

Related

Browse the whole gallery