Our mission at Hightouch is to help companies build a single, shared view of their customer.

From sales to support to customer success, Salesforce is king when it comes to human-entered data (e.g. notes from sales reps, support tickets, etc.). That said, businesses of the 21st century are exploding with digital data, e.g.

  • Product usage data: # of orders, last login time, active users, # of API calls, etc.
  • SaaS data: Stripe charges, Zendesk tickets, Shopify orders, etc.
  • Revenue data: ARR/MRR, overage fees, subscriptions, digital invoices, etc.
  • Analytics data: Tracking events, website traffic, etc.
  • Aggregate metrics: LTV, CLV, churn risk, health scores, etc.

More often than not, this data exists in a database or data warehouse. [0]

How do you bring warehouse data into Salesforce?

If you have the data you need in a SQL database or data warehouse already, then the simplest way to sync the data to Salesforce is via the Hightouch platform. Just SQL— no scripts.

To learn how, watch this 3min video or read the post below

Let's say we're a dummy B2B SaaS called "E-Contracts Inc" that helps companies create and electronically sign digital contracts (like DocuSign, HelloSign, etc.). Our Sales and Customer Success (Account Management) teams live out of Salesforce CRM.

Each account in Salesforce represents an "organization" in E-Contracts Inc's web app. We want to sync the following custom fields to Salesforce's "accounts" collection

  • num_contracts_created_30d
  • num_active_users_30d
  • last_user_login_at

The first step is to create the custom fields we need in Salesforce. You can follow Salesforce's own documentation on this.

Next, you need to write a SQL query that retrieves the data you need from your data warehouse. Don't worry about the names of the returned columns— you can map each field to its corresponding Salesforce field visually in Hightouch later.

Below is an example SQL query for retrieving these columns from a dummy data model. You can iterate on your actual query in Hightouch's SQL editor or within your company's existing BI tool (e.g. Mode, Looker, PopSQL, etc.).

{% c-block language="sql" %}
with

sessions_30d as (
 select * from sessions
 where updated_at > now() - interval '30 day'
),

contracts_30d as (
 select * from contracts
 where created_at > now() - interval '30 day'
),

select organizations.id, organizations.name,
 count(distinct contracts_30d.id) as num_contracts,
 count(distinct sessions_30d.user_id) as maus,
 max(sessions_30d.updated_at) as last_login_at
from organizations
join organization_memberships
 on organization_memberships.organization_id = organizations.id
left join sessions_30d
 on sessions_30d.user_id = organization_memberships.user_id
left join contracts_30d
 on contracts_30d.organization_id = organizations.id
group by organizations.id, organizations.name
{% c-block-end %}

Then, save the query in Hightouch

Then, connect the Salesforce destination to your query.

With the below settings, Hightouch will see if a Salesforce "account" exists for the corresponding E-Contracts Inc organization using your "organization_id" field in Salesforce. If an account exists, Hightouch will update it. If it doesn't, Hightouch will create a new account.

Finally, select a frequency that you'd like Hightouch to sync at. In the below example, we've set the sync to run once hourly.

Voilà, you now have flowing to Salesforce. If you want to sync custom fields to other SFDC objects like "Contacts" or even make custom objects like "contracts" available in Salesforce, Hightouch can do it all— just SQL, no scripts.

If you're interested in syncing custom data from your database or data warehouse to Salesforce or 30+ other tools, schedule a demo or email hello@hightouch.io.

--

[0]: If you don't have the data you need in a warehouse, perhaps one of the following ETL platforms can help you

  • SaaS tools or prod DB → Warehouse: Fivetran, Stitch Data, Airbyte
  • Analytics events → Warehouse: Snowplow, Amplitude, Segment, Freshpaint
Ready to leverage your customer data?
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.