Skip to main content

Integrations - Salesforce CRM v2 (pull)

This is the v2 integration, which uses Connected Apps

O
Written by Optimize Team
Updated over 2 weeks ago

Before getting started

Before getting started, please note the following.

Note 1: This uses Salesforce's Lightning experience, not Salesforce Classic. Functionality should be similar, but screenshots may differ if you use Salesforce Classic.

Note 2: Creating a Connected App in Salesforce is a very precise process. There are a handful of small settings to apply, and missing any one of them wil stop the whole process from working. We have documented the process clearly, please read carefully and follow each step exactly as described.

Note 3: Beforehand, you should have a clear use-case in mind. There is a significant volume of data kept in Salesforce, it's highly relatinal, and in Optimize we avoid consuming more data than we need to for Data Privacy. Sharing clear use-cases beforehand will help us here.

What does the Salesforce Integration do?

As with most pull integrations, the Salesforce integration aims to import customer profiles for targeting in Webtrends Optimize.

With tables are joined together and ID associations built, you will be able to target users based on the imported data using the Segment Builder in Optimize.

Information needed

For this integration, we will need:

  • A new connected app

    • It's Consumer Key

    • It's Consumer Secret

  • Your salesforce domain

  • Your desired copy schedule, e.g. once per day at midnight.

  • Which tables you wish to import, e.g. Account, Contact, Opportunity, Lead, Case, etc.

    • What data you care about specifically

    • How you see data joining together, if not obvious

  • Your intended end use case.

    • E.g. I want to target people based on Column A, matched to cookie B on the page. Specifically, accounts with an opportunity with a >90% probability to close.

    • This will help us to discard data we don't want, which supports Data Privacy.

This document will walk you through how to obtain all of these pieces of information.

Creating a Connected App

1. Create a Connected App

Head to Setup > Platform tools > Apps > App Manager

Click on "New Connected App"

If presented with this popup, continue with the default Connected App option.

Add some basic information. The names are not important, but we suggest using something relevant like WTO.

Enable OAuth Settings:

The callback URL doesn't matter much, but we suggest using the value:

https://oauth.pstmn.io/v1/callback

Select your oauth scopes. At a minimum, we require:

  • Access the salesforce api platform

  • Manage user data via. APIs

  • Perform requests at any time

Select this configuration for the checkboxes:

  • Require PKCE - off

  • Require secret for web server flow - off

  • Require secret for refresh token flow - off

  • Enable client credentials flow - ON

If presented with this popup, click OK to acknowledge.
​

All other options can stay off/empty - leave them as is and click Save at the bottom:

Continue to proceed past the 10 minute warning:

2. Set access policies for the Connected App

Click "Manage"

Click "Edit policies"

Under oauth policies, use these settings:

Also, select a user under Client Credentials Flow

Click Save once completed:

3. Get credentials for Connected App

In Setup, head to Platform Tools > Apps > App Manager

Scroll down the list to the Connected App you created, e.g. WTO. Click the arrow at the end of the row, and select View.

Click on Manage Consumer details

You may need to enter a one-time passcode here:

Once completed, you will find the two important pieces of information we need:

4. Find your domain

This should be in the format of:

something.my.salesforce.com

It's most easily found here:

Setup in Webtrends Optimize

Your credentials will be added into a Data Factory flow:

Once established, we will select your desired tables from the list:

These will be imported into Optimize on the desired schedule, and made available.

Did this answer your question?