- Handle Custom Stripe Webhook Events
- suredonation_export_secret_option_keys Filter Hook
- suredonation_import_batch_complete Action Hook
- suredonation_import_complete Action Hook
- suredonation_import_donation_inserted Action Hook
- suredonation_import_donor_inserted Action Hook
- suredonation_import_session_created Action Hook
- suredonation_import_givewp_batch_complete Action Hook
- suredonation_import_givewp_session_created Action Hook
- suredonation_privacy_data_exported Action Hook
- Validate Field Filter Hook
- Validatable Blocks Filter Hook
- Update donation data, Filter Hook
- OttoKit Integration: suredonation_suretriggers_integration_data_filter Filter Hook
- suredonation_show_setup_gateway_notice Filter Hook
- suredonation_show_review_notice_gateway Filter Hook
- suredonation_show_review_notice_donation Filter Hook
- suredonation_registered_payment_methods Filter Hook
- suredonation_register_additional_blocks Filter Hook
- suredonation_receipt_html Filter Hook
- suredonation_phone_geo_enabled Filter Hook
- suredonation_phone_geo_api_hourly_cap Filter Hook
- suredonation_paypal_webhook_handle_event Filter Hook
- suredonation_paypal_sdk_args Filter Hook
- suredonation_output_campaign_meta_tags Filter Hook
- suredonation_new_donor_user_data Filter Hook
- suredonation_integration_payload Filter Hook
- suredonation_import_phase_mappers Filter Hook
- suredonation_import_givewp_phases Filter Hook
- suredonation_import_givewp_phase_mappers Filter Hook
- suredonation_import_donation_row Filter Hook
- suredonation_import_campaigns_limit Filter Hook
- suredonation_field_block_config Filter Hook
- suredonation_export_one_time_only Filter Hook
- suredonation_export_campaigns_limit Filter Hook
- suredonation_email_smart_tags Filter Hook
- suredonation_email_smart_tag_groups Filter Hook
- suredonation_email_field_char_limits Filter Hook
- suredonation_disable_default_styles Filter Hook
- suredonation_default_validation_messages Filter Hook
- suredonation_default_email_notifications Filter Hook
- suredonation_create_donation_data Filter Hook
- suredonation_config_abilities Filter Hook
- suredonation_available_payment_methods Filter Hook
- suredonation_allowed_form_html Filter Hook
- suredonation_allowed_form_blocks Filter Hook
- Validatable Blocks Filter Hook
- Update donation data, Filter Hook
- OttoKit Integration: suredonation_suretriggers_integration_data_filter Filter Hook
- suredonation_show_setup_gateway_notice Filter Hook
- suredonation_show_review_notice_gateway Filter Hook
- suredonation_show_review_notice_donation Filter Hook
- suredonation_registered_payment_methods Filter Hook
- suredonation_register_additional_blocks Filter Hook
- suredonation_receipt_html Filter Hook
- suredonation_phone_geo_enabled Filter Hook
- suredonation_phone_geo_api_hourly_cap Filter Hook
- suredonation_paypal_webhook_handle_event Filter Hook
- suredonation_paypal_sdk_args Filter Hook
- suredonation_output_campaign_meta_tags Filter Hook
- suredonation_new_donor_user_data Filter Hook
- suredonation_integration_payload Filter Hook
- suredonation_import_phase_mappers Filter Hook
- suredonation_import_givewp_phases Filter Hook
- suredonation_import_givewp_phase_mappers Filter Hook
- suredonation_import_donation_row Filter Hook
- suredonation_import_campaigns_limit Filter Hook
- suredonation_field_block_config Filter Hook
- suredonation_export_secret_option_keys Filter Hook
- suredonation_export_one_time_only Filter Hook
- suredonation_export_campaigns_limit Filter Hook
- suredonation_email_smart_tags Filter Hook
- suredonation_email_smart_tag_groups Filter Hook
- suredonation_email_field_char_limits Filter Hook
- suredonation_disable_default_styles Filter Hook
- suredonation_default_validation_messages Filter Hook
- suredonation_default_email_notifications Filter Hook
- suredonation_create_donation_data Filter Hook
- suredonation_config_abilities Filter Hook
- suredonation_available_payment_methods Filter Hook
- suredonation_allowed_form_html Filter Hook
- suredonation_allowed_form_blocks Filter Hook
- suredonation_import_batch_complete Action Hook
- suredonation_import_complete Action Hook
- suredonation_import_donation_inserted Action Hook
- suredonation_import_donor_inserted Action Hook
- suredonation_import_session_created Action Hook
- suredonation_import_givewp_batch_complete Action Hook
- suredonation_import_givewp_session_created Action Hook
- suredonation_privacy_data_exported Action Hook
- suredonation_enqueue_form_frontend_scripts Action Hook
- suredonation_after_form_duplicated Action Hook
- suredonation_email_sent Action Hook
- suredonation_donor_user_created Action Hook
- suredonation_donation_refunded Action Hook
- suredonation_donation_status_changed Action Hook
- suredonation_donation_completed Action Hook
- suredonation_new_donation Action Hook
- suredonation_donation_created Action Hook
OttoKit Integration: suredonation_suretriggers_integration_data_filter Filter Hook
Overview
The suredonation_suretriggers_integration_data_filter filter allows developers to modify the configuration payload sent to the OttoKit embed iframe, formerly known as SureTriggers.
The iframe is injected into the SureDonation form builder when a user configures an automation. You can use this filter to customize the embed configuration or modify the sample data displayed during automation setup.
When to Use This Filter
Use this filter when you need to customize the data passed to the OttoKit integration interface.
For example, you can use it to:
- Modify the automation summary.
- Customize the sample response.
- Adjust integration configuration.
- Change embed settings.
- Add or modify values in the payload sent to OttoKit.
Filter Signature
apply_filters( 'suredonation_suretriggers_integration_data_filter', $body, $campaign_id, $form_id );Parameters
| Parameter | Type | Description |
| $body | array | Configuration payload sent to the OttoKit embed. |
| $campaign_id | int | The resolved SureDonation campaign ID. |
| $form_id | int | The donation form ID from which the integration embed was opened. |
$body Payload
The $body array contains configuration information used to initialize the OttoKit embed.
Common keys include:
| Key | Description |
| client_id | Identifies the integration client. For SureDonation, this is SureDonation. |
| st_embed_url | URL used to load the OttoKit embedded interface. |
| embedded_identifier | Campaign ID associated with the automation. |
| target | Target configuration for the embed. |
| event | The automation trigger definition, such as Donation Completed. |
| summary | Campaign name or automation summary. |
| selected_options | Selected integration options. |
| integration | Integration configuration data. |
| sample_response | Sample response data displayed while configuring the automation. |
Return Value
The callback must return the payload as an array.
You can return:
- The original $body array.
- A modified version of the $body array.
The returned array is sent as the data field in the AJAX success response.
Basic Usage
Use add_filter() to register your callback.
add_filter( 'suredonation_suretriggers_integration_data_filter', 'your_custom_function', 10, 3 );
function your_custom_function( $body, $campaign_id, $form_id ) {
    // Modify the embed payload here.
    return $body;
}Example: Customize the Automation Summary
The following example changes the summary displayed for the automation.
add_filter(
    'suredonation_suretriggers_integration_data_filter',
    'mysite_embed_summary',
    10,
    3
);
function mysite_embed_summary( $body, $campaign_id, $form_id ) {
    $body['summary'] = 'Automation for campaign #' . $campaign_id;
    return $body;
}This changes the summary to include the campaign ID associated with the automation.
Example: Modify Sample Response
You can also customize the sample response shown while configuring an automation.
add_filter(
    'suredonation_suretriggers_integration_data_filter',
    'mysite_modify_sample_response',
    10,
    3
);
function mysite_modify_sample_response( $body, $campaign_id, $form_id ) {
    if ( isset( $body['sample_response'] ) ) {
        $body['sample_response']['custom_field'] = 'Example value';
    }
    return $body;
}Integration Flow
The filter is applied as part of the SureDonation and OttoKit integration flow:
- The user opens the OttoKit integration from the SureDonation form builder.
- SureDonation determines the related campaign and donation form.
- SureDonation prepares the integration configuration payload.
- The suredonation_suretriggers_integration_data_filter filter is applied.
- Your callback can modify the payload.
- SureDonation returns the modified payload through the AJAX response.
- The payload is passed to the OttoKit embedded interface.
Related Hooks
- suredonation_donation_completed
Runs when a donation is successfully completed. - suredonation_new_donation
Runs when a new donation is created.
We don't respond to the article feedback, we use it to improve our support content.