Dashboard > CiviCRM Documentation > ... > CiviMail > Mail-merge Tokens for Contact Data
Mail-merge Tokens for Contact Data Log In | Sign Up   View a printable version of the current page.

 Contents
  Documentation Home

Tokens allow you to include personalized text in email messages (similar to "mail-merge" functionality in a word processor). You can use the tokens listed below in your CiviMail Messages. Starting with 2.0 you will also be able to use them for the core Send Email to Contact(s) feature (accessed from the contact summary screens and search results) AND in Mailing Labels.

You might start an email with a greeting like this:

Dear {contact.first_name},
Thanks for volunteering at....

Which will be sent to Ms. Dana Helpful as:

Dear Dana,
Thanks for volunteering at....

Tokens for Standard Contact Fields

The following standard contact field tokens are available. For location fields, the primary location value will be used (this includes address, phone and email fields).

{contact.first_name} - First Name
{contact.middle_name} - Middle Name
{contact.last_name} - Last Name
{contact.job_title} - Job Title
{contact.birth_date} - Birth Date
{contact.is_deceased} - Is Deceased
{contact.deceased_date} - Deceased Date
{contact.gender} - Gender
{contact.individual_prefix} - Individual Prefix
{contact.individual_suffix} - Individual Suffix
{contact.street_address} - Street Address
{contact.supplemental_address_1} - Supplemental Address 1
{contact.supplemental_address_2} - Supplemental Address 2
{contact.city} - City
{contact.postal_code_suffix} - Postal Code Suffix
{contact.postal_code} - Postal Code
{contact.geo_code_1} - Geo Code 1
{contact.geo_code_2} - Geo Code 2
{contact.county} - County
{contact.state_province} - State
{contact.country} - Country
{contact.phone} - Phone
{contact.email} - Email
{contact.im} - IM Screen Name
{contact.nick_name} - Nick Name
{contact.do_not_email} - Do Not Email
{contact.do_not_phone} - Do Not Phone
{contact.do_not_mail} - Do Not Mail
{contact.contact_sub_type} - Contact Sub Type
{contact.legal_identifier} - Legal Identifier
{contact.external_identifier} - External Identifier
{contact.home_URL} - Home URL
{contact.preferred_communication_method} - Preferred Communication Method
{contact.preferred_mail_format} - Preferred Mail Format
{contact.do_not_trade} - Do Not Trade
{contact.is_opt_out} - No Bulk Mail (Opted-out)
{contact.contact_id} - Internal Contact ID
{contact.contact_source} - Source of Contact Data
{contact.note} - Note

Tokens for Custom Fields

To insert a token which references a custom field value, use custom_ plus the custom field ID. For example, to reference the custom field whose ID = 3 -> {contact.custom_3}

You can confirm a custom field ID by navigating to Administer CiviCRM » Custom Data » View and Edit Field. Then mouse over the Edit link for the field and check the id= value of the Edit URL. For example, for custom field 1 on the demo site the Edit link is:

http://drupal.demo.civicrm.org/civicrm/admin/custom/group/field?action=update&reset=1&gid=1&id=1

Tokens for the custom fields included in CiviCRM sample data:
{contact.custom_1} - Most Important Issue
{contact.custom_2} - Marital Status


Added by David Greenberg , last edited by xavier dutoit on Feb 25, 2008  (view change)
Labels: 
(None)

Recently Updated  |  Documentation Credits

Powered by a free Atlassian Confluence Open Source Project License granted to CiviCRM . Evaluate Confluence today.
Powered by Atlassian Confluence 2.7.1, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators