courtly
courtly
courtly
courtly

Upcoming Events

San Francisco CiviCRM Meetup - February 8th, 2012
February 8th, 2012
Come meet others from the Bay Area who are interested in, using or developing (more...)

UK usergroup - London meetup
February 8th, 2012
Come and meet others from the UK that are using CiviCRM or are interested in (more...)

London user and administrator training
February 23rd, 2012
A comprehensive two day hands on training course covering the configuration, (more...)

CiviCRM London sprint Feb 2012
February 27th, 2012
Following the CiviCRM training here in London, we will have a CiviCRM code (more...)

UK South West - CiviCRM Meetup
March 20th, 2012
Come meet others from the Area who are interested in, using or developing for (more...)

[Bristol, UK] user and administrator training
March 21st, 2012
A comprehensive hands on training course covering the configuration, (more...)

San Francisco user and administrator training
March 29th, 2012
A comprehensive two day hands on training course covering the configuration, (more...)

CiviCRM Usability, Test and Code Sprint - San Francisco (March 2012)
March 29th, 2012
This usability, code and test sprint is targeted at CiviCRM users and (more...)

CiviCon 2012 San Francisco Bay Area - April 2nd 2012
April 2nd, 2012
CiviCon is THE annual event bringing together the people who use, develop, (more...)

CiviCRM Documentation, Test and Code Sprint - after CiviCon San Francisco (April 2012)
April 4th, 2012
This sprint is targeted at CiviCRM users and developers who want to work on (more...)

CiviCRM Components

Tools for engaging your supporters...

CiviContribute


CiviEvent


CiviMail


CiviMember


CiviReport


CiviCRM integration with Drupal Rules module

Not Just a Contact Database

These optional components give you more power to connect and engage your supporters.

  • civiCASE

  • Case management for clients and constituents.

  • civiEVENT

  • Online event registration and participant tracking.

  • civiMEMBER

  • Online signup and membership management.

  • civiMAIL

  • Personalized email blasts and newsletters.

  • civiREPORT

  • Report generation and template management.

December 13, 2009 - 07:40 — lobo

Workflow has been an important piece missing from CiviCRM. We figured that integrating with the Rules module in Drupal would address this problem. I decided to tackle it on as a weekend project :)

Kudos to the rules developer, Wolfgang Zeigler for designing AND documenting an excellent module. The developer documentation is very comprehensive and along with the integration modules, i was able to write an integration module in a few hours. The source code for the module can be found in our svn repository

We hope to address and answer some of the integration questions with the community, similar to how the Views Integration Module has been developed. CiviCRM has got pretty good hook support, so I suspect adding extensive rules support is very feasible, i.e. fire rules based on CiviCRM hooks. We need to answer a few other questions to help us move this integration forward in a fruitful manner:

  • Data types to expose? Exposing all the top level CiviCRM objects as data types makes sense out here. Pretty much the same set of objects/tables that Views exposes (Contact, Contribution, Participant, Member, Activity)
  • Events to fire? Firing a rules event for all operations (insert,update,delete and view) on the above objects seems reasonable. We should also fire an event on a form submit (so an action could redirect the user to a different page)
  • Default actions? Some basic actions can be: add/remove from a group / tag, create a "object", send email with the object values, log to table/file, create/update an activity to reflect the change made (suggestion by DaveJ)
  • Default conditions? Compare two objects, contact in group/tag, object with value V in field F
  • Passing variables to other actions? This is a useful feature and should allow us to pass data from one action to the other. I suspect we will use this extensively as we add more actions and conditions.

I'm struggling a bit with actions / conditions that make sense and are useful. Let me know if you have any ideas on what will be useful in this context. If you can help build out this module and implement some of the functionality above that would be great and highly appreciated. Ping me on IRC if you can help. This definitely has the potential to take CiviCRM up to another level :)

( categories: )

Comments

Does this still exist?  Can't

Does this still exist?  Can't find it at the svn link... is it now a part of CiviCRM that I'm missing?

its lost and abandoned :(

 

but can be found here:

 

http://svn.civicrm.org/tools/branches/v3.1/drupal/modules/civicrm_rules/

 

if you do resurrect it and get it back to life, please let us know. might be worth doing it for D7 and Rules2 (which seems significantly different)

 

lobo

Make it happen

This feature is up for sponsorship - see Rules integration .

Dave J

Has anything happened on this?

I am a user and I think this would be a great module. Has anything happened on this?

Regards,
Amit

Unfortunately not ..

but maybe you can be the person that gets it started :)

lobo

Re: Useful actions and conditions

It would be useful to be able to tie contact field updates and activities to create a more flexible form of audit log:

1. Let the user specify a given custom field (condition), and an activity type to create when that field is updated (action).

2. Let the user specify a given activity type (condition), and a given custom field to update when that activity is created (action).

Use case 1 is a straightforward audit trail. The "activity" in that case is simply "I updated field foo". Use case 2 allows things like reason codes, which would be represented as custom fields in the activity itself. Example: I banned this user (set their "ban" field to "true") because "they were naughty". "Naughtiness" would be one of the possible reason codes in a custom field attached to the "ban user" activity type.

This is a great start

I am trying to add a method that will make contributions and event registration to be credit to a household (contributions - soft credtied to an individual). I am working adding a rule based on contribution create and event registration. I will post when I have it done.

Additional triggers

One of the triggers I am looking for is:

Complete registration for an CiviCRM event (filter by event type). I have a situation where we want to have registration for a webinar through the civiEvent module that then triggers a php action to curl to an external website.

THX
Cas

Awesome work!

a few ideas:

Treat CiviCase Activities and ActivitySets as states, so that we can mimic the "change state from X -> Y" behavior. For example, it would be great to "send an email to case manager and creator" when case "changes state from ActivityType1 to ActivityTypeN"

Not sure from your post if you've covered this already, but "send an email" actions to any of the CiviCRM roles/groups would be great. Same with reporting - noticed that wasn't on your top level list (so "run report X after number of contributions for this month = X").

It may be that most of this is covered by your default conditions, but wanted to throw out a few examples just to make sure :)

Fantastic! How about Activities?

Great stuff, Lobo!

Creating or updating an Activity could be a really useful action. E.g. log in Civi that a user has completed a webform or content profile, submitted a comment...

Dave J

good idea on activities ..

yes, creating activities as an action makes sense. I'll modify the blog post above to reflect this