Start inputs
Lead routing
Passed by the calling system
Customer & Sales package
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.
About this package
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: 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
Lead received
The website or forms tool posts the email, name, company, country, employees, source and message.
Enrich the company
The email domain is sent to the enrichment service for industry, size band, employees, revenue and LinkedIn page.
Find the territory
The Territories table maps the country to a region, owner and CRM queue, with a Rest of world fallback.
Score and segment
The Lead score & routing decision table returns the segment, score and priority.
Create in the CRM
The lead is created with its owner, queue, score and segment.
Alert or nurture
Sales-ready leads are emailed to the owner; the rest join the territory nurture list.
Forms
The inputs a caller passes when it starts a run, and the forms people complete when the process needs a decision.
Start inputs
Passed by the calling system
Headless
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
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
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" … --waitInbound webhook
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
| Type | Name | Details |
|---|---|---|
| Email template | New lead assigned | Sent to the territory owner when a sales-ready lead is assigned to them. |
| Data table | Territories | Sales territory by country: region, the owning rep and the CRM queue. Countries not listed go to the Rest of world row (country code "*"). |
| Integration | CRM | |
| Integration | Enrichment service | |
| Integration | Marketing platform | |
| API reference | Add to nurture list | POST /marketing/lists/{{list_id}}/members — Add the contact to a marketing nurture list so it receives the nurture sequence. |
| API reference | Create lead | POST /leads — Create or update the lead in the CRM with its score, segment and owner. |
| API reference | Enrich company | POST /enrichment/company — Firmographics for a company from its email domain: industry, size band, employee count, revenue and LinkedIn page. |
| Decision table | Lead score & routing | 9 rules — Segment, score and priority for an inbound lead from company size, industry, region and lead source. First matching rule wins. |
| Workflow | Lead routing | 19 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
Credentials never travel in a package. The install wizard asks for what your environment must provide, or installs it incomplete until you finish setup.
Integration “CRM”Required
Integration “Enrichment service”Required
Integration “Marketing platform”Required
Install
Works on UserTasks cloud and on any self-hosted instance. Installing creates the assets above; nothing runs until you complete setup and start it.
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.yamlVerify the download
shasum -a 256 lead-routing-enrichment-1.0.0.utpkg should print the file SHA-256. How gallery packages are signed.
Versions
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
Customer & Sales
Agents log a complaint; the customer tier and an SLA matrix set response and resolution targets, with escalation, compensation approval and CRM case resolution.
Needs:REST APIAssigneesEmail
Customer & Sales
Account managers register a new business customer; KYC screening, a credit report and a risk rating set the tier and limit before the account is opened.
Needs:REST APIAssigneesEmail
Customer & Sales
Sales reps submit a quote; a discount authority table sets who approves, and each approver can approve, reject or counter before the CPQ is updated.
Needs:REST APIAssigneesEmail