Creating Merge Filters - Magic Merge Knowledge Base

Creating Merge Filters

Merge filters let you control which records are included when generating documents or sending emails. Instead of merging all records, define criteria to target specific subsets of your data. Filters can be synced from existing Salesforce reports or built from scratch with custom logic.

Filter Types

Magic Merge supports two approaches to filtering records. Choose based on whether you already have the logic defined in Salesforce or need to build something new.

Report Filter

Link to an existing Salesforce report. Filter criteria automatically syncs when the report is updated, keeping your merge aligned with your reporting logic.

Benefits
  • Reuse existing report logic
  • Auto-sync when report changes
  • Single source of truth
  • No duplicate maintenance

Custom Filter

Build filter criteria from scratch using a visual builder. Define conditions on any field from your parent object or child objects.

Benefits
  • Full control over logic
  • Filter on child objects
  • No report required
  • Template-specific criteria

Automatic Report Sync

Report filters stay in sync with your Salesforce reports. When you update filter criteria in the report, those changes automatically apply to your merge filter. No manual updates required.

Where Filters Are Used

Filters determine which records are processed during merge operations. They're available across multiple features in Magic Merge.

Email Templates

Apply filters to email templates to control which records receive the merged email. Send targeted communications to specific segments of your data.

Campaign Members

Use filters to add matching records as campaign members. Automatically populate campaigns based on criteria without manual selection.

Note: If no filters are configured, all records from the parent object will be included in the query. Always verify your filter criteria before running bulk operations.

Filter Scope

Custom filters can include criteria from both the parent object and up to three child objects. This lets you filter based on related record data, not just the primary object.

Parent
Account
Child 1
Contacts
Child 2
Opportunities
Child 3
Cases

Each child object requires a lookup field that connects it to the parent. You can add filter criteria to any or all objects in the relationship chain.

Example: Multi-Object Filter

Filter Accounts where the Account Type is "Customer" AND at least one related Opportunity has a Stage of "Closed Won" AND the Amount is greater than $50,000.

Account Filters
Field Operator Value
Type equals Customer ×
Opportunity Filters (Child 1)
Field Operator Value
StageName equals Closed Won ×
Amount greater than 50000 ×

Creating a Custom Filter

Follow the wizard to build a custom filter with your specific criteria.

1
Name Your Filter

Enter a descriptive name for your merge filter. Use a name that reflects the criteria or purpose.

Example: High-Value Customers - West Region
2
Select Objects

Choose the parent object and up to 3 child objects with their lookup fields.

The parent object is determined by your template. Add child objects by selecting the object and the lookup field that relates it to the parent.
3
Configure Filters

Add filter criteria for each object to refine your results.

Select a field, choose an operator (equals, contains, greater than, etc.), and enter the comparison value. Add multiple criteria per object as needed.
4
Save & Preview

Test your filter configuration to verify the results before using it in production.

The preview shows matching records so you can confirm the filter returns the expected data. Adjust criteria and re-preview until satisfied.

Quick Reference

Setting Description
Filter Types Report (synced) or Custom (manual)
Max Child Objects Up to 3 child objects per filter
Available For Email templates, Campaign member additions
Report Sync Automatic when report criteria changes
Default Behavior No filter = all records included

Tip: Start with a Report filter if you already have the logic defined in Salesforce. This keeps your criteria in sync and avoids maintaining the same logic in multiple places.