# Install and connect

## 1. Install the package

Install **Tomba for Salesforce** from AppExchange into a sandbox or production org. Choose **Install for
Admins Only**; you will give access with permission sets in the next step.

## 2. Check your license

Tomba for Salesforce is licensed **per company, per year**: one subscription covers every user in the org, so there
is nothing to assign. **Tomba Setup** shows the license status and renewal date; you control who uses Tomba with
the permission sets below.

## 3. Assign permission sets

| Permission set  | For                                                                                 |
| --------------- | ----------------------------------------------------------------------------------- |
| **Tomba Admin** | Admins who connect Tomba, change settings and automation, and see every Tomba job   |
| **Tomba User**  | Everyone who runs record actions, searches and bulk jobs                            |

Users without either permission set can still work with Tomba fields, but cannot call Tomba. Records they
create are picked up by [automation](/salesforce/automation) when it is enabled.

## 4. Connect your Tomba Enterprise account

Open the **Tomba** app › **Tomba Setup** tab and connect the tomba.io account of your **Tomba Enterprise** plan
(the connection is refused otherwise):

- **Connect with Tomba** (recommended): sign in to tomba.io and approve access. The package creates a
  dedicated API key named `Salesforce – <your org>`, so you can see and revoke it at
  [app.tomba.io/api](https://app.tomba.io/api). The key is renewed automatically before it expires.
- **No Tomba account yet?** Click **No Tomba account? Create one with Salesforce**. You sign in with your
  Salesforce login and Tomba creates an account with your Salesforce name and email (on the Free plan). Our team then
  contacts you to set up Tomba Enterprise, and you get an email to set your password for app.tomba.io. Once Enterprise
  is active, come back and click **Connect with Tomba**.
- **Use an API key**: paste an existing key and secret from [app.tomba.io/api](https://app.tomba.io/api).
  Keys expire after at most a year; Setup warns you 30 days before, and you then reconnect.

Credentials are stored in a Salesforce external credential. Neither users nor Apex code can read them.

## 5. Add the actions to your layouts

- **Record action**: add the **Tomba** action to the Lead, Contact and Account Lightning record pages
  (Page Layout › Mobile & Lightning Actions).
- **Tomba Insights**: drag the component onto the Lead, Contact and Account record pages in the Lightning App
  Builder.
- **List view button**: add the **Tomba** button to the Lead, Contact and Account list view
  (Search Layouts › List View).

## 6. Optional: automation

Turn on the options you want in **Tomba Setup › Automation**. Saving schedules an hourly job that runs as you;
see [Automation](/salesforce/automation).
