Answers.Body: <p>Unless writing an extension implementing token processor its not possible to fetch the participant id in reminders.</p>
  <p>If you familiar with smarty and the contact will have only one participant for a event than you can try below snippet in your reminder message template</p>
  <pre><code>{capture assign=eventID}{event.event_id}{/capture}
  {capture assign=contactId}{contact.contact_id}{/capture}
  
  {crmAPI var='result' entity='Participant' action='getvalue' sequential=0 return=&quot;id&quot; event_id=$eventID contact_id=$contactId}
  {foreach from=$result.values item=participant}
   Participant Id - {$participant.id}
  {/foreach}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-26T13:37:55.283Z
Answers.Text: So I tried something akin to that, not sure I included `sequential=0`, however... when I put that in the template editor it just rendered that code. Is there a place in the filesystem where these templates get stored? Or would I potentially need to hop into the the database and edit where the template it stored? Any thoughts are greatly appreciated!!!
Answers.UserDisplayName: Kellen Murphy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-25T23:41:10.247Z
Answers.LastActivityDate: 2021-03-25T23:41:10.247Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>We're intending to use an event's participant ID as a pseudo-registration code, i.e. a quick way for us to correlate who shows up to events. Because of that, we are asking our event participants to know their participant ID when they arrive.</p>
  <p>So far, we've adapted the <code>ThankYou.tpl</code> event registration confirmation page to show the user their participant ID by adding the following:</p>
  <pre><code>&lt;p&gt;&lt;strong&gt;{ts 1=$participantIDs.0}Your registration number is: %1{/ts}&lt;/strong&gt;&lt;/p&gt;
  </code></pre>
  <p>and we've adjusted the template for the event registration email to show <code>$participantID</code> as well (inside <code>Mailings -&gt; Message Templates -&gt; System Workflow Messages -&gt; Events - Registration Confirmation and Receipt (on-line)</code>).</p>
  <p>Now, we'd like to add that value on to a reminder message. We've set up the reminder template under <code>Mailings -&gt; Message Templates -&gt; User driven messages</code> and are able to get the reminders to send correctly, but it's not clear how to get the participant ID to show up. It's certainly not listed within the available tokens.</p>
  <p>Is there a way to add a participant id to a template there? Can I link participant_id to the available tokens in some way?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-03-25T22:10:18.827Z
Comments.Text: was there a reason giving them their Contact ID would not have worked?
Comments.UserDisplayName: petednz - fuzion
Tags: <civievent><scheduled-reminders><templates>
Title: Can one show participantID on event reminder?
ThreadText: # Can one show participantID on event reminder?
  
  (Asked by: username_0 on 2021-03-25)
  
  We're intending to use an event's participant ID as a pseudo-registration code, i.e. a quick way for us to correlate who shows up to events. Because of that, we are asking our event participants to know their participant ID when they arrive.
  
  So far, we've adapted the `ThankYou.tpl` event registration confirmation page to show the user their participant ID by adding the following:
  
  ```
  <p><strong>{ts 1=$participantIDs.0}Your registration number is: %1{/ts}</strong></p>
  
  ```
  
  and we've adjusted the template for the event registration email to show `$participantID` as well (inside `Mailings -> Message Templates -> System Workflow Messages -> Events - Registration Confirmation and Receipt (on-line)`).
  
  Now, we'd like to add that value on to a reminder message. We've set up the reminder template under `Mailings -> Message Templates -> User driven messages` and are able to get the reminders to send correctly, but it's not clear how to get the participant ID to show up. It's certainly not listed within the available tokens.
  
  Is there a way to add a participant id to a template there? Can I link participant\_id to the available tokens in some way?
  
  **Tags:** civievent, scheduled-reminders, templates
  
  > **Comments:**
  > **username_1**: was there a reason giving them their Contact ID would not have worked?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2021-03-25. Score: 0
  
  Unless writing an extension implementing token processor its not possible to fetch the participant id in reminders.
  
  If you familiar with smarty and the contact will have only one participant for a event than you can try below snippet in your reminder message template
  
  ```
  {capture assign=eventID}{event.event_id}{/capture}
  {capture assign=contactId}{contact.contact_id}{/capture}
  
  {crmAPI var='result' entity='Participant' action='getvalue' sequential=0 return="id" event_id=$eventID contact_id=$contactId}
  {foreach from=$result.values item=participant}
   Participant Id - {$participant.id}
  {/foreach}
  
  ```
  
  > **Comments:**
  > **username_0**: So I tried something akin to that, not sure I included `sequential=0`, however... when I put that in the template editor it just rendered that code. Is there a place in the filesystem where these templates get stored? Or would I potentially need to hop into the the database and edit where the template it stored? Any thoughts are greatly appreciated!!!  
  
  ---
  
  