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) »
  • using fields generated from a custom search or report as mail tokens
Pages: [1]

Author Topic: using fields generated from a custom search or report as mail tokens  (Read 729 times)

Sean Madsen

  • I post occasionally
  • **
  • Posts: 98
  • Karma: 5
  • CiviCRM implementer/developer
    • Bikes Not Bombs
  • CiviCRM version: 4.6
  • CMS version: Drupal 7
using fields generated from a custom search or report as mail tokens
May 12, 2010, 06:26:20 pm
I have a use case here that I'd like to highlight for some desired functionality that would be very useful to us...

Sometimes we send out mail-merged emails that include complicated fields. For example, in someone's email message I may want to include the total amount they have raised with a personal campaign page associated with a given campaign, or possibly the date and amount of their most recent donation. These pieces of information exist in the database but require aggregate logic to extract, hence the CiviCRM token system has no way of representing them. I can utilize the custom search or report functionality to extract these pieces of information, and I'd like to be able to take the results of my search/report one step further by using them as tokens in CiviMail on the fly. The work-flow I envision is: (1) run search/report, (2) send mail to selected contacts, (3) insert tokens, choosing from a list of available tokens that includes columns present in the search/report.

Currently we're achieving this functionality by exporting information to a spreadsheet and then using the Open Office Mail Merge extension to send the messages through our GMail SMTP server. This approach has several obvious drawbacks: (1) complicated work-flow, (2) sending volume limitations, (3) lack of activities created in Civi, (4) lack of automated bounce processing...

Anyone else interested in having this functionality in CiviCRM? How difficult would it be to build?

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: using fields generated from a custom search or report as mail tokens
May 13, 2010, 11:51:54 am

I dont think this is trivial ...

BUT, we do have custom tokens which might help make this a bit easier

so maybe combining custom tokens and custom search in some sort of "pre-defined"/hackish way should get you most of the way there

custom_search.CUSTOMSEARCHID_COLUMNNAME
custom_report.INSTANCEID_COLUMNNAME

the above and some variation of this should give you access to the relevant fields. I think doing the above might be a quicker short term solution

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) »
  • using fields generated from a custom search or report as mail tokens

This forum was archived on 2017-11-26.