> For the complete documentation index, see [llms.txt](https://docs.feedotter.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.feedotter.com/integrations/marketing-cloud-next.md).

# Marketing Cloud Next

Connecting FeedOtter to **Salesforce Marketing Cloud Next** lets you automate and publish emails  straight into your Salesforce content workspace as a ready-to-use email.&#x20;

The setup has two parts:

1. **In Salesforce:** create an External Client App that FeedOtter uses to connect.
2. **In FeedOtter:** enter the app's credentials and choose the content workspace where emails should go.

The whole process takes about 15 minutes.

{% hint style="warning" %}
This guide is for **Salesforce Marketing Cloud Next**. It doesn't apply to Marketing Cloud Engagement (formerly ExactTarget) or Marketing Cloud Account Engagement (Pardot), which have their own FeedOtter integrations.
{% endhint %}

### Before you start

You'll need:

* **Salesforce administrator access** to the org that has Marketing Cloud Next. You need it to create an External Client App and edit its policies.
* **A Salesforce user for FeedOtter to act as**, called the *Run As* user. This user must:

  * be active and have the **API Enabled** permission;
  * be able to create and publish content in your Marketing Cloud content workspace.

  We recommend a dedicated integration user, so that FeedOtter's activity is easy to identify and isn't affected when people change roles or leave. A System Administrator works for testing.
* **A FeedOtter account administrator** login, to add the integration in FeedOtter.

### Part 1: Create the External Client App in Salesforce

#### Step 1: Open the External Client App Manager

1. In Salesforce, click the gear icon and open **Setup**.
2. In **Quick Find**, type `External Client App Manager` and open it.
3. Click **New External Client App**.

<figure><img src="https://2086102864-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIdHBGk8cqznUpEqm5g1U%2Fuploads%2FqVHDTKTpQIfop6emf7bX%2Fimage.png?alt=media&amp;token=078b1cf6-8e6b-4714-a02f-9a154e0fafcf" alt=""><figcaption></figcaption></figure>

#### Step 2: Enter the basic information

Fill in:

| Field                        | What to enter                                                                         |
| ---------------------------- | ------------------------------------------------------------------------------------- |
| **External Client App Name** | `Feedotter`                                                                           |
| **API Name**                 | Fills in automatically (e.g. `Feedotter`)                                             |
| **Contact Email**            | An admin email address at your company. We recommend <youremail+foapi@yourdomain.com> |
| **Distribution State**       | `Local`                                                                               |

#### Step 3: Enable OAuth and choose the scope

<figure><img src="https://2086102864-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIdHBGk8cqznUpEqm5g1U%2Fuploads%2FwOpnk2SBCc4OkisM8DC4%2Fimage.png?alt=media&amp;token=80c2a7a2-0fb0-45c3-905e-71b9fe80ba57" alt=""><figcaption></figcaption></figure>

1. Expand **API (Enable OAuth Settings)** and check **Enable OAuth**.
2. In **Callback URL**, enter:

   ```
   https://app.feedotter.com/api/v1/platformConnections/mcnext-save
   ```
3. Under **OAuth Scopes:**
   1. Add **Manage user data via APIs (api)**
4. Under **Flow Enablement:**
   1. Enable **Client Credentials Flow**. If Salesforce shows a confirmation message, accept it.
   2. Enable **Authorization Code and Credentials Flow**

<figure><img src="https://2086102864-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIdHBGk8cqznUpEqm5g1U%2Fuploads%2F4KwzoKrq1cZcdbtWKEoH%2Fimage.png?alt=media&amp;token=a8583922-41b0-4b9d-a6fb-b93aa4c679ba" alt=""><figcaption></figcaption></figure>

5. Click **Create**.
6. Under Policies click **Edit**

<figure><img src="https://2086102864-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIdHBGk8cqznUpEqm5g1U%2Fuploads%2FzYXrv7rrJ214aUSwvnJU%2Fimage.png?alt=media&amp;token=1e7d3b72-9051-4e7a-8928-f3e00a1ad7d7" alt=""><figcaption></figcaption></figure>

7. Expand **OAuth Policies**.
8. Under **Plugin Policies**:
   * Permitted Users = *All users can self-authorize*
   * OAuth Start URL = *<https://app.feedotter.com/r/settings/integrations>*
9. Under **OAuth Flows and External Client App Enhancements**:
   * Check **Enable Client Credentials Flow**.
   * In **Run As (Username)**, search for your Run As user and **select them from the results**.

<figure><img src="https://2086102864-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIdHBGk8cqznUpEqm5g1U%2Fuploads%2FAMMcDx0W11pygn66dUAi%2Fimage.png?alt=media&amp;token=fa041138-8da5-43ab-9b1c-4aff63cd7982" alt=""><figcaption></figcaption></figure>

10. &#x20;Click **Save**.
11. Navigate to the **Settings** tab
12. Expand the **OAuth Settings** section and click **Consumer Key and Secret**

<figure><img src="https://2086102864-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIdHBGk8cqznUpEqm5g1U%2Fuploads%2F0FMRZDRBjvb8QdSiKSjT%2Fimage.png?alt=media&amp;token=9367888e-bf48-4c0f-9ba1-9b8f912c90cd" alt=""><figcaption></figcaption></figure>

13. Either copy these or keep this tab at the ready we will paste these into the Feedotter interface in a few minutes.

### Part 2. Add the Integration to Your Feedotter Account

1. In FeedOtter, go to **Settings → Integrations**.
2. Click **Add Integration**.
3. For **Platform**, choose **Salesforce Marketing Cloud Next**.

<figure><img src="https://2086102864-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIdHBGk8cqznUpEqm5g1U%2Fuploads%2FWPJAumsEIWU194WrLCvd%2Fimage.png?alt=media&amp;token=b6af6aeb-7fe5-4689-8ba3-177b864bd2ac" alt=""><figcaption></figcaption></figure>

4. Give your instance a memorable label as desired.
5. Paste in your Salesforce domain url

{% hint style="info" %}
FeedOtter needs your org's **My Domain URL**, the address Salesforce uses for API access.

1. In Salesforce go to **Setup**
2. Use **Quick Find** to open **My Domain**.
3. Copy the **Current My Domain URL**. It ends in `.my.salesforce.com`.

| Your org                               | What the URL looks like                                      |
| -------------------------------------- | ------------------------------------------------------------ |
| Production, trial or Developer Edition | `https://yourcompany.my.salesforce.com`                      |
| Sandbox                                | `https://yourcompany--sandboxname.sandbox.my.salesforce.com` |

Don't use the address in your browser's address bar. Addresses ending in `lightning.force.com` or `my.salesforce-setup.com` won't work. If you paste one, FeedOtter shows you the correct `.my.salesforce.com` address to use instead.
{% endhint %}

6. Paste in the Client ID and Client Secret from the previous step.
7. You will then be prompted to select the **Content Workspace**

{% hint style="info" %}
The **RUN AS** user you setup in the Salesforce External App must be a contributor to this workspace. If this dropdown is empty you must add the RUN AS user to this space and make them a Content Manager.
{% endhint %}

### Part 3. Review Settings

A completed settings area should look like this:

<figure><img src="https://2086102864-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIdHBGk8cqznUpEqm5g1U%2Fuploads%2FSlINrG1PgSPPYCcUJvO4%2Fimage.png?alt=media&amp;token=3e4dac18-7290-455b-b9bc-56770f884837" alt=""><figcaption></figcaption></figure>

If you see the **Connected** mesage when you click the test button. You can click Save.

### Troubleshooting

| What FeedOtter says                                                                                                   | What to do                                                                                                                                                   |
| --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| *The External Client App does not allow the Client Credentials flow (Salesforce: no client credentials user enabled)* | Complete Step 4: enable the flow on the **Policies** tab and select a **Run As** user. Then wait a few minutes and try again.                                |
| *Salesforce rejected the Client ID or Client Secret*                                                                  | Copy both values again from **Settings → OAuth Settings → Consumer Key and Secret** (Step 5). Make sure there are no extra spaces.                           |
| *This is not a Salesforce My Domain URL…*                                                                             | Use the **Current My Domain URL** from Setup → My Domain. It ends in `.my.salesforce.com`.                                                                   |
| *Sandbox is selected, but this is not a sandbox URL* (or the reverse)                                                 | Change **Environment** to match the URL. Trial and Developer Edition orgs use **Production**.                                                                |
| *These credentials belong to a different Salesforce org…*                                                             | Each connection stays tied to one org. Add a new integration for the other org.                                                                              |
| *The Salesforce Run As user is missing a permission or workspace access*                                              | Give the Run As user access to the Marketing content workspace, with permission to create and publish content, then click **Test Connection**.               |
| No workspaces in the dropdown                                                                                         | The Run As user can't see any **Marketing** content workspace. Add the user to your Marketing Cloud content workspace in Salesforce, then click **Refresh**. |
| *Could not reach Salesforce*                                                                                          | Check the My Domain URL. If it's correct, Salesforce may be temporarily unavailable, so try again in a few minutes.                                          |

If a message includes a reference such as `mcn-1a2b3c4d5e6f`, include it when you contact FeedOtter support. It helps us find the exact request.

### Change the secret or reconnect

If you regenerate the Consumer Secret in Salesforce, or the connection shows **Needs attention**:

1. In FeedOtter, go to **Settings → Integrations** and click the connection name.
2. Paste the new **Client Secret (Consumer Secret)**. If you leave the field blank, FeedOtter keeps the saved secret.
3. Click **Save**. FeedOtter tests the connection again.

FeedOtter never shows a saved secret, even to administrators.

### Disconnect

* **In FeedOtter:** go to **Settings → Integrations** and click the delete icon next to the connection. FeedOtter permanently removes the saved credentials. You can't delete a connection while active newsletters still use it.
* **In Salesforce (optional):** to revoke access completely, delete the **FeedOtter** External Client App in the External Client App Manager, or turn off its Client Credentials flow.

Emails that FeedOtter has already published stay in your Salesforce workspace.

### Sandbox and production

* Create a separate External Client App in each Salesforce org you connect. Sandboxes don't share apps or credentials with production.
* In FeedOtter, add a separate integration for each org and set **Environment** accordingly.
* Test in a sandbox first if you have one, then repeat Parts 1 and 2 for production.
