# Mailchimp

## Setting Up the Mailchimp API Key

1. Navigate to **App Settings** > **Integration** > **Mailchimp**.
2. Enter your Mailchimp **API Key** and **Server Prefix** in the provided fields.

<figure><img src="/files/5doTVSlaZSyEKFtIvpdu" alt="Mailchimp API Key Setup"><figcaption><p>Mailchimp API Key Setup</p></figcaption></figure>

## Selecting a List or Audience

1. After saving the Mailchimp settings, choose the list or audience to send form data to:
   * Go to **Forms** > Select the desired form > **Settings** > **Mailchimp Integration** (this option will only appear if the API key is saved).
   * Select the appropriate list or audience.

<figure><img src="/files/T6WIlpaOBuUJYsA4tWOP" alt="Mailchimp List Selection"><figcaption><p>Mailchimp List Selection</p></figcaption></figure>

2. Test the setup:
   * Submit a form and verify that the data appears in the selected Mailchimp list.

## Adding Custom Merge Fields in Mailchimp

To include additional data (e.g., product details) in Mailchimp, you need to create custom merge fields:

1. Go to your Mailchimp dashboard.
2. Navigate to **Audience** > **Settings** > **Audience fields and |MERGE| tags**.
3. Click **Add A Field**.
4. Enter the field name (e.g., `PRODUCT`) and select the field type (e.g., Text, Number, Date, etc.).
5. Save the field.

### Recommended Merge Fields

Below is a list of field names you can add to capture additional data. Ensure all fields are of type **Text**:

* `P0`
* `P0_SKU`
* `P0_SN`
* `P0_PDATE`
* `ADDRESS1`
* `ADDRESS2`
* `CITY`
* `COUNTRY`
* `POSTCODE`
* `PHONE`

### Testing Custom Merge Fields

1. Add the above merge fields in Mailchimp.
2. Submit a form using a new or existing email address.
3. Verify that the additional data appears for the corresponding user in Mailchimp.

By following these steps, you can seamlessly integrate your form submissions with Mailchimp and ensure all relevant data is synchronized.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.product-reg.varify.xyz/integrations/mailchimp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
