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

# Dynamic Variables

> Personalize call messages, instructions, and WhatsApp templates with variables

## What Are Dynamic Variables?

Dynamic variables are placeholders written as `{{variable_name}}` that Tidyhire automatically replaces with real values at send time. They let you write one message template that personalizes itself for every candidate.

```text theme={null}
Hello {{candidate_first_name}}, this is {{sender_company}} calling.
```

If the candidate is `John Doe` and your company is `Acme Corp`, the candidate hears:

```text theme={null}
Hello John, this is Acme Corp calling.
```

## Where You Can Use Them

* `first_message` — the opening line the AI speaks when the candidate answers
* `instructions` — the AI behavior script
* `call_settings.whatsapp_notifications.template_variables` — WhatsApp template variables (see below)

## Available Variables

### Candidate

| Variable | Description |
| - | - |
| `{{candidate_first_name}}` | Candidate's first name |
| `{{candidate_last_name}}` | Candidate's last name |
| `{{candidate_full_name}}` | Candidate's full name |
| `{{candidate_email}}` | Candidate's email |
| `{{candidate_phone}}` | Candidate's phone number |

### Sender

| Variable | Description |
| - | - |
| `{{sender_first_name}}` | Sender's first name |
| `{{sender_last_name}}` | Sender's last name |
| `{{sender_full_name}}` | Sender's full name |
| `{{sender_company}}` | Company name (from job or sender profile) |
| `{{sender_email}}` | Sender's email |
| `{{sender_phone}}` | Sender's phone number |

### Date

| Variable | Description |
| - | - |
| `{{now_month}}` | Current month name (e.g. `May`) |
| `{{now_year}}` | Current year (e.g. `2026`) |

Note: name variables resolve against the candidate values you send in the request. If a candidate provides only a first name, `{{candidate_last_name}}` resolves to empty.

## Rendering Behavior

* **Missing values resolve to empty string.** If a candidate has no email, `{{candidate_email}}` is removed from the message. Write templates so sentences still read naturally.
* **Names are title-cased automatically.** `john doe` renders as `John Doe` for name and company variables.

## WhatsApp Template Variables

In WhatsApp templates, a `template_variables` value is treated differently depending on its content:

1. **Variable reference** — a value that is exactly a variable like `{{candidate_first_name}}` is resolved at send time using the tables above:

```json theme={null}
"template_variables": {
  "body_1": "{{candidate_first_name}}"
}
```

2. **Literal text** — any other value is passed to WhatsApp as-is:

```json theme={null}
"template_variables": {
  "body_2": "Your interview is on Thursday, {{now_month}} 21"
}
```

Note: literal text starting with `{{` is treated as a variable reference — only exact variable names resolve. Unknown variables are left as-is rather than removed.

## Full Example

Request:

```json theme={null}
{
  "first_message": "Hi {{candidate_first_name}}, this is {{sender_first_name}} from {{sender_company}}.",
  "instructions": "You are a recruiter for {{sender_company}}. It is {{now_month}} {{now_year}}. Screen the candidate for the role."
}
```

Rendered for candidate John Doe with sender Jane from Acme Corp:

```text theme={null}
Hi John, this is Jane from Acme Corp.

You are a recruiter for Acme Corp. It is May 2026. Screen the candidate for the role.
```


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