Skip to content

Add an API to trigger rules manually

mattwire requested to merge mattwire/civirules:civiruleruletriggerapi into master

This adds an API to trigger rules manually. Currently it is only working for "Post" triggers. Includes documentation.

This allows you to do a few things:

  1. Test the rules more easily (though be careful that the parameters might not be exactly the same).
  2. Build a rule with an Edit trigger that triggers the equivalent "Add" trigger (eg. when you want the same conditions/action for Add/Edit) - this might need an action to be implemented to do this.
  3. Trigger rules manually from custom/external implementations. (eg. when an activity is added a rule sends an email to the client. This allows you to put a "re-send" button on the page and the same rule will be triggered / email will be sent).

Merge request reports