1

I want to send a reminder to the assignee of an activity and I want to add in the message the phone number (preventing the assignee to log into CRM and spare clicks).

I found these tokens from here:

{activity.activity_id}
{activity.subject}
{activity.details}
{activity.activity_date_time}

and they work properly with CiviRules but they are not enough. It would be great to have extra tokens with e-mail, phone number and a few others.

Are they available right now or could they be available? If needed we could write an extension.

2 Answers 2

2

You can use smarty to get contact details of the target of the activity.

https://civicrm.stackexchange.com/a/31516/8748

snippet:

{if $contact.activity_id}
  {crmAPI var='activityResult' entity='Activity' action='getsingle' return="target_contact_id" id=$contact.activity_id}
  {crmAPI var='contactResult' entity='Contact' action='getsingle' return="phone,email" id=$activityResult.target_contact_id}
  <tr>
    <td>Phone Number</td>
    <td>{$contactResult.phone}</td>
  </tr>
  <tr>
    <td>Email</td>
    <td>{$contactResult.email}</td>
  </tr>
{/if}
1
  • simple and efficient. Thanks Anatole Commented Apr 28, 2021 at 10:25
2

This extension could possibly help - https://civicrm.org/extensions/activity-tokens

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.