QuickBooks HelpQuickBooksHelpIntuit

Use the Salesforce Query Builder

by Intuit Updated 4 weeks ago

After you connect Mailchimp for Salesforce, use the Query Builder to add leads and contacts to your Mailchimp audience, so you can target them with email or ad campaigns.

In this article, you'll learn how to use the Query Builder for Mailchimp for Salesforce's.

This article tells you how to use a Mailchimp for Salesforce integration that was set up before May 1, 2024.

For more information on Mailchimp for Salesforce integrations that were set up on or after May 1, 2024, check out the support options listed at Salesforce Integration by Beaufort 12

Before you start

Here are some things to know before you start this process.

  • Before you use the Query Builder, make sure you successfully connected Mailchimp for Salesforce.
  • To run queries automatically, you'll need to turn on data sync in Mailchimp for Salesforce. Data sync will add new contacts and update contact information in your Mailchimp audience.
  • You can also choose to manually run queries. These will add new contacts to your Mailchimp audience, but won't update existing contact information.

About the Query Builder

The Query Builder allows you to pass Salesforce contacts, leads, and campaign members who share specific Salesforce field data into your Mailchimp audience.

You can run a query manually or schedule it to run daily with data sync. Queries run manually will add new contacts to your Mailchimp audience, but won’t update existing contact information. To update existing contact information, you'll need to use data sync.

Things to know

  • Salesforce contacts and leads who checked the Email Opt-Out field won't be included in query results.
  • If a lead or contact opts-out in Salesforce after they are added to your Mailchimp audience, they won't be unsubscribed in Mailchimp.
  • To view tags for a Mailchimp audience in Salesforce when you build a query, click Sync Audience next to the Mailchimp audience name in Salesforce.

Create a query

To create a query manually, follow these steps.

  1. Log into your Salesforce account.
  2. Click the App Launcher drop-down menu and choose Mailchimp for Salesforce.
  3. On the Member Queries tab, click New Query.
    Cursor selects the New Query button.
  4. Choose an audience and any interest groups or tags, and click Next.
  5. Select the objects you want to include in the query, and choose your filters for each object.
  6. Click Next.
    shot of objects selected with cursor clicking next step
  7. Preview the results of the query. If you need to make changes, click Previous Step. Or, click Next to continue.
  8. Type a name for your query. The default is Audience Name - Today's Date.
  9. If you are an account admin and want a query to run regularly, click the Run daily at drop-down menu and choose a time to run the query.
    screen of query being named and time to run selected
  10. To save your changes and exit, click Save. Click Save and Run to manually run the query.

Schedule and run automatic queries

If you are a Salesforce account admin, you can schedule queries to run at the same hour each day, along with the data sync job.

To schedule a query, follow these steps.

  1. Navigate to the MC Setup tab.
  2. On the Member Queries tab, click Schedule next to the name of the query you want to edit.
    cursor clicks the schedule option in the mailchimp member queries section
  3. Click the Run daily at drop-down menu and choose a time to run your query.
    Example of MC Query Name filled in and Run Daily At time selected from the drop-down menu
  4. To save your changes and schedule your query, click Save.

Manually Run a Saved Query

If you prefer to manually run queries you've created, follow these steps. Manual queries will add new contacts to your Mailchimp audience, but won't update existing contact information.

  1. Navigate to the MC Setup tab.
  2. On the Member Queries tab, click Run Query next to the name of the query you want to run.
    Cursor clicks Run Query in the Mailchimp Member Queries section.
    Each time a query is triggered, we'll check for new leads or contacts that match the query criteria and add them to your Mailchimp audience.

Edit a query

If you need to edit an existing query, follow these steps.

  1. Navigate to the MC Setup tab.
  2. On the Member Queries tab, click Edit next to the name of the query you want to edit.
    image192
  3. Make your changes to interest groups or tags, and click Next.
  4. Edit the objects included in the query, and choose your filters for each object.
  5. Click Next.
  6. To save your changes and exit, click Save. Click Save and Run to manually run your query.
Mailchimp

Sign in now for personalized help

See articles customized for your product and join our large community of QuickBooks users.

More like this