
Salesforce Marketing Cloud provides marketing engagement automation to engage your users. This integration lets your marketing and growth teams use behavioral data to better target campaigns and increase user engagement.

## Use cases

- **Campaign automation**: Marketing Cloud's Journey Builder is a campaign planning tool that helps you design and automate campaigns that guide customers through their journey with a brand. Amplitude's event streaming powers your Journey.
- **Personalized marketing**: With user behavior, user properties, and event properties captured in Amplitude, you can build personalized content and targeted marketing campaigns in Marketing Cloud. This can increase engagement and customer loyalty.

## Considerations

Note the following when sending events to [Salesforce Marketing Cloud](https://www.salesforce.com/content/dam/web/en_us/www/documents/pricing/mc_email_journey_pricing_sheet.pdf):

- Enable this integration in each Amplitude project that uses it.
- Salesforce Marketing Cloud has these limits:
    - Salesforce suggests no more than 2500 calls per minute when interacting with the REST API.
    - Yearly API call limit:
        - Basic: 0 calls/year
        - Pro: 2M calls/year
        - Corporate: 6M calls/year
        - Enterprise: 200M calls/year

## Set up the integration

### Salesforce Marketing Cloud setup

You need a Client ID, Client Secret, and Subdomain from Salesforce Marketing Cloud.

1. In Salesforce Marketing Cloud, navigate to **Setup** under Settings.
2. In the Quick Find box, search for **Installed Packages**.
3. Click **New** to create a new package.
4. Click **Add Component**.
5. For the Component Type, select **API Integration**. This step generates the API integration information that Amplitude requires.
6. For the integration type, select **Server-to-Server**.
7. Grant the package these permissions:
    - Email: Read, Write
    - Web: Read, Write
    - Automation: Read, Write, Execute
    - Journeys: Read
    - List and Subscribers: Read, Write
    - Tracking Events: Read
    - Webhooks: Read, Write
8. **Save** the package.
9. Copy the **Client ID**, **Client Secret**, and **Subdomain** from the app you want to integrate.
    - For the Subdomain, refer to the Authentication Base URI and copy only the subdomain. For example, if the Authentication Base URL is `https://mc1n78yx33kxv5mv1q7fh81flfjq.auth.marketingcloudapis.com/`, copy `mc1n78yx33kxv5mv1q7fh81flfjq`.
10. Click the **Access** tab and click **Enable All Business Units**.

### Amplitude setup

1. In Amplitude Data, click **Catalog** and select the **Destinations** tab.
2. In the Event Streaming section, click **Salesforce Marketing Cloud**.
3. Enter a sync name, then click **Create Sync**.
4. Enter your **Client ID**, **Client Secret**, and **Subdomain** created by SFMC.
5. Enter your **Event Definition Key** generated by API Event in SFMC into the **SFMC Event Definition Key** field.
6. Enter the **External Key** generated by the Data Extension for the user properties in SFMC into **SFMC User Data Extension Key**.
7. Click **Map properties to destination** to specify the identity mapping between Amplitude and SFMC. SFMC requires the **Contact Key** and **Email** as properties.
8. Toggle the **Send Events** filter to select the events to send. SFMC recommends choosing the events most important to your use case.
9. Click **Select & filter events** to choose the event type of the events to send.
10. (optional) In **Select additional properties**, select any more event properties to send to SFMC.
11. Under **Send Users**, make sure the toggle is enabled ("Users are sent to SFMC") if you want to stream users and their properties to SFMC. By default, Amplitude sends the **Contact key** and **Email address** to SFMC.
12. (optional) In **Select additional properties**, select any more user properties to send to SFMC. If you don't select any properties here, Amplitude doesn't send any.

### Event forwarding setup (optional)

{% callout type="note" heading="Storing data in a different Data Extension" %}
These steps create a Data Extension in Salesforce Marketing Cloud, set up an Event Definition, and configure the mappings to forward events to Salesforce. If you don't store your data in the same Data Extension, repeat these steps for any other Data Extension you use.
{% /callout %}

1. In Salesforce Marketing Cloud, navigate to **Email Studio** from the top navigation bar.
2. Find the **Data Extension** section under **Subscribers**.
3. Create a Data Extension in any folder.
4. (Recommendation) When you create a new Data Extension for event forwarding, use a template. Choose **Create from Template** in the Creation Method.
5. Choose **TriggeredSendDataExtension** as the template.
6. Make sure your **Data Extension** includes the columns `SubscriberKey` (used as Contact key) and `EmailAddress` (used as Email) for mapping properties in Amplitude's setup page.
7. For any other columns you create (except `SubscriberKey` and `EmailAddress`), make sure their names match the properties you select in Amplitude's additional properties.
    - By default, the event properties include `*event_type`, `event_time`, `SubscriberKey`, and `EmailAddress`.
8. After you create the Data Extension, go to **Journey Builder** and find **Event Sources** under the **Event** tab.
9. Click **New Event** and select **API Event** for **New Entry Sources**.
10. Name your Event Definition and select the **Data Extension** you created.
11. Optionally create contact filters, which you can apply later.
12. Copy the **Event Definition Key** and paste it into the **SFMC Event Definition Key** in Amplitude's setup page.
13. You're now ready to start forwarding events.

### Identify forwarding setup (optional)

{% callout type="note" heading="Send other user properties than the default attributes in SFMC" %}
Define the Data Extension in SFMC to store the user properties that don't exist in the default attributes in SFMC. Default attribute set includes `ContactKey` and `EmailAddress`.
{% /callout %}

1. To add your own attribute set, define a **Data Extension** in SFMC.
2. When creating the **Data Extension**, follow the specified naming format for **Event Forwarding**.
3. Include a `contactKey` column in the **Data Extension** to map attributes to each contact in SFMC. Make sure that the `contactKey` column is set as a primary key.
4. After creating the **Data Extension**, navigate to the **Data Designer** tab in Contact Builder.
5. Choose an **Attribute Group** and click **Data Extensions**, then select **Link**.
6. Select your **Data Extension** and choose the column that maps to the **Customer Data attribute**. Map the `contactKey` attribute to Contact Key in the Customer Data section.
7. After you save, copy and paste the external key of the Data Extension into the **SFMC User Data Extension Key** in the setup UI of Amplitude.
8. Your Data Extension is ready and linked to the Attribute Group in Contact Builder. You can now store and use the attribute set for each contact in SFMC.
