Answers.Body: <p>Yes it is possible to include custom contact fields for individuals in messages sent by CiviMail by just selecting the custom field from the list of tokens. </p>
  
  <p>The help on the Insert Token widget for CiviMail explains how to do it for custom organizational contacts, and the same process works for custom household fields as well:</p>
  
  <blockquote>
    <p>Custom tokens (based on custom data) can be added for organizations as well. These tokens will not be displayed in the list of available tokens, but can be added manually. The format is {contact.custom_12} – where 12 is the ID of the custom data field. To find the custom data field ID, go Administer > Customize Data &amp; Screens > Custom Fields and click ‘edit’ on the field you want to use. Look at the URL. The last part of the URL will be an equal sign and a number (=12). The number (12 in this example) is the id of that custom field.</p>
  </blockquote>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-04T19:54:10.483Z
Answers.Text: Note that this process only works for custom fields on contacts, not on things like memberships or participant records.
Answers.UserDisplayName: Joe Murray
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-04T20:44:22.283Z
Answers.Text: Worked like a charm for a single field.  Is there a way to specify a field within a custom group?
Answers.UserDisplayName: Marilyn Schiffman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-06T02:04:22.740Z
Answers.Text: Can you clarify, as all custom fields are in groups of custom fields that appear in the  browser as fieldsets? Custom fields on individual contacts can be inserted using the widget for toens just above and to right of the message body in the CiviMail editor page. The custom fileds have a double colon in their name, and after it the name of the custom group that they are a part of. Alternatively, you can use the quoted instructions to insert custom fields for Individual contacts too. But I have the sense you mean something else...
Answers.UserDisplayName: Joe Murray
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-07T14:34:38.003Z
Answers.Text: I'm sorry to have taken your time on this.  What I was referring to were fields with multiple checkboxes, such as volunteer availability.  But I can think of other ways to deal with this.
Answers.UserDisplayName: Marilyn Schiffman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-01T04:10:10.663Z
Answers.LastActivityDate: 2015-04-02T20:47:05.343Z
Answers.LastEditDate: 2015-04-02T20:47:05.343Z
Answers.UserDisplayName: Joe Murray
Answers.Body: <p>I have custom data fields, and they are 'multi-value' sets (e.g. employment history; John has 3 prior jobs attached to his contact profile.)  These data elements are not currently available by default in CiviCRM.  In order for me to be able to use these custom data elements in CiviMail, I had to write a bit of code in a Drupal Module to implement the proper 'hooks' as described at <a href="http://wiki.civicrm.org/confluence/display/CRMDOC/Customized+%28and+Custom%29+Tokens" rel="nofollow">http://wiki.civicrm.org/confluence/display/CRMDOC/Customized+%28and+Custom%29+Tokens</a> See my code at <a href="http://pastebin.com/LaDq0z82" rel="nofollow">http://pastebin.com/LaDq0z82</a> </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-29T19:40:04.823Z
Answers.LastActivityDate: 2015-07-29T19:40:04.823Z
Answers.UserDisplayName: Greg Rundlett
Answers.Body: <p>I have just created a number of custom tokens for things like relationships, mailing lists and some multi-value custom fields.  I used hooks to do so, and found the API explorer (Support -> Development -> API Explorer)very useful in the development as it helped create the key code to get the data. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-12T21:20:10.503Z
Answers.LastActivityDate: 2016-04-12T21:20:10.503Z
Answers.UserDisplayName: Stephen Palmstrom
Body: <p>I want to add custom fields to mail templates without writing tokens.  Is this possible?</p>
  
  <p>If so, where can I find the entity relationship diagram for civi?
  Thanks,</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-03-31T22:12:38.033Z
Comments.Text: Are these custom fields associated with something other than contacts, e.g. contributions, membership?  If they are on contacts, then the custom fields are on the list of tokens.
Comments.UserDisplayName: Paul-Tahoe
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-01T00:26:15.953Z
Comments.Text: Paul-Tahoe - I think your "comment" could rightfully be considered an "answer" here - and the correct one, at that!
Comments.UserDisplayName: Jon G - Megaphone Tech
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-01T08:20:40.767Z
Comments.Text: Just curious - why did you want to 'find the entity relationship diagram' to answer this question?
Comments.UserDisplayName: michaelmcandrew
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-01T23:17:43.927Z
Comments.Text: The entity diagram is how I've found the mapping of database tables, relations and fields.  Is there another way for me to determine field names?
Comments.UserDisplayName: Marilyn Schiffman
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-02T00:09:58.440Z
Comments.Text: With regard to contacts, yes, I know about the tokens.  I want to be able to include membership, relationship, contribution fields in my messages.  For example, the representative for an organization and the organization's contributions in December.  Event registration communications with the org registering and its designated contact.  There are so many needs we have for crossing civi modules.
Comments.UserDisplayName: Marilyn Schiffman
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-02T20:45:33.137Z
Comments.Text: Marilyn, could you put you question in the comment above about how to find fieldnames into a separate question? It's a good one.
Comments.UserDisplayName: Joe Murray
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-02T20:50:30.447Z
Comments.Text: Could you also ask separate question about whether/how to include fields for contributions, memberships, relationships etc in bulk emails? Thanks.
Comments.UserDisplayName: Joe Murray
Tags: <civimail><tokens>
Title: Can I put custom field tokens into a message template?
ThreadText: # Can I put custom field tokens into a message template?
  
  (Asked by: username_0 on 2015-03-31)
  
  I want to add custom fields to mail templates without writing tokens. Is this possible?
  
  If so, where can I find the entity relationship diagram for civi?
  Thanks,
  
  **Tags:** civimail, tokens
  
  > **Comments:**
  > **username_1**: Are these custom fields associated with something other than contacts, e.g. contributions, membership?  If they are on contacts, then the custom fields are on the list of tokens.  
  > **username_2**: username_1 - I think your "comment" could rightfully be considered an "answer" here - and the correct one, at that!  
  > **username_3**: Just curious - why did you want to 'find the entity relationship diagram' to answer this question?  
  > **username_0**: The entity diagram is how I've found the mapping of database tables, relations and fields.  Is there another way for me to determine field names?  
  > **username_0**: With regard to contacts, yes, I know about the tokens.  I want to be able to include membership, relationship, contribution fields in my messages.  For example, the representative for an organization and the organization's contributions in December.  Event registration communications with the org registering and its designated contact.  There are so many needs we have for crossing civi modules.  
  > **username_4**: Marilyn, could you put you question in the comment above about how to find fieldnames into a separate question? It's a good one.  
  > **username_4**: Could you also ask separate question about whether/how to include fields for contributions, memberships, relationships etc in bulk emails? Thanks.  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_4 on 2015-04-01. Score: 11
  
  Yes it is possible to include custom contact fields for individuals in messages sent by CiviMail by just selecting the custom field from the list of tokens.
  
  The help on the Insert Token widget for CiviMail explains how to do it for custom organizational contacts, and the same process works for custom household fields as well:
  
  > Custom tokens (based on custom data) can be added for organizations as well. These tokens will not be displayed in the list of available tokens, but can be added manually. The format is {contact.custom\_12} – where 12 is the ID of the custom data field. To find the custom data field ID, go Administer > Customize Data & Screens > Custom Fields and click ‘edit’ on the field you want to use. Look at the URL. The last part of the URL will be an equal sign and a number (=12). The number (12 in this example) is the id of that custom field.
  
  > **Comments:**
  > **username_4**: Note that this process only works for custom fields on contacts, not on things like memberships or participant records.  
  > **username_0**: Worked like a charm for a single field.  Is there a way to specify a field within a custom group?  
  > **username_4**: Can you clarify, as all custom fields are in groups of custom fields that appear in the  browser as fieldsets? Custom fields on individual contacts can be inserted using the widget for toens just above and to right of the message body in the CiviMail editor page. The custom fileds have a double colon in their name, and after it the name of the custom group that they are a part of. Alternatively, you can use the quoted instructions to insert custom fields for Individual contacts too. But I have the sense you mean something else...  
  > **username_0**: I'm sorry to have taken your time on this.  What I was referring to were fields with multiple checkboxes, such as volunteer availability.  But I can think of other ways to deal with this.  
  
  ---
  
  ### Answer by username_5 on 2015-07-29. Score: 3
  
  I have custom data fields, and they are 'multi-value' sets (e.g. employment history; John has 3 prior jobs attached to his contact profile.) These data elements are not currently available by default in CiviCRM. In order for me to be able to use these custom data elements in CiviMail, I had to write a bit of code in a Drupal Module to implement the proper 'hooks' as described at <http://wiki.civicrm.org/confluence/display/CRMDOC/Customized+%28and+Custom%29+Tokens> See my code at <http://pastebin.com/LaDq0z82>
  
  
  ---
  
  ### Answer by username_6 on 2016-04-12. Score: 0
  
  I have just created a number of custom tokens for things like relationships, mailing lists and some multi-value custom fields. I used hooks to do so, and found the API explorer (Support -> Development -> API Explorer)very useful in the development as it helped create the key code to get the data.
  
  
  ---
  
  