cd /news/ai-agents/before-adding-ai-to-a-lead-form-make… · home › topics › ai-agents › article
[ARTICLE · art-179974] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=· neutral

Before Adding AI to a Lead Form, Make Retries and Handoffs Boring

Comenzar Technologies, a Chandigarh-based firm, published a design note arguing that lead-intake systems should make retries and handoffs reliable before adding AI models to classify enquiries. The note recommends separating enquiry receipt from enrichment, using a submission identifier reused across network retries with a uniqueness constraint, and treating model output as a suggestion rather than a source of truth. It also warns that free-text enquiries can contain instructions from strangers and should not be allowed to grant permissions or trigger privileged actions.

recommendation

Persist the enquiry and its processing task in one transaction keyed by a reused submission identifier, then test duplicate IDs, provider outages and worker restarts before adding a model.

more in playbook: Designing agent systems
by read3 min views7 publishedDec 2, 2026

A customer submits your enquiry form. Your database saves the lead, but the notification service times out. The browser retries. Now the sales team has two records and still no clear owner.

That is a useful place to start an automation project. Before adding a model to classify the enquiry, make sure the enquiry survives an ordinary failure.

This is a design note from Comenzar Technologies in Chandigarh. The examples are illustrative; they do not describe a client deployment or measured results.

Treat receiving an enquiry and enriching it as separate responsibilities. A reasonable first design is:

If the lead and its processing task live in the same transactional database, writing both in one transaction can avoid the gap where a lead exists but its follow-up task never does. A separate queue introduces its own delivery guarantees and failure cases; choose those deliberately.

A retry should not automatically become a new business event. Generate a submission identifier once for an attempt, reuse it on network retries and enforce the appropriate uniqueness rule in storage.

Do not use a phone number alone as your deduplication key. The same person may have a second, legitimate enquiry.

Here is the shape of the operation, expressed as pseudocode:

receive(submission_id, validated_fields):
  begin transaction
    if submission_id already exists:
      return the existing receipt
    insert enquiry(submission_id, validated_fields, status="received")
    insert work_item(submission_id, task="prepare_handoff", status="queued")
  commit
  return receipt(submission_id)

The exact transaction and response behavior depends on your database and application framework. In a real implementation, account for concurrent requests as well as a simple sequential retry; a read-before-insert check by itself is not a concurrency guarantee.

“Notification attempted” and “someone owns the lead” are different states. Useful states might be received, queued, assigned, awaiting review and failed. Keep timestamps and enough error information for diagnosis without dumping customer messages or credentials into logs.

For downstream side effects, use an idempotency mechanism where the receiving service supports one. Otherwise, decide how your worker detects or tolerates a repeat. A worker can crash after an email is sent but before it records success.

Set retry limits and a route for manual recovery. An invisible queue that keeps retrying forever is not a dependable handoff.

Once the record and handoff are reliable, a model might summarise the free-text request or suggest a category. Keep the original message available. Treat the generated output as a suggestion, not a new source of truth.

An enquiry can contain instructions written by a stranger. Do not let that text grant permissions, change your workflow rules or trigger privileged actions. Limit the information the model receives and keep pricing, unusual commitments and customer-facing replies behind the right review step.

If a simple rule assigns the enquiry correctly, use the rule. You do not need a model to copy a phone number into a record.

Try a duplicate submission identifier, a disconnected notification provider, an empty message, a worker restart and a failed assignment. Check what the customer sees and what the person responsible for follow-up can recover.

For the business-side decision—what to automate, how to judge the pilot and which costs to ask about—we wrote a separate AI automation guide for small businesses.

The first useful outcome does not have to be dramatic. Every genuine enquiry recorded once, with a clear owner and a recoverable failure path, is a solid start.

── more in #ai-agents 4 stories · sorted by recency
── more on @comenzar technologies 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/before-adding-ai-to-…] indexed:0 read:3min 2026-12-02 · —