Answers.Body: <p>It would be <code>{contact.checksum}</code> not contact.hash, and without the <code>cn</code> (I'm not even sure what cn would be - there's no <code>cn</code> parameter that I know of).</p>
  <p>So <code>https://www.domain.ca/?option=com_civicrm&amp;task=civicrm/event/register&amp;reset=1&amp;id=24&amp;cid={contact.id}&amp;{contact.checksum}</code></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-07-18T15:54:07.697Z
Answers.Text: Fantastic! That works as I had hoped. Thanks for your help!
Answers.UserDisplayName: A. Block
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-07-17T17:07:28.567Z
Answers.LastActivityDate: 2024-07-17T17:07:28.567Z
Answers.UserDisplayName: Demerit
Body: <p>I'm using civiDiscount with an automatic discount set up for a single event and several membership types.</p>
  <p>I'd like to use civiMail to send out an invitation to all members to invite them to register for the event.</p>
  <p>For members who match the automatic civiDiscount rule, I would have thought that if I have a [Register Now] link like:</p>
  <p><a href="https://www.domain.ca/?option=com_civicrm&amp;task=civicrm/event/register&amp;reset=1&amp;id=24&amp;cid=%7Bcontact.id%7D&amp;cn=%7Bcontact.hash%7D" rel="nofollow noreferrer">https://www.domain.ca/?option=com_civicrm&amp;task=civicrm/event/register&amp;reset=1&amp;id=24&amp;cid={contact.id}&amp;cn={contact.hash}</a></p>
  <p>That civiCRM/civiDiscount would recognize the cid value and apply the automatic discount on the registration page if the contact meets the civiDiscount rule, thereby circumventing the need for the contact to log in ... but this doesn't appear to be the case.</p>
  <p>I see I can include the parameter &amp;discountcode=YYYY in the URL to have the discount code applied, but that means I'd have to send a custom email to each membership type.</p>
  <p>Is there any way to accomplish my goal of having the automatic discount applied for non-logged in contacts by using the registration link:</p>
  <p><a href="https://www.domain.ca/?option=com_civicrm&amp;task=civicrm/event/register&amp;reset=1&amp;id=24&amp;cid=%7Bcontact.id%7D&amp;cn=%7Bcontact.hash%7D" rel="nofollow noreferrer">https://www.domain.ca/?option=com_civicrm&amp;task=civicrm/event/register&amp;reset=1&amp;id=24&amp;cid={contact.id}&amp;cn={contact.hash}</a></p>
  
Tags: <civievent><cividiscount>
Title: Event Registration using contact hash?
ThreadText: # Event Registration using contact hash?
  
  (Asked by: username_0 on 2024-07-17)
  
  I'm using civiDiscount with an automatic discount set up for a single event and several membership types.
  
  I'd like to use civiMail to send out an invitation to all members to invite them to register for the event.
  
  For members who match the automatic civiDiscount rule, I would have thought that if I have a [Register Now] link like:
  
  [https://www.domain.ca/?option=com\_civicrm&task=civicrm/event/register&reset=1&id=24&cid={contact.id}&cn={contact.hash}](https://www.domain.ca/?option=com_civicrm&task=civicrm/event/register&reset=1&id=24&cid=%7Bcontact.id%7D&cn=%7Bcontact.hash%7D)
  
  That civiCRM/civiDiscount would recognize the cid value and apply the automatic discount on the registration page if the contact meets the civiDiscount rule, thereby circumventing the need for the contact to log in ... but this doesn't appear to be the case.
  
  I see I can include the parameter &discountcode=YYYY in the URL to have the discount code applied, but that means I'd have to send a custom email to each membership type.
  
  Is there any way to accomplish my goal of having the automatic discount applied for non-logged in contacts by using the registration link:
  
  [https://www.domain.ca/?option=com\_civicrm&task=civicrm/event/register&reset=1&id=24&cid={contact.id}&cn={contact.hash}](https://www.domain.ca/?option=com_civicrm&task=civicrm/event/register&reset=1&id=24&cid=%7Bcontact.id%7D&cn=%7Bcontact.hash%7D)
  
  **Tags:** civievent, cividiscount
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-07-17. Score: 1
  
  It would be `{contact.checksum}` not contact.hash, and without the `cn` (I'm not even sure what cn would be - there's no `cn` parameter that I know of).
  
  So `https://www.domain.ca/?option=com_civicrm&task=civicrm/event/register&reset=1&id=24&cid={contact.id}&{contact.checksum}`
  
  > **Comments:**
  > **username_0**: Fantastic! That works as I had hoped. Thanks for your help!  
  
  ---
  
  