# Variables and address book

> Reuse values across monitors and playbooks, and keep the emails and phone numbers notifications go to.

## Variables

Account variables hold values you use in several places, such as a threshold or a support email. Change the variable once and every monitor and playbook that uses it picks up the new value.

Everyone can see variables. Admins and operators can create, edit and delete them from **Settings → Variables**.

### Create a variable

Click **Add variable** and fill in:

- **Key**: lowercase letters, digits or underscores, starting with a letter. For example `min_amount`.
- **Kind**: `string`, `number` or `boolean`. Pulso checks that the value fits: a number must be numeric, and a boolean must be `true` or `false`.
- **Value**.
- **Description** (optional).

### Use a variable

Reference it as `{{vars.key}}`:

- In a monitor's SQL query: `WHERE amount > {{vars.min_amount}}`. Pulso inserts the value as a quoted literal, so it can't change which tables or columns the query reads. A check that uses an undefined variable fails with "Account variable not defined: *key*".
- In monitor filters and playbook branch conditions.
- In the text of playbook steps, such as an email body or a Slack message.

## Address book

The address book keeps the email addresses and phone numbers that playbook notifications can be sent to, besides your members. Everyone can see it. Admins and operators manage it from **Settings → Address book**.

### Add a contact

1. Click **Add contact**.
2. Enter a **Name**, the way it shows up when picking where a notification goes, for example "Support inbox".
3. Choose **Email** or **Phone (SMS)** and enter the address or number. Phone numbers use international format, for example `+34600000000`. The SMS option is only shown when SMS sending is available.
4. Click **Add contact**.

### Verify it

Pulso sends a 6-digit code to the new contact, and it can't receive notifications until someone enters that code. Ask whoever receives it for the code, then open the contact, enter it in **Verification code** and click **Verify**.

- The code expires after 15 minutes.
- After 5 wrong attempts you need a new code.
- **Send a new code** sends another one, at most once a minute.

The address book's **Used in** column counts where each contact is used. The contact's page lists it under **Where it is used**: the monitor playbooks and templates that send to it, and the open signals that still have to notify it.

### Edit or delete a contact

You can rename a contact, but not change its address or number: a different address is a new contact that needs its own verification.

Deleting a contact that playbooks use makes those steps fail. When it is used, **Delete** first lists where, so you can pick another contact in those steps or delete it anyway.
