Freshpaint
Search
⌃K
Links

Salesforce

Send data from Salesforce to your destinations through Freshpaint

What you'll need

How this works

With the Salesforce source, Freshpaint can sync the data from your Salesforce standard and custom objects into Freshpaint's SQL Engine. All of this data will be made available as SQL tables.
With that data, you can:
  • Send to your destinations on a schedule with our Scheduled Events, keeping them in sync with Salesforce
  • Send data as properties of your tracked events with SQL Transformations​
  • Query the data with our SQL Editor to see what you have and test that your source is working
  • Combine your Salesforce data with that of any other source

Connect to Salesforce

  • To connect, you'll need to choose the Salesforce source in Freshpaint.
  • Click the Authenticate OAuth button to log into Salesforce with the user of your choice. This is what Freshpaint will use to connect to Salesforce.
  • By default, Freshpaint will sync all the data you have. You can choose for Freshpaint to sync only with data newer than a certain date (e.g. 2022-12-01).
  • Choose the tables you'll want to provide to Freshpaint. For the example mentioned above, you'd want to choose the Case table.

Working with Salesforce data

Freshpaint can work with any of the standard and custom objects available in your Salesforce account. Here's just a few of the popular tables we can work with:
Table
Description
​Account​
A list of all the business accounts in your CRM. With this, you can pull information like name and annual revenue.
​Campaign​
All of the marketing campaigns you've tracked in Salesforce, like webinars.
​Case​
A table with cases that you track within Salesforce through their Case Management solution.
​Contact​
A list of people within your Salesforce account. These can be associated with accounts, cases, and other objects.
​Lead​
All of the prospects that you can work with in the CRM.
​Opportunity​
The data in this table allows you to track sales anywhere in your process.
​Pricebook2​
A list of the products, organized by some package group, that can be sold by the organization.
​Product2​
The individual products that can be referenced by Pricebook2.
For the full list of standard objects, you should check out Salesforce's reference documentation.

Use Cases

Sending raw data to destinations

Let's say you want to connect your Cases to Freshpaint and send them to Mixpanel. With Freshpaint, you could do a query like this:
SELECT
*,
casenumber AS insert_id,
contactemail AS user_id,
slastartdate AS time
FROM
salesforce_case
This will identify the record by the email address on the case and its case number. It's important that you include those fields, named that way, because we'll need that to help Mixpanel make sense of the event. All of your other case information would be sent to Mixpanel for you to analyze because you selected *.

Calculating lifetime value

You can also use Freshpaint's SQL Engine to find aggregate information. Let's say you were interested in how much revenue you've had in sales over the past twelve months. You can write a query like this:
SELECT
EXTRACT(YEAR_MONTH FROM ClosedDate) AS year_and_month,
SUM(amount) AS ltv
FROM
opportunity
WHERE
closedDate > DATE_SUB(NOW(), INTERVAL 12 MONTH)
GROUP BY EXTRACT(YEAR_MONTH FROM closeddate)
You can use this query either see the data in our editor, or you can send this data to another destination (with one event per month).

Notes

  • You should strongly consider creating a user at Salesforce that has read-only permissions, and use that to connect Freshpaint to Salesforce.
    • To do this, click into the Setup screen at Salesforce and then choose Users.
    • Create a new user, and for the profile, choose "Read Only". This will be the user you'll log in with when creating a connection to Salesforce.
Last modified 7mo ago