I'd like to send users a notification email when someone donates from a specific contribution page - is this possible? I don't see contribution page in the list of condition options in CiviRule.
2 Answers
Lars' answer is correct, but there are some caveats for sending notifications based on the contribution page.
You must use the "Contribution" as your trigger entity, not "Contribution Page". That may be obvious.
You have to use "is changed" in the trigger, not "is added". Contributions are first created with a "Pending" status, then the card is charged, and if successful, changed to "Completed". If you use "Contribution is Added" you'll send notifications even if their payment failed.
Because "Contribution is changed" any time you make a change on the back end, you must add an additional condition: "Compare Old Contribution Status to New Contribution Status". Set it to
Old value != Completed and new value = Completed
. That way, it only triggers once, when the charge completes successfully.If your notification contains tokens that reference subsidiary entities (memberships, participants, soft credits) you must add a delay of 1 minute (or more) to the notification. Other entities are created after the contribution, and won't exist yet if you send immediately.
Your setup should look somewhat like this screenshot (this rule doesn't need a delay, and the field value comparison should be =
, not !=
):
You can use Field Value Comparison to check the Contribution Page.
Field Value Comparison is the slightly more manual way to check basically any field you want in CiviRules — it opens up a lot of options. Always test because things might not work quite as you expect with fields that can have multiple values and other more complex situations, but Contribution Page should be pretty straightforward.