Use case
Lead Qualification and CRM Hygiene
Screen out spam, enrich and score inbound leads, route by tier, and ask before anything is written to the CRM.
- Stack Cognipeer Flows + connectors or HTTP
- Pattern Flow · Revenue
- Read ~5 min
Overview
Sales works whoever is at the top of the list, which is rarely whoever is most likely to buy. This flow takes a lead in, checks it, scores it against what you know about your customers and writes the result to the CRM behind an approval.
Enterprise module
Flows is the enterprise flows module. Connectors are an enterprise module too. See Flows.
The shape of the flow
Start (lead fields)
|
v
Guardrail --blocked--> End
| pass
v
HTTP request / connector action (enrich)
|
v
LLM (JSON: score, tier, reason)
|
v
Switch on tier --> hot: Human approval --approved--> CRM write
warm / cold: EndBuild it
- Take the lead in. The CRM or web form calls the Flows API with the lead fields. Declare them as Start inputs. Keep API keys out of the inputs: they belong in Config.
- Spend nothing on spam. A Guardrail step checks the free-text fields against a project guardrail and continues on Pass or Blocked. It can also redact personal data before it goes anywhere else.
- Enrich with data, not guesses. Fetch what you can verify: an HTTP request to your enrichment API, a Search knowledge step over your ideal-customer notes, or a connector action (Connectors) for systems that have a package.
- Score against your real customers. An LLM step in JSON mode returns
score,tierandreason, given the lead, the enrichment and the criteria you wrote. Keep the criteria in the prompt where a reviewer can read them. - Route by tier. A Switch on
tiersends hot leads to the approval and the others to End. - Write back behind a gate. Human approval shows the lead, the score and the reason. On approved, the CRM write runs (an HTTP request or a connector action). Wire rejected to a different place.
- Give sales a way to ask. Create an agent for the sales team and bind your CRM connector's tools to it. Mark the write tools as needing approval, so the agent asks before it changes a record. See Connector tools and approvals and Approvals.
Pitfalls
- A score is not a decision. Keep the reason next to the score so sales can disagree with it.
- An approval whose exits lead to the same step is not a gate.
- Test targets. A test run writes to the real CRM. Point the write at a sandbox account first.

