Answers.Body: <p>The feature seems to be available just it seems very few components use it. For example if you do a contribution search and then choose to send thank you letters from the actions dropdown, it DOES convert the tokens in the filed activity on the contact.</p>
  
  <p>In the code if the caller of this function includes the <code>$perContactHtml</code> parameter, then the activities get filed with the tokens converted:
  <a href="https://github.com/civicrm/civicrm-core/blob/5.18.4/CRM/Contact/Form/Task/PDFLetterCommon.php#L278" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/blob/5.18.4/CRM/Contact/Form/Task/PDFLetterCommon.php#L278</a></p>
  
  <p>The contribution one does do that, e.g.
  <a href="https://github.com/civicrm/civicrm-core/blob/5.18.4/CRM/Contribute/Form/Task/PDFLetterCommon.php#L127" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/blob/5.18.4/CRM/Contribute/Form/Task/PDFLetterCommon.php#L127</a></p>
  
  <p>and here is where it resolves the tokens:
  <a href="https://github.com/civicrm/civicrm-core/blob/5.18.4/CRM/Contribute/Form/Task/PDFLetterCommon.php#L431" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/blob/5.18.4/CRM/Contribute/Form/Task/PDFLetterCommon.php#L431</a></p>
  
  <p>But it seems most of them don't and so it uses the default which is just the verbatim text.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-11-01T13:50:09.613Z
Answers.Text: I do think that is really odd behaviour, I can't understand the rationale.
  
  Still, if $perContactHTML is available in contributions then I guess it is possible to do it elsewhere as well.
Answers.UserDisplayName: Simon Walden
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-11-01T13:59:40.950Z
Answers.Text: I don't think it's intentional, just the way the software has evolved and it's just a matter of someone doing or sponsoring the work. As a workaround for emails you can set up the email processor (https://docs.civicrm.org/sysadmin/en/latest/setup/civimail/inbound/#autofiling-email-activities-via-emailprocessor) and include the special email processor email address as a bcc recipient which will file the actual email in civi.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-29T13:56:35.023Z
Answers.LastActivityDate: 2019-10-29T13:56:35.023Z
Answers.UserDisplayName: Demerit
Body: <p>This seems to be standard that the literal token {contact.display_name} is saved not the generated result "John Doe".</p>
  
  <p>To my mind this is useless - the data changes - so how can I view the actual letter emailed or printed?</p>
  
  <p>And what is the point of saving the template if it only contains the tokens - you could up saving thousands of identical templates none of which contain any useful information.</p>
  
  <p>Is there a way I can save the generated content inside civiCRM?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-10-29T19:13:33.550Z
Comments.Text: are you talking about what is saved in the Activity that is created for when an Email (one to one) is sent?
Comments.UserDisplayName: petednz - fuzion
Tags: <email>
Title: How do you save generated content not tokens in emails & print/merge?
ThreadText: # How do you save generated content not tokens in emails & print/merge?
  
  (Asked by: username_0 on 2019-10-29)
  
  This seems to be standard that the literal token {contact.display\_name} is saved not the generated result "John Doe".
  
  To my mind this is useless - the data changes - so how can I view the actual letter emailed or printed?
  
  And what is the point of saving the template if it only contains the tokens - you could up saving thousands of identical templates none of which contain any useful information.
  
  Is there a way I can save the generated content inside civiCRM?
  
  **Tags:** email
  
  > **Comments:**
  > **username_1**: are you talking about what is saved in the Activity that is created for when an Email (one to one) is sent?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2019-10-29. Score: 3
  
  The feature seems to be available just it seems very few components use it. For example if you do a contribution search and then choose to send thank you letters from the actions dropdown, it DOES convert the tokens in the filed activity on the contact.
  
  In the code if the caller of this function includes the `$perContactHtml` parameter, then the activities get filed with the tokens converted:
  <https://github.com/civicrm/civicrm-core/blob/5.18.4/CRM/Contact/Form/Task/PDFLetterCommon.php#L278>
  
  The contribution one does do that, e.g.
  <https://github.com/civicrm/civicrm-core/blob/5.18.4/CRM/Contribute/Form/Task/PDFLetterCommon.php#L127>
  
  and here is where it resolves the tokens:
  <https://github.com/civicrm/civicrm-core/blob/5.18.4/CRM/Contribute/Form/Task/PDFLetterCommon.php#L431>
  
  But it seems most of them don't and so it uses the default which is just the verbatim text.
  
  > **Comments:**
  > **username_0**: I do think that is really odd behaviour, I can't understand the rationale.  Still, if $perContactHTML is available in contributions then I guess it is possible to do it elsewhere as well.  
  > **username_2**: I don't think it's intentional, just the way the software has evolved and it's just a matter of someone doing or sponsoring the work. As a workaround for emails you can set up the email processor (https://docs.civicrm.org/sysadmin/en/latest/setup/civimail/inbound/#autofiling-email-activities-via-emailprocessor) and include the special email processor email address as a bcc recipient which will file the actual email in civi.  
  
  ---
  
  