Integrating with Mailchimp to Create Consent Records

You can integrate Mailchimp with OneTrust to track consent transactions including both collection of new consent and updates made to existing consent records.

To create an API key in Mailchimp

You will need to obtain account information from your Mailchimp instance to create a basic authentication or OAuth2 credential in OneTrust. This documentation uses a basic authentication credential setup.

  1. Log in to your Mailchimp instance and navigate to your Account settings.
  2. Click Extras on the navigation menu to open the drop-down list, then click API keys. The API keys settings appear.
  3. Click the Create a Key button to create a new API key. The newly created API key will appear under Your API keys heading.


  4. Copy the API key to use later for your username credential setup in OneTrust.

To set up credentials in OneTrust

Things to Know

Mailchimp APIs can leverage Basic and OAuth2 to authenticate consent requests. To do this, you will need to obtain your Mailchimp instance from the base URL. For additional information on Mailchimp's authentication methods, see Getting Started with the Mailchimp API.

For more information on creating integration credentials, see Configuring Integration Credentials.



  1. On the Integrations menu, select Credentials.

    The Credentials screen appears.

  2. Click the Add New button.

    The Add Credential modal appears.

  3. Create a new Basic credential using your Mailchimp instance information. For more information, see Add Credential Modal Reference .
  4. Click the Save button.

Add Credential Modal Reference



Field
Description
Credential Name

Enter a name to identify the credential.

Description

Enter a description of the credential.

System

Select Mailchimp as the system.

Connector Type

Select HTTP as the credential connector type.

Auth Type

Select Basic as the authorization type.

Test URL

Enter a test URL for the new credential. You will need to replace <dc> in the Mailchimp URL (https://<dc>.api.mailchimp.com/3.0/ ) with your Mailchimp base URL.

Example: https://us4.api.mailchimp.com/3.0/

Protocol

Enter HTTPS as the protocol for the credential.

Hostname

Enter the hostname for the credential. You can paste the Test URL here minus the HTTPS protocol.

Note:

Be sure to include the hostmane for your Mailchimp instance so that the Base URL carries over into your workflow steps.

Example: us4.api.mailchimp.com/3.0/

Key

Select the type of key which should be used in the header of the call made by the connection.

You can add additional keys if your credential requires more than one header.

Username

Enter anystring:<your apikey here> as your Mailchimp username. Use the API generated in Mailchimp.

Example: anystring:862b604f13a916226e7f633c86cda7ab-us4

To create the Create Consent workflow

You can create an integration workflow for Mailchimp by using the seeded workflow templates in the Gallery screen.

  1. On the Integrations menu, select Gallery.

    The Gallery screen appears.

  2. Navigate to the Mailchimp system, then click on the tile.
    Tip:

    Use the Consent filter in the Gallery screen to search for Mailchimp.

    The Gallery Details screen appears.

  3. In the Consent > Create Record block, click the Add button.


    The Add Workflow Name modal appears.

  4. Enter a name for the workflow in the Workflow Name field, then select your Mailchimp credential from the Select Credential field.


  5. Click the Create button.

    The Workflow Builder screen appears.

  6. Your Mailchimp Create Consent Record workflow will be seeded with actions. Customize the workflow with any additional parameters or conditional logic to meet your organization's need.
  7. Click the Save button.
  8. Click the Activate button to enable the workflow.

To copy the collection point information

  1. In the newly created consent workflow, click the Edit icon to edit the webhook trigger.
  2. Click the Copy button next to HTTP POST URL. Paste the webhook URL somewhere to reference later during final webhook configuration.
  3. On the main navigation menu, go to Consent > Collection Points.

    The Collection Points screen appears.

  4. Click on a collection point.
    Note:

    You can also create a new collection point by the Add New button. Ensure it is configured with a purpose for Mailchimp subscription. For more information, see Adding, Editing, and Deleting Collection Points and Setting Up Purposes of Processing.

    The Collection Point Details screen appears.

  5. On the Collection Point Details screen, go to the Custom API tab.
  6. Click the Copy URL button next to Your API. Paste the URL somewhere to reference later during final webhook configuration.
  7. Click the Copy Expected Payload button next to Expected Payload. Paste the payload somewhere to reference later during final webhook configuration.

To configure the Create Consent Record action

  1. Go to Integrations > Connections.

    The Connections screen appears.

  2. Click the name of the new Create Consent workflow for Mailchimp.

    The Workflow Builder screen appears.

  3. Click the Edit icon button on the POST Create Consent Record action.
  4. Paste the collection point's Your API URL in the action's Request URL field.
  5. Paste the collection point's Expected Payload in the action's Body field.
  6. Click the Finish button to close the builder.


  7. Click the Save button.
  8. Click the Activate button.

To configure the webhook in Mailchimp

You will need to create a Mailchimp webhook to configure the Create Consent integration. For more information on creating webhooks with Mailchimp, see Mailchimp's Developer Guides on Webhooks.

  1. In your Mailchimp account, navigate to Audience on the main navigation menu.

    The Audience screen appears.

  2. Click the Manage Audience field, then select Settings.
  3. Click Webhooks.
  4. Click the Create New Webhook button.
  5. In the Callback URL field, paste the copied webhook URL from OneTrust. This URL will receive data about your Mailchimp audience.


  6. Append an API key generated by OneTrust to the end of the URL in the following format:
    CODE
    /?apiKey=[api key here] 
    Note:

    For more information on generating an API key, see Creating OAuth 2.0 API Keys to Authenticate Requests.

  7. For the What Types of Updates Should We Send?, enable Subscribes.


  8. For the Only Send updates when a change is made..., enable By a Subscriber and By an Account Admin.


  9. Click the Save button.

To copy the Mailchimp purpose ID

  1. In OneTrust, navigate to Consent > Purposes.

    The Processing Purposes screen appears.

  2. Click the purpose for the Mailchimp subscription.

    The Purpose Details screen appears.

  3. Copy the Purpose ID. Paste the purpose ID somewhere to reference later during final webhook configuration.


To create the Update Consent workflow

  1. On the Integrations menu, select Gallery.

    The Gallery screen appears.

  2. Navigate to the Mailchimp system, then click on the tile.
    Tip:

    Use the Consent filter in the Gallery screen to search for Mailchimp.

    The Gallery Details screen appears.

  3. In the Consent > Update Record block, click the Add button.


    The Add Workflow Name modal appears.

  4. Enter a name for the workflow in the Workflow Name field, then select your Mailchimp credential from the Select Credential field.


  5. Click the Create button.

    The Workflow Builder screen appears.

  6. Ensure the following action steps are configured with your Mailchimp credential:
    • GET Search Members

    • IF YES: PATCH Update a list member

    • IF NO: PATCH Update a list member

  7. In the Data Subject Consent Updated block, click the Edit icon button.
  8. Paste the Mailchimp purpose ID in the Value field. Then, click the Done button.


  9. Click the Save button.
  10. Click the Activate button to launch the workflow.