CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • A token specific for a mobile phone number
Pages: [1]

Author Topic: A token specific for a mobile phone number  (Read 605 times)

Upperholme

  • Administrator
  • Ask me questions
  • *****
  • Posts: 568
  • Karma: 8
    • MC3
  • CiviCRM version: 4.x
  • CMS version: Drupal 6.x/7.x, Wordpress, Joomla
A token specific for a mobile phone number
July 27, 2012, 08:31:11 am
Given the support for SMS messaging in the latest version of CiviCRM, the importance of accurate mobile phone numbers for contacts becomes a major priority for organisations looking to use the SMS functionality for communications.

A great way to help improve the number and accuracy of mobile phone numbers stored is to expose the number (or lack of it) in emails, and using the checksum feature, invite email recipients to update/amend their record accordingly.

I'm working with a client that wants to do just this, and is using CiivCRM with Wordpress. Sadly there does not seem to be an in-built mailing token for a mobile phone number.

Now. on a good day I might be encouraged to have a stab at implementing the hook feature to create a custom token (I've looked at the documentation, and whilst scary, could potentially give me enough information, together with copying and tweaking from someone else's work, to put something together that might even work. But from what I can gather this approach won't work with Wordpress (yet)?

So it seems we're stuck, for now at least. Perhaps I'm wrong.

I would suggest that the availability of SMS functionality indicates that a mailing token for mobile phone number should be available off the shelf and not be a custom option.

Thanks
Graham
Graham Mitchell
http://mc3.coop

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: A token specific for a mobile phone number
July 27, 2012, 04:52:41 pm

When you have your next good day, you can write a patch for core that includes this token.

Most contact tokens come from the generalized search query, but i suspect we might not be able to get the SMS phone number easily (since it might not be primary etc). Might want to hardcode it like the checksum token. The relevant file is:

CRM/Utils/Token.php, search for functions with the name Contact

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • A token specific for a mobile phone number

This forum was archived on 2017-11-26.