Skip to content

Leads and CSAT ​

Leads ​

A lead is contact details a visitor leaves so your team can follow up. Turn on behavior.leadCapture.enabled in the bot's Behaviour tab, choose the fields (name and email by default; up to 12, of type text, email, phone, long text or a list of choices), and how to ask:

behavior.leadCapture.whenHow
tool (default)No form: when a visitor wants follow-up, the agent asks for the fields in the conversation, confirms them, and saves them with its capture_lead tool.
startA form in the chat before the first message.
before_handoffA form when a hand-off to a person starts, so your team knows who they'll talk to.
offlineA form only in the offline flows (below).

Whatever you choose, the agent can also save details with capture_lead, and the form appears in the offline flows: when the bot is outside its opening hours (with behavior.hours.scope: bot), and when a visitor asks for a person but nobody is available (unless behavior.handoff.offlineAction isn't lead_form; see Human handoff).

Each lead keeps its bot, conversation and visitor, its source (tool, form or api) and a status (new, contacted, closed). A name and a valid-looking email are also copied onto the visitor, so your team sees who they are in the conversation.

Getting leads out:

  • the admin panel's Leads page, with a CSV download;
  • the lead.captured webhook, for every lead whatever its source;
  • the REST API: GET /api/v1/leads (filter by botId and status; page with before; total counts every match), GET /api/v1/leads.csv (all leads, up to 50,000), PATCH /api/v1/leads/{id} to change the status;
  • on the page, the lead event for leads from the form.

Your other systems can add leads too: POST /api/v1/leads with { "botId": "...", "fields": { "email": "..." } } (source api).

Thumbs ​

With behavior.feedback.thumbs on (the default), the agent's latest reply has thumbs up and down. A second click clears the rating. Ratings show in the transcript, conversations can be filtered by them in the admin panel (rated=good or bad in the REST API), and each one fires the feedback.received webhook (kind: "thumb", value: 1 or -1). On the page: the feedback event.

CSAT ​

With behavior.feedback.csat on (the default), when a conversation is ended (by the agent saying goodbye, or by your team) the chat asks "How was your conversation?" with five stars. The score is stored on the conversation, and fires the feedback.received webhook (kind: "csat", value: 1 to 5) and the page's csat event.

Wireface Chat 0.1.0. These docs are served by your own server.