# Merge field reference

Merge fields begin and end with 2 carats (**^^**) and are replaced with real values when a reminder is sent. How they work is covered in [merge fields](/docs/reminders/merge-fields); this page lists every field.

## Appointment

These fields take information from the appointment

|Field|Information|Example|
|----|----|----|
|^^time^^|The start time of the appointment|*14:30*|
|^^date^^|The date of the appointment|*12/07/2023*|
|^^dayname^^|The name of the day|*Thursday*|
|^^monthname^^|The name of the month|*July*|
|^^day^^|The day of the month with an ordinal indicator|*12th*|
|^^year^^|The year|*2023*|
<!-- Re-link "appointment type" to /docs/appointments/appointment-types when that page publishes -->
|^^procedure^^|The *public name* of the appointment type. Only the first if more than one.|*Blood test*|
|^^resource^^|The *public name* of the resource. Only the first if more than one.|*Room 1D*|
|^^datemade^^|The date the appointment was added to Diarybook||
|^^today^^|The date of the reminder||
{.table}

## Client

These fields take information from the client associated with the appointment and to whom the reminder is being sent

|Field|Information|Example|
|----|----|----|
|^^first^^ or ^^name^^|The first name|*John*|
|^^last^^|The last name|Smyth|
|^^fullname^^|The full name|*John Smyth*|
|^^hifirst^^|If a first name exists will put `Hi ` followed by the name|*Hi John*|
|^^dearfirst^^|If a first name exists will put `Dear ` followed by the name|*Dear John*|
|^^email^^|The email address|*`john.smyth@Diarybook.net`*|
|^^address1^^|The first line of address for letter templates||
|^^address2^^|The second line of address||
|^^address3^^|The third line of address||
|^^address4^^|The fourth line of address||
|^^address5^^|The fifth line of address||
|^^id^^|The patient number or id||
|^^dob^^|The patient's date of birth||
{.table}

## User

These fields take information from the service provider (Diarybook user) that is fulfilling the appointment

|Field|Information|Example|
|----|----|----|
|^^user_first^^|The first name|Paul|
|^^user_last^^|The last name|Pokealot|
|^^user_email^^|The email address|*`paul.pokealot@Diarybook.net`*|
|^^user_phone^^|The phone number||
{.table}

## Location

These fields take information from the location record that is assigned to the [reminder setting](/docs/reminders/how-reminders-work/)

|Field|Information|Example|
|----|----|----|
|^^loc_name^^|The location name|*Building A Wellstown*|
|^^loc_contact^^|The contact name|*Dr Paul Pokealot*|
|^^loc_email^^|The contact email address||
|^^loc_phone^^|The contact phone number||
|^^loc_address1^^|The location address||
|^^loc_address2^^
|^^loc_address3^^
|^^loc_address4^^
|^^loc_address5^^
|^^loc_directions|The directions to the location||
|^^loc_map^^|A rendering of the map and pin|*Email reminders only*|
{.table}

## Clinic fields

For integrated accounts, clinic fields are additional information that can be set for each appointment based on the clinic code used to sync the appointment. They can contain any text relating to any other aspect of the appointment specific to the clinic code used.

|Field|
|----|
|^^clinicfield1^^|
|^^clinicfield2^^|
|^^clinicfield3^^|
|^^clinicfield4^^|
|^^clinicfield5^^|
{.table}

## Sync fields

For integrated accounts, sync fields are additional information that can be set for each appointment. They can contain any text relating to any other aspect of the appointment that is included in the syncing process.

|Field|
|----|
|^^syncfield1^^|
|^^syncfield2^^|
|^^syncfield3^^|
|^^syncfield4^^|
|^^syncfield5^^|
|^^syncfield6^^|
|^^syncfield7^^|
|^^syncfield8^^|
|^^syncfield9^^|
|^^syncfield10^^|
{.table}

Sync fields map to fixed positions in the daily upload file — see the
[integration overview](/docs/integrations/integration-overview).

---
Source: https://diarybook.com/docs/reference/merge-field-reference/
