To setup your Salesforce Marketing Cloud app in Cobalt for OAuth, you will need the following credentials from your Salesforce Marketing Cloud account:

  • Client ID
  • Client Secret
  • Scopes

Pre-requisites

  1. Salesforce Marketing Cloud account with API Access.

Required Settings

  • Mandatory Scopes
  1. offline_access
If you haven’t already created an app in Salesforce Marketing Cloud, you’d need to create one.

Creating an app in Salesforce Marketing Cloud

To create a Salesforce Marketing Cloud app and acquire the above mentioned credentials, please follow the steps mentioned below:

  1. Log in to your Salesforce Marketing Cloud account.
  2. Click on the Profile icon in the top right and select Setup button.
  1. Navigate to Installed packages under Apps in the left side menu and click on New button.
  2. Enter a unique Name for your application and click on Save.
  3. Go to your Apps catalog in Cobalt > Search for Salesforce Marketing Cloud > Settings > Use your credentials > Callback Url > Copy it.
  4. In your app on Salesforce, click on Add Component button > Choose API integration> Click on Next > Select Web App as Integration Type and click on Next
  5. Paste the Callback Url that you copied from Cobalt under Redirect URIs and select the mandatory scope i.e offline_access in the Scope section, and click on the Save button.

You can extend the lifetime of your Refresh token as required so that expired access token can be refreshed by Cobalt automatically for a longer period of time for the user.

  1. Copy the Client Secret displayed on the screen and click on Finish.

Save the Client Secret with you as it will be displayed only once.

  1. Copy the Client ID displayed under the API Integration section.

Configuring credentials in Cobalt

App settings page lets you configure the authentication settings for an OAuth 2.0 based application. For your customers to provide you authorization to access their data, they would first need to install your application. This page lets you set up your application credentials.

Provide the acquired Client ID and Client Secret under Settings of the app and save it.

Configuring Scopes

Cobalt lets you configure what permissions to ask from your users while they install your application. The scopes can be added or removed from the App settings page, under Permissions & Scopes section.

For some applications Cobalt sets mandatory scopes which cannot be removed. Additional scopes can be selected from the drop down. Cobalt also has the provision to add any custom scopes supported by the respective platform.

Once the scopes has been added to the application in Cobalt, go to your Salesforce Marketing Cloud account and update the scopes as added on Cobalt.

Select the OAuth App created for Cobalt > Click on Edit under API Integration section > Select the scopes as added in Cobalt > Click on Save.

If you are facing scopes missing or invalid scope error. Make sure you are not passing any custom scope not supported by the platform. And, the scopes selected here are identical to the ones selected in the platform.

Actions and triggers

Once the above setup is completed, you can create orchestrations of your use-cases using Salesforce Marketing Cloud actions and triggers. Following are the set of Salesforce Marketing Cloud actions and triggers supported by Cobalt.