> ## Documentation Index
> Fetch the complete documentation index at: https://cpaas.fireflo.au/llms.txt
> Use this file to discover all available pages before exploring further.

# Lead finder

> How to find businesses on a map with your own Google keys, pull their details in batches, and add them to a segment in Contacts.

The **Lead finder** battery finds businesses on Google Places and adds them to a segment
in Contacts. You draw an area on a map, see how many businesses match before anything is
fetched, pull their details in batches, and choose which become contacts. You then send to
that segment on any channel, as to any other.

> [!NOTE]
>
> Your plan must include **Lead finder**. Its price is the battery's monthly price; OMNI
> charges nothing per search. Lead finder works on **your own Google keys**, and Google
> bills you directly for what they use.

> [!WARNING]
>
> Google's terms for your key restrict storing the content it returns and using it for
> unsolicited messages. The Set-up page says so. How you use the businesses you add — and
> whether you may message them — is your responsibility.

Lead finder has one line in the side menu, which opens **Find businesses**. **Set-up** is
behind the gear at the top right of the page, and **History** opens from the button with a
clock beside it.

## Set-up

Before the first search, someone who may manage Lead finder opens **Set-up** from the gear.

| Part | What it does |
| - | - |
| **Search key** | Your Google key for searches. It is kept encrypted and never shown again. |
| **Map key** | Your Google key for the map. Your browser uses it to draw the map. |
| **Test keys** | Checks both keys and the place search — see below. |
| **Monthly limit** | The most billed searches Lead finder makes in a month. |
| **Usage** | This month's usage. |
| **Instructions** | Step-by-step instructions for getting the keys in Google Cloud: first make the search key without an address restriction, then what to do when Test keys fails, and how to tie the key to this server once it works. |
| **Last refusal from Google** | When Google last refused a call, during what (a test, a check, or which batch of which search), the cause and Google's answer. It clears with the next call that works. |

### Test keys

**Test keys** runs three checks, one after another. Each shows **Passed**, **Failed** or
**Not tested**.

1. **The search key**, tested from the server.
2. **The map key**, tested in your browser.
3. **Go to** — one place looked up.

When a check fails, you see the cause in plain words, what to change in Google Cloud, and
Google's answer word for word: its code, its sentence and the Google project it names.
When the key is tied to other server addresses, the address Google saw for this server is
shown with **Copy**. When the map key does not allow this panel, the address to add is
shown with **Copy**.

The causes Test keys knows:

* a key Google does not know;
* a key not allowed to use the service;
* the service not turned on in the key's project;
* no billing account;
* a key tied to other server addresses;
* a website key used as the search key;
* Google's limit reached;
* Google giving the project no access without naming a cause;
* this server unable to reach Google.

Anything else is shown in Google's own words. **Copy the whole result** puts the three
results on the clipboard as text, to send to whoever looks after your Google account. The
result stays on Set-up until the next test.

> [!TIP]
>
> Each press of **Test keys** costs one small search, one map load and one place lookup at
> Google, on your keys.

## Find businesses

**1. Say what to find**

Write what kind of business you are looking for.

**2. Draw the area**

Draw a shape on the map, or a radius around a point.

**3. Check this area**

**Check this area** pins the matching businesses and says how many are in the area,
how many were taken before and how many are new — before any details are fetched.

**4. Set the target and the batch size**

How many businesses to get, and how many in each batch: 10, 25, 50 or 100.

**5. Pull a batch**

Each press of **Pull batch** fetches one batch of details: name, address, phone,
website and rating. **Stop here** leaves the rest for later.

Google gives at most 60 businesses per search, so a large area is searched in parts. An
area that would need more than 25 parts is refused before anything is charged.

When Google refuses a check or a pull, the page says why. People who may manage Lead
finder get **Open Set-up** and **What Google answered**; others are asked to talk to an
owner or admin.

### Duplicates

Lead finder marks:

* a business taken before — shown from Contacts with its segment, at no charge from
  Google;
* a number that is already a contact;
* two listings that share one number.

## Add to segment

Tick the rows you want, or take the whole batch, and choose **Add to segment** — an
existing segment or a new one.

Before anything is written, the dialog counts the new mobile numbers, the landlines, the
numbers already in Contacts, and the businesses with no phone number, which are left out.
You can copy each business's website, address and category into contact fields.

* A number already in Contacts is never added twice. It keeps its segment unless you
  choose to move it.
* A contact who opted out stays opted out.
* No consent is recorded.

Send, Broadcasts and Contacts treat the segment like any other.

## History

**History** lists every search: its area, who ran it, the target, each batch, and the
segment each batch went to.

* **Continue** reopens a search where it was left.
* **Check again** runs it afresh and counts only what is new.

On History, the button beside the gear takes you back to **Find businesses**.

## What is kept

* Your searches, and Google's ID for each business taken.
* The details of a batch that was pulled but not added are deleted after 24 hours.
* Positions are deleted after 30 days.

Names and numbers live only in Contacts, once you add them.

## Who may use Lead finder

| Permission | Lets someone | Roles that have it by default |
| - | - | - |
| Using Lead finder | Find businesses, pull batches and add them to segments | Owner, Admin, Support |
| Managing its set-up | Open Set-up: the keys, Test keys and the monthly limit | Owner, Admin |

Viewers do not get Lead finder, because using it creates contacts. An Owner or Admin can
change these on the **Roles** screen. See [Team and roles](https://cpaas.fireflo.au/using/team-and-roles.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.