Skip to main content
AgentFlow sits between lead capture and your CRM — it qualifies, scores, and routes incoming leads so that by the time a record reaches your sales or operations team, it already carries the context they need to act. The handoff step is how AgentFlow delivers that enriched record to whatever system owns the next part of your workflow.

What the handoff delivers

When AgentFlow triggers a handoff, it sends a structured payload containing everything your downstream system needs to create or update a contact, open an opportunity, or kick off an automation sequence:
  • Lead identity — name, email, company, and any additional fields captured at intake
  • AI qualification score — the numeric score (0–100) and confidence rating from the OpenAI qualification step
  • Operator decision — the outcome your team recorded: approved, rejected, or review_requested
  • Summary notes — the plain-language explanation generated by the AI scoring model
  • Recommended action — the AI-suggested next step
  • Timestamps — when the lead was received, scored, and decided on
  • Lead ID — a stable identifier for idempotent downstream processing

Integration options

AgentFlow uses webhook-based handoff, which means it works with any system that can receive an HTTP POST request. You do not need a native integration or a marketplace connector — if your CRM or operations tool has a webhook URL, AgentFlow can deliver to it. Commonly used destinations include:

HubSpot

Use HubSpot’s inbound webhook or a Zapier/Make intermediary to create contacts and deals.

Salesforce

Route through Salesforce Flow or an integration middleware to create leads and opportunities.

Notion

Push qualified leads into a Notion database for lightweight pipeline tracking.

Airtable

Append rows to an Airtable base for team-visible lead review and tracking.

Zapier / Make

Use an intermediary automation layer to fan out to multiple destinations or transform the payload.

Custom endpoint

POST directly to any internal service, data warehouse ingestion endpoint, or ops API.

Configure the CRM handoff

1

Define the handoff trigger

In your AgentFlow dashboard, navigate to Settings → Handoff. Choose when AgentFlow should dispatch the outbound payload:
  • On operator approval (recommended) — fires only when an operator marks a lead approved
  • On any decision — fires on approved, rejected, and review_requested
  • On qualification complete — fires immediately after AI scoring, before operator review
For most teams, triggering on operator approval keeps your CRM clean and ensures only validated leads enter your pipeline.
2

Configure your destination endpoint

Enter your CRM or workflow tool’s webhook URL in the Destination URL field. AgentFlow sends a POST request to this URL with a JSON body each time the trigger fires.
Your destination endpoint must use HTTPS. AgentFlow will not dispatch handoff payloads to plain HTTP endpoints.
If your downstream system requires authentication headers — for example, an Authorization: Bearer <token> — add them in the Custom Headers section. These headers are stored server-side and are never exposed in the dashboard response payloads.
3

Map payload fields to your CRM schema

AgentFlow sends a standardized payload (see below), but your CRM may expect different field names or a nested structure. Use the Field Mapping panel to translate AgentFlow fields to your destination schema. If you are routing through Zapier or Make, you can handle mapping in your automation workflow instead.
4

Test with a sample qualified lead

Use the Send Test Payload button to dispatch a representative payload to your destination endpoint. Check your CRM or workflow tool to confirm the record arrived, the fields populated correctly, and any downstream automation fired as expected.
Before pointing at your live CRM, test against a webhook inspection tool like Webhook.site or RequestBin. This lets you inspect the full payload structure and headers without creating noise in your production data.

Example handoff payload

AgentFlow sends the following JSON structure to your configured endpoint:
{
  "event": "lead.qualified",
  "lead_id": "lead_01HX7KQZPW9N3V4MBCR6TY8EJ",
  "timestamp": "2024-11-14T10:15:42Z",
  "operator_decision": "approved",
  "contact": {
    "name": "Priya Nair",
    "email": "priya.nair@horizonops.io",
    "company": "Horizon Ops",
    "message": "We need a faster way to triage inbound demo requests. Currently drowning in Typeform submissions with no prioritization.",
    "source": "website_contact_form"
  },
  "qualification": {
    "score": 87,
    "confidence": "high",
    "summary": "Strong fit: mid-market SaaS RevOps team with an active pain point and implicit urgency. No budget signal, but intent is clear.",
    "recommended_action": "approve",
    "scored_at": "2024-11-14T10:14:58Z"
  },
  "next_action_context": "Schedule discovery call within 24 hours. Reference triage pain point in outreach."
}
Your downstream system receives this payload as the POST request body with Content-Type: application/json.

Troubleshooting handoff delivery

If your CRM or workflow tool is not receiving payloads, work through these checks:
  • Confirm the destination URL is correct and publicly reachable (not localhost or an internal network address).
  • Check that the handoff trigger you configured is actually firing — visit the lead record in the AgentFlow dashboard and verify its status matches the trigger condition.
  • Review the Handoff Logs panel under Settings for delivery attempts and HTTP response codes.
  • Check your field mapping configuration in AgentFlow. A misconfigured mapping can silently drop or rename fields.
  • Inspect the raw payload using a webhook inspection tool to confirm AgentFlow is sending the expected structure before the issue is diagnosed as a CRM-side problem.
  • A 401 or 403 usually means authentication headers are missing or incorrect. Verify the Authorization header value in the Custom Headers panel.
  • A 422 or 400 typically means a required field in your CRM’s schema is missing from the payload or failing validation. Check your CRM’s inbound webhook documentation for required fields.
  • AgentFlow logs the response code for every delivery attempt. Retry failed deliveries from the Handoff Logs panel once you have corrected the configuration.
  • Use the lead_id field as a deduplication key in your CRM or automation workflow. AgentFlow guarantees that lead_id is stable and unique per lead record.
  • If you have configured the trigger to fire on multiple events (e.g., both approved and any decision), you may be dispatching multiple payloads for the same lead. Scope the trigger to a single event type.