# The pages, for a browser or a phone

Every page is plain HTML, works with scripts off, and reads as an accessibility tree: one main
region, one heading 1, a visible label on every field. There is no account, no CAPTCHA and no
hidden field to fill in.

## Finding a business: https://agentdiscover.me/search

- A form, `role="search"`, with two labelled fields: **What do you need?** (the job or the kind
  of business, in the user's own words) and **Where?** (a town or a postcode; businesses near it,
  and those that work online or ship there, are found too), and a **Search** button. It is sent with GET, so
  `https://agentdiscover.me/search?what=<words>&where=<town>` is the same search.
- The results are a numbered list under a heading that says how many were found, in the order
  `search_businesses` gives. Each has the business's name as a link to its page, what it does and
  where, and either **Send a request** (a link to the form on its page) or, for one that has not
  joined, its phone number and **See its page**.

## The business page: https://agentdiscover.me/b/<slug>

- Facts first: name, whether it is taking requests, phone, address, where it serves (in person,
  online, the countries it ships to), hours, services.
- **Products**, when it sells them: each with its price and whether it is in stock, and a
  **Buy on <website>** link where the business proved that website or store is its own. The user
  buys there. All its products are at `https://agentdiscover.me/b/<slug>/products`.
- A **Book directly with ...** button when the business has its own booking page.
- The form, under the heading **Send a request** (the request link `/l/<code>` opens it):
  1. **Request type**: Booking, Quote or Question (the first is chosen).
  2. **What do you need?**: the user's need in their words. Required.
  3. **Pick an open time (optional)**: only when the business offers open times.
  4. **When would suit you? (optional)**
  5. **<Business> asks**: the business's own questions. Those not required say (optional).
  6. **Your name**. Required.
  7. **Your mobile number** or **your email address**: at least one, the user's own. The
     user confirms from there.
  8. **Send request** sends it.
- A mistake comes back as a list at the top of the form (role "alert"). Each line links to its
  field, and the field is marked invalid.

## After sending

The page's heading says what happened, such as **One more step: send it with one text**,
**One more step: check your email**, **Booked**, **Request sent** or **Request not sent** (the
business has not joined: call it). It gives a reference and a status page,
`https://agentdiscover.me/r/<reference>`.

## How the user confirms

Nothing reaches the business until the user confirms, from their own phone or email. The page
after sending says how, in words for the user.

We never text the user first. With a mobile number given, the page shows what they text: YES
and a 6-character code, to our number, from the phone they gave, within 24 hours. A button opens
their messages app with it filled in where the phone allows it, and the number and code are
written out too. Our reply, and the business's answer, come back in that conversation.

With only an email address given, we email them a link. It opens a page that shows the request
and has one button, **Confirm and send**. It works on any device and in any browser: it needs no
cookie and no sign-in, and it lasts 24 hours.

The confirmation is the user's own step. A link opened, a button pressed or a confirmation text
sent by anyone else, an assistant that can reach their messages or their email included, sends
the request as if the user had confirmed it.

## Phone numbers

A number on a business page may be an AgentDiscover number. A call to it is passed on to the
business's own number. It is the right number to call.
