Wiki
Asphalt OS Try the demo

Your website's form

Paste one piece of form code into your own website, and every submission is a lead in Intake within seconds, acknowledged and routed like a phone call, with the campaign it came from.

What it does

Until now a lead came in by itself only from a phone call, from the shared inbox and from PlanHub. Now your own website feeds the queue too. Each company gets a form key and a ready-made piece of HTML, both at the bottom of Connections on the card Your website's form. Your web developer pastes the code where the contact form goes. When a visitor fills it in, the lead is in Intake within seconds with source Web form, and everything a new lead gets follows: the acknowledgment email, the text (only when the visitor ticked the consent box), the task for the intake person and the ping to the team. The visitor sees a thank-you line without leaving your page.

The Connections page scrolled to the card Your website's form: the address the form posts to, the company's form key, the how-to, the Copy the form code button, the Make a new key button and the form code itself.
Your website's form: the endpoint, the key and the code to paste.

Set it up (for your web developer)

  1. Open Connections (the CEO and the Asphalt OS staff can) and scroll to Your website's form. The first time the card is opened, Asphalt OS makes the company's key.
  2. Press Copy the form code and paste it into the website where the contact form goes. It is plain HTML and one small script: nothing to install, no account to open. Style it as you like, but keep the field names; the page can use any of the fields and leave the others out.
  3. Fill the form in once yourself. The lead should be in Intake within seconds, and the acknowledgment email in the Outbox on the Messages page (while your sending is captured it goes no further; once sending is Live, it reaches your inbox). If the page answers "This form isn't connected to a company", the address in the code is not the one on the card.

What do you need? lists your services from Services & pricing, by name, with "Something else" last. The lead is filed under the service the visitor picked; "Something else" (and a company with no services yet, which gets a box to type in) goes into the lead's notes in the visitor's words. The list is your price list as it was when you copied the form code: after you add, rename or switch off a service, copy the code again.

One form per brand

When your company has more than one brand, the card asks Which website. Any brand is the company's own form: its leads go under the customer's brand, or your first brand for someone new. Pick a brand and the card shows that brand's own form code and key: every lead from it goes under that brand, a returning customer's too, so the acknowledgment, the quote and the invoice go out under its name. Paste each brand's code on that brand's website. Each form has its own key, made the first time you open it, and its own Make a new key. If you retire a brand, its form still works and its leads go in as the Any brand form's do: under the customer's brand, or your first brand in use for someone new.

The form posts to the address on the card: your app's address, then /api/public/website-form/ and the key. The key is the only thing that ties a submission to your company, so a form on somebody else's website with your key would feed your queue; if that ever happens, make a new key (below).

The fields

The fields the form sends
FieldRule
nameRequired, up to 200 characters.
phoneOptional, up to 40 characters, 7 to 15 digits. Either a phone or an email is needed. With no email, the number needs its area code (a US number of 10 digits, or 11 with the 1), so your office can call back: the form says "Enter your phone number with the area code, or add your email address." With an email, a number we cannot use is kept in the lead's notes as typed.
emailOptional, up to 254 characters, in the shape name@company.com.
address, city, state, zipOptional. The state is two letters. A street and a city make the lead's address (a blank state is your company's own); anything less goes into the lead's notes so nothing typed is lost.
serviceOptional, up to 120 characters, in the visitor's own words ("Asked about: ..." in the notes).
messageOptional, up to 2,000 characters ("Web form: ..." in the notes).
sms_consentThe consent box. Counts only when ticked.
utm_source, utm_medium, utm_campaign, pageFilled by the script from the page's address: the campaign tags and the page the form was on.
websiteThe hidden field nobody sees. Anything in it means a bot, and the request is ignored.

A field the form sends that Asphalt OS did not ask for is dropped, not refused: website form tools add fields of their own, and none of them should cost you a lead. A refusal (no name, no way to reach the person) is answered in plain words, and the script shows them under the form.

The box says exactly "You may text me about my request; reply STOP to opt out". Those are the words the texting registration wants a customer to have agreed to, so keep them. Only a ticked box records texting consent (method "web form") for the number given; an unticked box, or no box, means the lead gets the acknowledgment email and no text. A visitor who ticks the box and gives no usable phone number gets no text either: consent is kept for a number, never for a name. A ticked box never undoes a STOP: a number that replied STOP stays off until that phone texts START (see Texting consent).

What the acknowledgment quotes. The automatic acknowledgment to a website visitor (and to anyone who wrote in from outside: an email, an ad form, PlanHub) quotes at most one thing they typed: their first name, and only when the request is a homeowner's or names a contact person apart from the customer. Your form does not ask whether the visitor is a homeowner, so a new visitor is greeted "Hi there, thanks for contacting ..." as every later letter will be, since the name typed may be a company's. A returning homeowner, or a visitor who matches a customer you already have and types a name other than that customer's, is greeted by first name. The acknowledgment also says "Hi there" when the name is a job title or a role ("Facilities Manager"), or when its first word is not shaped like a first name (more than 30 characters, digits or signs such as $ : ! ( or a middle dot, more than two dots, dashes or apostrophes), reads as a web address ("Mc.Donald") or holds a hidden character. Either way the acknowledgment goes out. Should a letter still hold a word of the name that is not a first name, the database stops it: Messages shows it as Blocked with the reason, the lead's activity line says "Acknowledgment not sent" with that reason (the lead does not count as acknowledged), and the lead is in Intake as usual. Anybody can type into your form, so nobody can make your company send their words or their link.

What happens after a submission

  1. The app server checks the fields and stores the submission in a queue only the background worker reads. It never creates the lead itself.
  2. Within seconds the worker files it as a lead, as the company's Automation member, through the same steps a phone call goes through. If the phone or email is already on a customer in your customer book, the lead lands on that customer's own profile, with the visitor as a contact, instead of making a second customer. A returning customer who gives a new number (or a new email), or one you have none of for them, keeps it on their lead: the acknowledgment text goes to the number they gave, and a line in the lead's notes and on its timeline says so and names the one on file ("New number given on the website form: (404) 555-7200. Monica Hale's number on file is (404) 555-0131."). The details on file are not changed by a website visitor: the lead page shows the number given on the form beside the one on file, and someone who edits the lead presses Update contact to give it to the person on file (see Returning callers).
  3. The same request sent again within 15 minutes (a double click, or Send pressed again) is not a second lead: the first lead gets a line on its timeline, "The website form was sent again with the same details. No second lead was made." It counts as the same when the name, phone, email, address, service and message are the same (capitals, spaces and how the number is written aside) and it came in on the same form. If the visitor ticked the texting box only the second time, their yes is kept on the first lead. The form keeps its Send button off once a request went through.
  4. The lead is acknowledged and routed like every other new lead: see What happens on its own. Each of those steps still honors its switch on Automations.

A submission that still cannot be a lead (no name, say, from a form that does not check) is not thrown away: your intake person gets a task, "Website form could not be filed:" with the name, the phone and email as typed, the address and the message, due within your new-lead time limit (with no intake person, the office, then the escalation person, then the owner). Only a bot's request (the hidden field filled) is dropped with nothing kept. The worker's log says why in its own words, never what the visitor typed. Nobody's message is ever written to a log line.

Spam protection

  • The hidden website field: people never see it, bots fill it. A filled one is answered exactly as a real submission is, and nothing is kept.
  • One address may send 10 submissions a minute; each form (each key) takes at most 60 a minute from everywhere. The 61st is told to try again in a minute. Bots that get past both make leads you can mark lost; nothing they send is ever emailed or texted anywhere but to the address or number they gave, and only the acknowledgment.
  • A submission is at most 64 KB, a message at most 2,000 characters, and hidden control characters are taken out.
  • While your company's account is suspended, the form answers "This form isn't connected to a company." A submission that arrived just before it was suspended waits, and is filed as a lead once the account is active again.

Campaign tags

When an ad sends a visitor to your page, Google and Meta add tags to the page's address: utm_source (where the ad ran), utm_medium (the kind of ad) and utm_campaign (the campaign's name). The form code reads them from the address bar, along with the page's own address, and the lead keeps all four for good: the lead drawer shows "Campaign: spring-sealcoat (google / cpc) ยท from peachstatepaving.example". They are set when the lead is created and never change after, so what a campaign brought in stays true. They are the first piece of marketing attribution: spend can be typed per campaign, and the Marketing page shows what each campaign's leads, quotes and jobs cost.

Making a new key

The key sits in your public web page, so it is not a secret: what makes it safe is that it cannot be guessed (43 random characters) and that it can be replaced. The owner presses Make a new key on the card, confirms, and types their password again. The old key stops working that moment: a form still carrying it is answered "This form isn't connected to a company" until the new form code is pasted in. Make a new key when the code was pasted somewhere it should not be, or when a web developer who had it should not have it any more. Making and replacing the key are lines in the history log, shown to the people who can see the history log and may also change connections.

Esc