Skip to content
Browse the docs

Agents

Sales agent

How the Sales agent qualifies visitors with your questions, scores leads, offers a meeting and sends qualified leads to email, Slack, webhooks or a CRM.

Last updated

On this page

The Sales agent is the Chat agent with a sales job on top. It answers from the same knowledge base and keeps the same rules: it only states what your website says. When a visitor shows interest in buying, it asks the questions your team would ask before a call, scores the lead, offers a meeting to the people who fit, and sends qualified leads to the tools your team works in.

What a conversation looks like

  1. A visitor asks something that shows buying intent: prices, a demo or a call, buying or signing up, a comparison with an alternative, or reaching your team.
  2. The agent answers that question first, from your site. At the end of the same reply it asks your first qualification question, worded naturally in the visitor's language. A question with fixed answers shows them as buttons.
  3. When the visitor answers, the agent thanks them and asks the next question, one per reply. A message that only answers the question gets a short reply instead of a search of your site. A question the visitor skips twice is not asked again.
  4. When the lead's score reaches your threshold, or the visitor asks for a demo or a call, the agent offers your booking link. If it does not know the visitor's email yet, it asks for it first with the usual contact form, and then opens your booking page with the name and email already filled in.

Qualification questions

Write up to five questions in plain words, such as "How many locations do you have?". Each has an answer type and an optional good-fit rule:

Answer typeGood-fit ruleExample
Choose from optionstick the options that fit"How many locations?" 1 / 2–5 / 6 or more, with 2–5 and 6 or more ticked
A numbera lowest and/or highest good number"How many people are on your team?" at least 5
Free answera rule in plain words, judged by the AI"What do you sell?" good fit when "they sell to other businesses"

A question without a rule still records the answer. When none of your questions has a rule, each answer adds 10 points to the fit part as a sign of engagement (up to 50); once any question has a rule, only the answers to questions with rules move it.

The lead score

Every lead gets a score from 0 to 100, made of three parts:

PartUp toWhat counts
Fit50answers that meet your good-fit rules (25 when nothing is known; answers that do not fit lower it)
Intent30asking for a demo or to buy (30), about prices (20), for a comparison or a person (15); 5 more for two or more kinds
Identity20a work email (20) or a free mailbox such as Gmail (8)

The default threshold is 60: a visitor who asks about pricing from a work address qualifies, one who asks from a free mailbox does not, and answers that do not fit your rules keep a lead out. Change the threshold on the Sales page. The score and the answers are stored on the lead.

Any https booking page works. For these tools the agent does more:

  • Cal.com: the visitor's name and email are filled in, and you can let visitors open the calendar inside the chat. Sites with a strict Content-Security-Policy need frame-src https://app.cal.com for that; the link works without it.
  • Calendly: the visitor's name and email are filled in.
  • Google Calendar appointment pages and other pages open in a new tab.

Clicks on the booking button are counted as meeting clicks. To also count meetings booked, set up the booking tool's webhook under Booking link → Count booked meetings: the dashboard shows a webhook address and a secret once.

  • Cal.com: in Settings → Developer → Webhooks, add a webhook with the address as the subscriber URL and the secret, for new, rescheduled and canceled bookings. Cal.com signs each request with an HMAC-SHA256 of the body.
  • Calendly: webhooks are created through Calendly's API. Create a subscription with the address as url, the events invitee.created and invitee.canceled, and the secret as signing_key.

ASDK checks the signature of every request and links the meeting to the lead with the same email.

Where qualified leads go

A lead is handed to every destination once, when its score first reaches the threshold, with its score, its answers, what it was interested in and a three-to-five-point summary of the conversation.

  • Email: owners and admins of the workspace get an email with "Qualified lead" and the score in the subject. It is on by default.
  • Slack: paste an incoming-webhook URL from Slack. If your notifications already post to Slack, qualified leads go there too.
  • Webhooks: up to five endpoints, for example Zapier, Make, n8n or your own system.
  • HubSpot and Pipedrive: connect your account with one click. The contact is created or updated by email and a note with the score, the answers and the summary is added to it. Until a connection is available on your account, the Sales page says so.

The delivery log on the Sales page shows each hand-over. Failed attempts are tried again after 30 seconds, 2 minutes, 10 minutes, 1 hour and 6 hours; an answer that cannot change (for example a removed webhook) stops at once.

Webhook format

ASDK sends a POST with a JSON body:

JSON
{
  "id": "dlv_…",
  "event": "lead.qualified",
  "createdAt": "2026-10-21T10:00:00Z",
  "site": { "id": "site_…", "name": "Acme", "url": "https://acme.com" },
  "lead": {
    "id": "lead_…",
    "email": "jane@bigco.com",
    "name": "Jane Doe",
    "pageUrl": "https://acme.com/pricing",
    "createdAt": "2026-10-21T09:58:00Z",
    "qualifiedAt": "2026-10-21T10:00:00Z",
    "score": 82,
    "intents": ["pricing", "demo"],
    "answers": [
      { "questionId": "q1", "question": "How many locations do you have?", "answer": "2–5", "fit": "good" }
    ]
  },
  "conversation": { "id": "conv_…", "summary": ["Asked about pricing for three stores", "…"] }
}

The headers are X-ASDK-Event (lead.qualified, or test for the Sales page's Send a test), X-ASDK-Delivery (the same on every retry of one delivery) and X-ASDK-Signature:

Text
X-ASDK-Signature: t=1792576800,v1=<64 hex characters>

To check it, compute the HMAC-SHA256 of the timestamp, a dot and the raw body with your webhook's secret, compare it with v1 in constant time, and reject timestamps older than five minutes:

JavaScript
import crypto from "node:crypto";

function verify(header, rawBody, secret) {
  const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")));
  const expected = crypto.createHmac("sha256", secret).update(`${parts.t}.${rawBody}`).digest("hex");
  const fresh = Math.abs(Date.now() / 1000 - Number(parts.t)) < 300;
  return fresh && parts.v1?.length === expected.length &&
    crypto.timingSafeEqual(Buffer.from(parts.v1), Buffer.from(expected));
}

Answer with any 2xx status. 408, 429 and 5xx answers are retried; other statuses fail the delivery. Webhook addresses must be public https addresses.

Results

The top of the Sales page shows the last 7, 30 or 90 days: qualified leads, meeting clicks and meetings booked, with a line per day. Conversations in the dashboard's own preview are not counted.

ASDK agentEarly access

Try the Sales agent in early access

Qualifies visitors, books meetings and sends leads to your CRM through webhooks and Zapier.