DOCS

Automation rules

> Requires: Fundations Pro

Automation rules let you define trigger-based actions that run automatically when something happens in Fundations. When a trigger fires, the rule maps data to an external integration and sends it, optionally after a delay.

Why use this

Manual data entry between your fundraising platform and your CRM or email tool is error-prone and time-consuming. Automation rules handle the connection automatically. You define when something should happen and what data to send. The rules execute without further input.

What it does

Each automation rule has:

  • A name
  • A trigger (the event that activates the rule)
  • An integration (which CRM or external service to send to)
  • Field mappings (which Fundations fields map to which external fields)
  • Optional tags and list assignment for CRM integrations
  • An optional delay before execution

Rules are stored in a WordPress option (get_fund_automation_rules) and processed by the Integration Manager each time a trigger fires.

Available triggers

Trigger keyWhen it fires
donation_receivedA donation is completed (requires marketing consent)
user_registeredA new fund member account is created
action_createdA new fundation is published
action_updatedAn existing fundation is updated
goal_reachedA fundation reaches its fundraising goal
campaign_joinedA fundraiser joins a campaign
action_expiredA fundation reaches its end date
action_claimedA guest fundation is claimed by a user

> The donation_received trigger only fires when the donor has given marketing consent during checkout. If the consent field is not in your donation form or the donor declined, this trigger will not run for that donation.

Delays

Rules can be delayed before execution. Set a delay value and unit (minutes, hours, or days). Delayed rules are scheduled using WordPress cron on the get_fund_delayed_rule hook. If WordPress cron is not running reliably on your server, consider a real cron job. See Troubleshooting.

How to use it

  1. Go to Fundations → Integrations.
  2. Make sure you have at least one integration connected. See CRM Integrations.
  3. Click Add Rule or open an existing rule.
  4. Enter a name for the rule.
  5. Choose a trigger from the dropdown.
  6. Choose which integration should receive the data.
  7. Configure field mappings. See Field Mapping for how merge tags work.
  8. Optionally set a tag or list ID for the target integration.
  9. Optionally set a delay.
  10. Enable the rule and save.
Automation rule editor

Settings & options

SettingDescription
NameLabel shown in the rules list
TriggerEvent that activates this rule
IntegrationWhich connected service to send to
Field MappingsSource (merge tag) to destination (CRM field) pairs
TagsTags to apply in the target CRM
List IDMailing list or audience in the target CRM
Delay ValueNumber of delay units to wait before sending
Delay Unitminutes, hours, or days
EnabledToggle to activate or pause the rule without deleting it

What you can and cannot do

  • You can create, duplicate, edit, and delete rules.
  • You can pause a rule by toggling it off without losing its configuration.
  • You can duplicate a rule and adjust it for a second integration.
  • You can add a delay of any length in minutes, hours, or days.
  • You cannot run a rule retroactively on past donations. Rules only fire for events that happen after the rule is enabled.
  • You cannot use conditions or filters to restrict which donations trigger a rule (for example, “only donations over 50”). Rules fire for all events of the chosen trigger type.
  • The donation_received trigger requires marketing consent. There is no way to bypass this gate.

Examples

Add donors to a Mailchimp list on donation:

  1. Create a rule with trigger: donation_received.
  2. Choose the Mailchimp integration.
  3. Map {donor_email} to the Mailchimp email field, {donor_first_name} to the first name field.
  4. Set the Mailchimp list ID.
  5. Enable and save.

Notify your team via a webhook when a new fundation is created:

  1. Create a rule with trigger: action_created.
  2. Choose a Webhook integration.
  3. Map {action_title}, {action_url}, and {creator_name} to the webhook payload.
  4. Enable and save.

Troubleshooting

A rule is enabled but nothing is being sent. Check Sync Logging to see if the rule attempted to fire and failed. If there are no log entries at all, confirm the trigger event is actually occurring and that any trigger conditions are met (marketing consent for donation_received).

Delayed rules are not executing. Delayed rules use WordPress cron. If your server does not receive regular traffic, WordPress cron may be delayed. Set up a real server cron to call wp-cron.php every minute for reliable delivery.

A rule fired but the data arrived at the CRM with blank fields. The merge tags used in the field mapping may not be available for the chosen trigger. Not all merge tags are populated for all triggers. See Merge Tags for the trigger-to-tag availability table.

Developer reference

Rule storage

Rules are stored in the WordPress option get_fund_automation_rules as an array keyed by UUID. Each rule has the keys: id, name, integration, trigger, enabled, field_mappings, tags, list_id, extra_settings, delay_value, delay_unit, created_at, updated_at.

Rule management methods

The Get_Fund_Automation_Rules class provides:

MethodDescription
create_rule( $data )Creates a new rule, assigns a UUID, returns the rule array
update_rule( $id, $data )Updates an existing rule by ID
delete_rule( $id )Removes a rule permanently
toggle_rule( $id )Flips the enabled state
duplicate_rule( $id )Creates a copy with a new UUID

Hooks and filters

// Add or modify available triggers shown in the rule editor UI
add_filter( 'get_fund_integration_triggers', function( $triggers ) {
    $triggers['my_custom_trigger'] = array(
        'label'  => 'My Custom Trigger',
        'groups' => array( 'donation', 'user' ),
    );
    return $triggers;
} );

// Modify the data payload for a trigger before it reaches integrations
add_filter( 'get_fund_integration_trigger_data', function( $data, $trigger, $object_id ) {
    if ( 'donation_received' === $trigger ) {
        $data['custom_field'] = get_post_meta( $object_id, '_my_meta', true );
    }
    return $data;
}, 10, 3 );

// Runs after a trigger has been processed by all integrations
add_action( 'get_fund_after_integration_trigger', function( $trigger, $data, $object_id ) {
    // log or act on the completed trigger
}, 10, 3 );

Delayed rule cron hook

// Fires when a delayed rule's scheduled time arrives
add_action( 'get_fund_delayed_rule', function( $rule_id, $data, $object_id, $pending_log_id ) {
    // Internal use — the Integration Manager handles this.
    // Do not bind to this hook unless you know what you are doing.
}, 10, 4 );

AJAX actions (require manage_options)

ActionDescription
get_fund_save_integrationSave or update a rule
get_fund_toggle_integrationEnable or disable a rule
get_fund_test_integrationSend a test payload to the integration

All require the get_fund_integrations_nonce nonce.