|
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, as well as in the Send Email to Contact(s) feature (accessed from the contact summary screens and search results) AND Mailing Labels. Refer to CiviMail Action Tokens to learn about tokens you can use to insert into CiviMail messages for actions like forwarding and unsubscribing.
Tokens for Standard Contact FieldsThe 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 Tokens for Custom FieldsTo 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:
More On Checksum TokensThere is a very powerful feature to allow you to send an email with CiviMail to your constituents with a link to the contribution form or profile with all of their contact information already filled in! This saves them the hassle of filling it out and increasing the chances they would ultimately donate. Or it can be a simple way to periodically allow people to review their contact info and update it if applicable. The way it works is you create a "special" link in the CiviMail message that includes the checksum token {contact.checksum}. When people click on the special link, it looks them up in the database and prefills any information on the contribution form or profile with any data that exists in their record. The special link lasts for seven days from the time it was sent out.To send people to a contribution page use this path: [http://www.myorganization.org/civicrm/contribute/transact?reset=1&id=N&{contact.checksum}&cid={contact.contact_id}|http://www.myorganization.org/civicrm/contribute/transact?reset=1&id=N&{contact.checksum}&cid={contact.contact_id} where N is the ID of your contribution page. To send people to a profile use this path: |http://www.myorganization.org/civicrm/profile/edit?reset=1&gid=N&id={contact.contact_id}&{contact.checksum} where N is the ID of the Profile you want to send them to. For Joomla! users this would be |http://www.example.org/index.php?option=com_civicrm&task=civicrm/profile/edit?reset=1&gid=N&id={contact.contact_id}&{contact.checksum} Also note that the checksum token exists at least back to 2.0.7, but can only be used in profile editing (i.e. not for transactions) until version 2.2, but if you'd like it to work for earlier versions, see the patch here: http://issues.civicrm.org/jira/browse/CRM-3853 |
