# Mailchimp integration in Salesforces
Here you be able to find all the information about the Mailchimp integration in our Salesforce instance. This integration be able to help us to sync audiences and campaigns in Mailchimp to our Salesforces instance. Also, you be able to add leads and contact to audiences in Mailchimp.
## Create an audience in Mailchimp
When you're creating an audience you should have the requirements for that audience. Which people you want to be the target for specific campaign? That question should be answere it before the create a new audience.
For creating a new audience in Mailchimp you need to do the following steps:
- Go to our Mailchimp account [here](https://login.mailchimp.com/). If you don't have the credentials for login in, you can check in our 1Password account.
- Go to Audience dashboard for creating a new audience.

- You be able to see all the audiences that there are. Click in "Create Audience"

- After that fill every field depends on the requirements for creating a new audience.
## Use the Mailchimp integration in Salesforce
This integration help us to sync audiences and campaigns in Salesforce. To verify that it's work follow the following steps:
- Log in Salesforce instance [here](https://svacademy.lightning.force.com/). If you don't have the credentials for login in, you can check in our 1Password account.
- Got to the App Launcher and type "MC Setup".

- You be able to see all the configuration.

- You’ll find out four different section: Audiences, Member Queries, Campaigns and Settings.
1. Audiences: You’ll see every audiences that there are in your Mailchimp account. Here you’ll should find the audience that you created.
2. Member queries: This part is the most important part. Here you be able to create queries to filter leads and contacts in Salesforce for adding to specific campaign in Mailchimp. You be able to schedule when the query will run it or run the query just after that you have been the member query.
3. Campaigns: You be able to see all Mailchimp campaigns.
4. Settings: There are two options here:
1. Data sync: This configuration will help us to sync data automatically (audiences and campaigns).
2. Allow Mailchimp to create Leads in Salesforce: This configuration will handle to when the people suscribe to our audiences in Mailchimp.
## Member queries
This is the most important part because you be able to choose a specific group of leads or contact based on specific rules that you can configure and add to audience that you want. For example, you want to send a campaign in Mailchimp to the people that have MQL Score 2,000 or higher. Well, you can filter that kind of people using member queries and add to the specific audience, after that you be able to send you Mailchimp camping with that people.
### Creating a member query
1. Go to "Member queries" section and click in "New Query".

2. Select the audience that you want the people will be add it. Also you can add tags.

3. Choose the group that you want (Leads, Contacts or both).

5. In this case I select "Leads" and I added a filter for select the lead that they have MQL Socre 1500 or higher. You can add different filters for choose the correct group of people that you want based on the audience specification.

6. Go next and you see all the records sorted by the filter that you did.

7. In the end, you be able to rename the member query and set a schedule for running this query or save and run.

When the query have been ran, you can go to the audience in Mailchimp and you will see the new contacts in your audiences that it was created from Salesforce, now you be able to create a campaign in Mailchimp and choose the audience for sending emails.