12 votes

How do contact hashes work, and how do I keep them secure?

My understanding is that Lobo's answer above is slightly misleading (at least if you read it 100% literally--the gist what he is saying is exactly correct, as usual, but the exact terminology may lead ...
flug's user avatar
  • 121
7 votes

How do I change my organisation's address in a mailing?

You can change your organization address by going to Administer > Communications > Organization Address and contact info. Alternatively and less recommended,you can disable the check for mandatory ...
Yossi's user avatar
  • 2,087
7 votes

Feature request: Make Checksum tokens easier to use

These two extensions should assist - https://civicrm.org/extensions/contact-checksum-ui https://civicrm.org/extensions/fancy-tokens The second extension provides tokens for all active contribution ...
Anil's user avatar
  • 1,963
7 votes
Accepted

Message templates token replacement: is it {if membership_end_date} or {if {membership_end_date}}?

It should be {if '{membership.end_date}'} and {membership.end_date|crmDate}
Pradeep Nayak's user avatar
6 votes
Accepted

{domain...} tokens not parsed in regular mail?

Domain tokens are not replaced when trying to send email activity for a contact. This seems like a bug in civicrm or wrong documentation. This can be fixed by applying below patch. diff --git a/CRM/...
Pradeep Nayak's user avatar
6 votes

Is there a list of tokens anywhere?

This is a bit tricky to answer, because there are three different token processors in CiviCRM. The Smarty processor, the legacy token processor, and the new Civi\TokenProcessor processor. Legacy ...
Jon G - Megaphone Tech's user avatar
6 votes
Accepted

Message template token no longer available / relevant

Yes its safe to remove, so replace {if $contributeMode eq 'direct' AND !$is_pay_later AND $amount GT 0} with {!$is_pay_later AND $amount GT 0}
Pradeep Nayak's user avatar
5 votes
Accepted

Webform submission value token not working

Tapash, I've just tested this myself and I've had success with including the fieldset within the token so that it looks something like the following: [submission:values:...
Matt Lind's user avatar
  • 151
5 votes

Can Legal Name be used as a token?

In order to use legal_name against your message template the best way would be enabling CIVICRM_MAIL_SMARTY to 1 in civicrm_setting.php By doing this you can access {contact.legal_name} in your ...
Ramesh - ARTECH Consultancy's user avatar
5 votes

Is it possible to use CiviCRM tokens in external services?

Simple answer: No. Those tokens are expanded into text strings by CiviMail for each recipient and your third party service is not going to know what values to substitute for those. Complex answer: ...
Aidan's user avatar
  • 13.5k
5 votes

Do any token extensions provide a token for "age" rather than just DOB?

I don't see any either, but the code to use in such an extension (as either a token or even a smarty modifier) seems pretty straightforward: https://github.com/civicrm/civicrm-core/blob/5.19.2/CRM/...
Demerit's user avatar
  • 22.9k
5 votes
Accepted

Do any token extensions provide a token for "age" rather than just DOB?

This sounded like a useful feature, so I added Age tokens to Eileen's CiviTokens extension, which seems to be the most widely used extension of its kind. Until a new release comes out, you'll have to ...
Noah Miller's user avatar
  • 1,057
5 votes
Accepted

Token for {$totalAmount|crmMoney}?

There are multiple "token" systems in CiviCRM depending on your context. {$totalAmount|crmMoney} is a Smarty token, which only works in Smarty emails. System Workflow messages are Smarty, ...
Jon G - Megaphone Tech's user avatar
5 votes
Accepted

Checksum expiration

I found it myself: /civicrm/admin/setting/misc?reset=1 Default setting is 7 days.
Flying's user avatar
  • 2,271
5 votes

What link/token would work in a Scheduled (renewal) Reminder that would allow a person with an existing recurring payment to click and cancel it

Technically it's possible to do using a token processor hook. Each membership is linked to contribution recur via civicrm_membership.contribution_recur_id so if you are using Membership entity for ...
Pradeep Nayak's user avatar
5 votes

How to create a "token" from a custom field

This happens automatically - but you can't use an event token unless you're sending an email that is tied directly to the event. E.g. you can't use CiviMail, because CiviMail doesn't know which event ...
Jon G - Megaphone Tech's user avatar
4 votes
Accepted

Custom Email Greeting token doesn't work

Any chance you don't have smarty enabled for civiMail so your capture-assigns and ifs aren't working in the mail? Try checking your civicrm.settings.php file and look for the line define( '...
Eli Lisseck's user avatar
  • 1,499
4 votes

Fuzion tokens for membership start and end date

The issue is that a contact can have multiple memberships, so you can't use membership tokens unless you display your search results as memberships. In Advanced Search, do your search again, but ...
Jon G - Megaphone Tech's user avatar
4 votes

Listing Groups in a mail template

As far as I know, that token doesn't exist, in core or in an extension. It's not a bad idea though; it would be quick to write. As with most tokens that list multiple fields, the real trick is in ...
Jon G - Megaphone Tech's user avatar
4 votes

Listing Groups in a mail template

As said by Jon its not available in core or in an extension. You can either write extension and implement hook_civicrm_tokens and hook_civicrm_tokenValues to add and generate token for the contact ...
Pradeep Nayak's user avatar
4 votes
Accepted

Best way to fix the 'Dear [display_name} problem

Greeting tokens can use smarty. You can set your default email greeting token at civicrm/admin/options/email_greeting?reset=1, and then in your mail use the greeting token {contact....
Demerit's user avatar
  • 22.9k
4 votes

Outdated tokens in use in message template

Yes - those should be removed - they haven't been around for quite a while. We have quite a number of variables being deprecated in upcoming versions I'm afraid as we are replacing them with more ...
eileen's user avatar
  • 2,224
3 votes
Accepted

How do I create a token that automatically gets urls convert to trackable links?

The BAO responsible for trackable URLs is CRM_Mailing_BAO_TrackableURL link here. Because the MailingJob is available in hook_civicrm_tokenValues you could do something like this: // job details to ...
Andrei's user avatar
  • 2,321
3 votes
Accepted

Is there a way to email a link inviting people to sign up for an event that will be connect to their contact ID?

The contact checksum works equally well for a CiviEvent registration as it does for updating their contact info via a profile. The tokens page of the wiki has a section at the bottom that shows how ...
Jon G - Megaphone Tech's user avatar
3 votes

Is there a bug when placing a token inside quotation marks in CiviMail 4.6.2+?

in CiviCRM 4.6.2 you can patch this issue with the following edit: --- a/a/civicrm-core/CRM/Mailing/BAO/Mailing.php +++ b/b/civicrm-core/CRM/Mailing/BAO/Mailing.php @@ -1472,7 +1472,7 @@ ORDER BY ...
MetroEast's user avatar
3 votes

How can I use existing tokens to send out a single Scheduled Reminder to both the Org and the Employee

We have done this with {membership.owner}, which works for the email that goes to the main contact (with inherited membership) and the organization email. E.g. TestOrg’s membership is due for renewal ...
FWHH's user avatar
  • 81
3 votes
Accepted

Handling null values in tokens in civimail (and elsewhere)

We used the Dave's Blog https://civicrm.org/blog/dave-greenberg/civimail-how-to-add-default-values-for-empty-tokens The blog provides a sample code and the hook which need to be used. We added the ...
jitendra - fuzion's user avatar
3 votes
Accepted

Contact ID Token for Sort Name

There's a place in the CiviCRM code where all the possible contact tokens are defined - and they say which fields they correspond to. The line in question is: 'contact.contact_id' => ...
Jon G - Megaphone Tech's user avatar
3 votes
Accepted

How to create tokens for custom fields (participant, individual, organisation)

Davy, You can use CiviCRM api to fetch the custom fields of participants, contact and then use as smarty in your message template Something like this you can include in invoice template {crmAPI var=...
Pradeep Nayak's user avatar
3 votes

How to use Contact name if nickname is not present in bulk mail?

You will need to turn on CIVICRM_MAIL_SMARTY in civicrm.settings.php to use smarty templating for conditional and more complex logic. Cheers Pradeep
Pradeep Nayak's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible