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 Drupal Modules (Moderator: Donald Lobo) »
  • Need help please with a triggered email on download/civicrm profile question..
Pages: [1]

Author Topic: Need help please with a triggered email on download/civicrm profile question..  (Read 745 times)

galdi56

  • I’m new here
  • *
  • Posts: 19
  • Karma: 0
  • CiviCRM version: 4.1.beta3
  • CMS version: Drupal 6
  • MySQL version: 5.1.49
  • PHP version: PHP Version 5.3.3-7+squeeze3
Need help please with a triggered email on download/civicrm profile question..
February 25, 2012, 06:14:55 am
Hi all

I'm trying to setup a rule that emails an alert from drupal on a file download (so far, so easy, using rules module).. but i get stuck trying to work out how to include fields from the logged in user's civicrm profile (such as name and phone number..).... I have the drupal civicrm-rules module activited, but this obviously doesn't do what i thought it might!

I think i must be missing something obvious as this appears to be a fairly straightforward requirement and would welcome any advice as to how to go about it.

Am using D6 plus 4.1
« Last Edit: February 26, 2012, 06:23:11 am by galdi56 »

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: Need help please with a triggered event/email/civicrm profile question..
February 25, 2012, 09:46:30 am

U'll need to write your own rules action handler and use the civicrm api to get the name/phone field of the logged in user

another possibility might to extend the drupal token module to include civicrm fields, in which case u'll need to investigate and write code for token module integration

please do share your changes / solution

thanx

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

galdi56

  • I’m new here
  • *
  • Posts: 19
  • Karma: 0
  • CiviCRM version: 4.1.beta3
  • CMS version: Drupal 6
  • MySQL version: 5.1.49
  • PHP version: PHP Version 5.3.3-7+squeeze3
Re: Need help please with a triggered email on download/civicrm profile question..
February 26, 2012, 06:28:37 am
Thanks for the reply Lobo - not a criticism of your response but i was hoping that this must have been addressed many time before so maybe i'm not describing my issue well!!

Another way i though might be to have a drupal rule triggered by a file download which first..

1) copies the fields i want to email from the civicrm profile into a matching set of drupal fields. (this is the bit i need)

2) then embeds the drupal fields in the email using a standard tokenised email. (this bit is ok!)

So what i would need is some php to put into the drupal rule action - i thought i had found something suitable in another thread but it does it the wrong way around and updates the civicrm profile from drupal!. Im guessing its not a straightforward select statement or two then!

I'm a bit of a dummy when it comes to PHP (but willing to have a go if someone could just give me a little more help!!)

Cheers

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: Need help please with a triggered email on download/civicrm profile question..
February 26, 2012, 07:54:56 am

I would definitely check and research integration with drupal tokens. That is way more extensible and can potentially handle other fields rather than hard coding just a few

I suspect u do need drupal / civicrm / php expertise and/or convince/hire a developer to do so.

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 Drupal Modules (Moderator: Donald Lobo) »
  • Need help please with a triggered email on download/civicrm profile question..

This forum was archived on 2017-11-26.