StabisoDocs

Sales and customers

Leads and website forms

A lead is a person who may become a customer, before anyone knows whether they will: someone who filled in the form on your website, called, wrote, was referred or met the team at an event. Leads are kept apart from customers, so that the customer list, its invoices and its reports hold only real customers. When a lead turns out to be real, one step converts it into a customer, the person as that customer's contact and, if wanted, a deal. The design is ADR-0091.

The lead list

Sales > Leads lists the company's leads, the newest first. The tiles count the new leads, the ones being worked, those nobody owns and those converted in the last 30 days; a click on a tile filters the list. Filters: status (open, i.e. new or working; or one status; or all), source, owner (anyone, mine, nobody, a person) and a search over name, company, e-mail and number.

A lead has a number of its company (LEAD-000001), first and last name, company, role, e-mail, phone, country, the message the person wrote, a source (website form, phone, e-mail, referral, partner, event, advertising, import, HubSpot, other) with a detail (the campaign or event), an owner and an e-mail opt-out. Its status:

Status Meaning
new Not looked at yet.
working Someone is on it.
disqualified Not a customer, with the reason why (no budget, a competitor, not a fit); can be taken back to working.
converted Became a customer: links to the customer, its contact and the deal. Final.

A lead is never deleted. Its personal data is erased on request (only by a person, never by an AI assistant): name, company, e-mail, phone and message are emptied for good, and the lead keeps its number, source and status, so that the counts stay right. A converted lead's customer and contact are erased where they are (contacts).

What was done with a lead (a call, an e-mail, a note) and the tasks of what is to be done are its activities (lead_id), shown in its dialog; its open tasks are listed with the pipeline's. Autopilot can plan each new lead's first step (ADR-0095).

Leads from HubSpot

A company that runs its marketing in HubSpot connects it in Settings > HubSpot: its contacts that reach the hand-over stage arrive here as leads, and HubSpot is told what became of each one (HubSpot, ADR-0097).

Converting a lead

The lead and convert forms say under each field what goes in it. The country an e-mail address tells (anna@acme.de: DE) and the company's own are offered with one click, and converting takes the currency of the customer's country (CH: CHF, DE: EUR) unless you type another.

Convert on an open lead asks three things:

  1. The customer: a new one (it gets the company's next customer number, C-00001; legal name, by default the lead's company; country, by default the lead's; currency; business or private person), set up with every check a new customer has; or a customer there is. When the lead's e-mail is already a contact of a customer, that customer and contact are proposed.
  2. The contact: the lead as a new contact of that customer (name, role, e-mail, phone, opt-out), or a contact the customer already has.
  3. A deal (on by default): title, amount in the customer's currency, stage (qualified by default) and expected close. Its owner is the lead's owner, its source the lead's source, and its first note is what the person wrote. The page then opens the deal in the pipeline.

All of it is one transaction: either everything is there, or nothing changed. The database checks that the customer is a customer of the lead's company, the contact is the customer's and the deal the customer's, and a converted lead never changes again.

Website forms

Settings > Website forms (administrators) sets up forms for your website. Whoever fills one in becomes a new lead of the form's company with the source website form, the form's name as the detail (or the campaign the website sends) and the form's owner as owner. A form has:

  • a page of its own in the language you choose (English, German, French or Italian), with the fields first name, last name, e-mail, company, phone and message (a form of your own may also send country, role and campaign);
  • a public key in its address (/forms/leads/lf_…). The key only says which form is meant; New key replaces it and the old one stops working at once;
  • optionally your websites (https://www.example.ch): a browser then takes the form only from them, and only they may show its page in a frame;
  • a thank-you text, and for a form of your own a page of your website to go to after sending.

On your website gives three ways to use it, ready to copy: a link to its page (a button or an e-mail), the page embedded in a page of yours (an iframe), or a form of your own (HTML you style as you like, which posts to the same address). A script may also post JSON:

POST /forms/leads/lf_0b9c…_Qm3x…
Content-Type: application/json

{"first_name": "Eva", "last_name": "Beispiel", "email": "eva@beispiel.example",
 "company": "Beispiel AG", "message": "Please call me", "campaign": "Autumn fair"}

A form switched off takes nothing (404) until it is switched on again; it is never deleted.

Spam and limits

  • A hidden field (website) people never see must stay empty; a robot that fills it is answered as if it was received, and nothing is stored.
  • The form's own page carries the time it was opened, signed with the form's secret: a submission sooner than 3 seconds after opening, or with a forged time, is dropped the same way; a page open longer than a day asks the person to reload it.
  • Each client address may send 5 submissions in 10 minutes and each form 200 (settings lead_form_address_limit, lead_form_form_limit, lead_form_window_seconds); beyond that the answer is 429 with Retry-After, and reaching a limit is recorded as a security event.
  • A form of a suspended organization takes nothing.

API

GET /v1/leads Filters entity, status, open_only, source, owner_user_id, unassigned, q.
GET /v1/leads/summary Counts by status, open ones by source, unassigned, converted in 30 days.
POST /v1/leads, PATCH /v1/leads/{id} Add, change, move to working, disqualify (with disqualified_reason), take back.
POST /v1/leads/{id}/convert Customer (party or customer), contact_id, create_deal, deal fields.
POST /v1/leads/{id}/erase Erase the person's data (a person only).
GET, POST /v1/lead-forms, PATCH /v1/lead-forms/{id}, POST …/new-key Forms (scope admin, a person only).
GET, POST /forms/leads/{key} The form's page and its submissions; no credential.

AI assistants have list_leads, create_lead, update_lead and convert_lead (agents); they cannot erase a lead or set up a form. Leads are found by the record search, exported with the organization's data and masked in masked test copies.

Stabiso, the Enterprise System of Record · generated from the code and its guides · release 20b7dd5b0c4d