Answers.Body: <p>I'm not sure I can answer whether it's the 'correct' behavior. But I can verify that when you email or 'print/merge a document' with tokens, the activity detail records the literal tokens, not the generated content. (Just for clarity of anyone reading and not familiar - i.e. it will show the token {contact.addressee} in the details for the activity versus "John Doe".)</p>
  
  <p>For the 'print/merge document' side - if you turn on record generated letter (System Settings > Misc), the pdf that attaches to the activity will showcase the generated tokens.</p>
  
  <p>My guess is that it's easier to record the tokens rather than the generated content especially when you consider you can store the same activity on multiple contacts i.e. you email a group of 15 people, they all get the same activity stored but it contains multiple 'with' contacts.</p>
  
  <p>Strangely enough, if you send through CiviMail and then view the activity details it does show the generated token. Although this is also probably not the ideal behavior because it shows the evaluated token at the moment you view the activity - not from when it was sent. </p>
  
  <p>In summary, what you have described (I can't vouch for CiviRules) is the current 'standard' behavior.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-14T22:39:34.117Z
Answers.LastActivityDate: 2019-01-14T22:39:34.117Z
Answers.UserDisplayName: RayWright
Body: <p>I have used tokens in a template for sending out as emails and as a mail merge documents.  It seemed that while the emails sent and the documents downloaded have their tokens correctly evaluated, the respective activities are not recording the actual documents/email with the tokens evaluated.  Is this correct?</p>
  
  <p>Separately i have a CiviRule sent out the emails via the same template and the corresponding email activity recorded do have their tokens correctly evaluated.   I thought the correct behaviour should be like this, rather than recording a template within the Activities.   So i thought this is an anomaly, but applies to only if you do the sending/printing directly on the record.  Is that the right understanding ?  Thanks.</p>
  
  <p>Clement</p>
  
Tags: <activities>
Title: Tokens not evaluated in Activities
ThreadText: # Tokens not evaluated in Activities
  
  (Asked by: username_0 on 2019-01-09)
  
  I have used tokens in a template for sending out as emails and as a mail merge documents. It seemed that while the emails sent and the documents downloaded have their tokens correctly evaluated, the respective activities are not recording the actual documents/email with the tokens evaluated. Is this correct?
  
  Separately i have a CiviRule sent out the emails via the same template and the corresponding email activity recorded do have their tokens correctly evaluated. I thought the correct behaviour should be like this, rather than recording a template within the Activities. So i thought this is an anomaly, but applies to only if you do the sending/printing directly on the record. Is that the right understanding ? Thanks.
  
  username_0
  
  **Tags:** activities
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-01-14. Score: 1 | Accepted answer
  
  I'm not sure I can answer whether it's the 'correct' behavior. But I can verify that when you email or 'print/merge a document' with tokens, the activity detail records the literal tokens, not the generated content. (Just for clarity of anyone reading and not familiar - i.e. it will show the token {contact.addressee} in the details for the activity versus "John Doe".)
  
  For the 'print/merge document' side - if you turn on record generated letter (System Settings > Misc), the pdf that attaches to the activity will showcase the generated tokens.
  
  My guess is that it's easier to record the tokens rather than the generated content especially when you consider you can store the same activity on multiple contacts i.e. you email a group of 15 people, they all get the same activity stored but it contains multiple 'with' contacts.
  
  Strangely enough, if you send through CiviMail and then view the activity details it does show the generated token. Although this is also probably not the ideal behavior because it shows the evaluated token at the moment you view the activity - not from when it was sent.
  
  In summary, what you have described (I can't vouch for CiviRules) is the current 'standard' behavior.
  
  
  ---
  
  