Skip to main content
All CollectionsIntegrationsSalesforce
Automatic and manual syncing in the Salesforce integration
Automatic and manual syncing in the Salesforce integration

Learn all about the different types of sync possible with the Salesforce integration

Carly Hammond avatar
Written by Carly Hammond
Updated over 7 months ago

Summary

  • Changes made in Planhat sync automatically to Salesforce in near real time

  • The main/standard sync from Salesforce to Planhat operates every 10 minutes

  • You can also manually sync data in various ways

  • For further details, check out this article!

Who is this article for?

  • It's mainly for Planhat builders (e.g. CS Ops) setting up the Salesforce integration ...

  • ... but it can be useful for any Planhat users who'd like to learn more about when the Salesforce integration syncs and what is synced

Series

We have a series of articles on the Salesforce integration:


Article contents

Click below to jump to the relevant section:


Introduction

This is a technical deep-dive article

Read on if you'd like to learn the details of the different automatic and manual syncs possible with the Salesforce integration.

If you'd just like an overview of the Salesforce integration, please refer to our main article.

In the Salesforce integration, you can manually sync - you typically do this while you are setting up (configuring) the integration - and the integration also automatically syncs, ensuring your data is always kept up to date.

In this article, we're not going to cover which models/objects and fields are synced via Planhat's Salesforce integration - for more on that, see here and here. Instead, we're going to go through all the types of sync, when they occur, and what gets synced each time.

๐Ÿ“Œ Definitions

  • An "object" in Salesforce is the metadata container - e.g. Account or Contact

    • The Planhat equivalent is "model" - e.g. "Company" or "End User"

  • A "record" in Salesforce is the data inside the object - e.g. within the Account object, records could be "Apple", "Microsoft" and "Google"


Summary

  1. Automatic sync

    1. Salesforce to Planhat ("Receive from Salesforce")

      1. Sync job every 10 minutes, identifying updated records by looking at the LastModifiedDate in Salesforce, going through all objects in turn

      2. Alternative sync job every 30 minutes, identifying updated records by looking at the SystemModStamp in Salesforce, going through all objects in turn

    2. Planhat to Salesforce ("Send to Salesforce")

      1. Creation or update of a record in Planhat by a user triggers that record to be synced to Salesforce

      2. There is a daily sync of all records of Companies and End Users in Planhat to Salesforce (to include changes made by the system)

  2. Manual sync

    1. Salesforce to Planhat ("Receive from Salesforce")

      1. Sync all data from Salesforce (if sync has been enabled for an object, and respecting any filter), by clicking "Full Fetch"; this goes through all objects in turn similar to the sync jobs described above, but it includes all history rather than just what was recently modified

      2. Sync specific object to Planhat, by clicking "Fetch Data from SFDC" (respecting any filter)

      3. Sync specific Account record (and related records of other objects) to Salesforce, by clicking "Sync with Salesforce" on a Company Profile

    2. Planhat to Salesforce ("Send to Salesforce")

      1. Sync specific model to Salesforce, by clicking "Push Data to SFDC"


1. Automatic sync

In this section, we'll cover:


a. Salesforce to Planhat

There are two possible standard sync jobs that regularly fetch data from Salesforce. The difference is how they detect "changed" records, and therefore how much data they fetch at a time.

Standard sync job - every 10 minutes - syncs updates by Users

  • When? There is a standard job that runs every 10 minutes to sync from Salesforce to Planhat. (Occasionally, it may be slightly longer than 10 minutes between syncs)

  • What? This goes through all objects from Salesforce in sequence - see below for further details

    • This sync looks at the "LastModifiedDate" field on Salesforce to identify changes. This field is updated automatically when a User updates a record in Salesforce (and when this integration updates a record)

Alternative sync job - every 30 minutes - syncs all updates

  • When? You can optionally enable a sync job to run every 30 minutes to sync from Salesforce to Planhat. (Occasionally, it may be slightly longer than 30 minutes between syncs.) If this is enabled, the standard 10 minute sync job does not run

  • What? This goes through all objects from Salesforce in sequence - see below for further details

    • This sync looks at the "SystemModStamp" field on Salesforce to identify changes. This field is updated automatically when the Salesforce system updates a record in Salesforce

    • This means all updates in Salesforce are fetched, including those initiated by automated processes ("system events" - automations or API) - rather than just made manually/directly by a User in Salesforce. Therefore, more data is fetched and synced into Planhat if this sync job is enabled

๐Ÿš€ Tip

If you would like to enable this 30-minute sync job to include Salesforce system updates, reach out to your TAM or CSM, as this setting is visible only to Planhat staff.

It shows for Planhat staff at the top of the Salesforce integration, in a section called "Salesforce Integration Settings" - "Syncjob: Receive from Salesforce":

Sync job process

Regardless of which of the two sync jobs is running to fetch data from Salesforce (the standard 10 minutes or the alternative 30 minutes), the process is:

  • It goes through each model/object section in the order listed below

  • It only fetches data from Salesforce if the sync direction for that section is "Receive from Salesforce" or "Both directions"

  • The integration sends a query asking which records of that object have been updated since the previous query (10 or 30 minutes)

    • Remember you saw above that the different sync jobs use a different Salesforce field/property to define what has changed

  • Once all the relevant records of an object are synced, it moves onto the next object

  • The sync respects any filter set on an object/model section

  • If the record has changed and so is synced, the fields that are synced are synced are the default fields and fields you have included in custom field mapping - so that's not all fields, and not only updated fields

  • It actually starts with the Team section at the top of the integration. Here it's checking whether there are any new Users in Salesforce (that match the filter criteria if you have set one), and saving them in the integration's Users list

The order it goes through the model/object pairs is:

  1. Team (Users)

  2. Companies / Accounts

  3. End Users / Contacts

  4. Notes

  5. Tasks

  6. Licenses

  7. Assets

  8. Projects

  9. Other custom mapped model/object sections

  10. Tickets / Cases


b. Planhat to Salesforce

Sync to Salesforce in response to events in Planhat

  • When? When you create or update a record (e.g. a specific Company) in Planhat, this triggers a sync that happens near instantly (typically a few seconds)

    • The events that trigger this are ones made by you, as Users

  • What? The relevant record, including the specific field data that triggered the sync, is sent to Salesforce

๐Ÿ“Œ Note: If a Planhat field is updated by the "system" rather than a specific User, the update will not trigger Planhat to send data to Salesforce.

These updated field values will be sent to Salesforce if another field on that record, which is configured to sync to Salesforce, is updated by a User in Planhat, as that will trigger the automatic event sync.

Or otherwise, for Company and End User models, they will be included in the daily sync job described below.

๐Ÿ“Œ Note: For the Company/Account section, it's possible to set the model/object as "Receive from Salesforce" but set a specific field to "Send to Salesforce" (discussed here). In this specific case, those updates will not happen instantly; instead, the job running once a day (described below) will push these updates to Salesforce.

Daily sync job

  • When? Once a day - you may hear this referred to as the "nightly sync"

  • What? Companies and End Users are synced from Planhat to Salesforce - the main purpose is to include changes made by "the system"

Once a day, a process runs in each Planhat tenant, running calculations for Formula Fields, Health Scores, usage data, and so on.

After this, there is a scheduled sync of Companies and End Users (these models specifically) from Planhat to Salesforce.

This sync is scheduled because otherwise, these changes made by the system (such as Company Health Score updates, or End Users being created from usage data) do not trigger the sync from Planhat to Salesforce (described above).


2. Manual sync

There are a number of ways you can manually sync Salesforce data in Planhat. They differ in what is synced. Let's take a look at each of them in turn.

In all cases, the only fields that are synced are the default fields (listed here) and any fields you have configured in custom field mapping).

The manual syncs are most commonly used when you are first configuring the Salesforce integration. For example, you may set up the model/object sections one at a time, clicking "Fetch Data from SFDC" for that sync section before moving onto the next one, or you may configure everything and then select "Full Fetch".


a. Salesforce to Planhat

All objects - "Full Fetch"

  • Where? At the very bottom of the model/object sections of the Salesforce integration, you will see the "Full Fetch" button

  • What? This fetches all data from Salesforce (respecting any object filters and also whether the sync has been enabled for each object via the sync direction)

    • It proceeds through the sequence as described above for the sync job process. With this option, however, it does a full sync of all historical records, rather than only including recent updates

Individual Salesforce object

  • Where? On each of the integration sync sections (model/object pairs), there is an "down arrow" icon that has the tooltip "Fetch Data from SFDC"

  • What? This fetches all the data from that Salesforce object (e.g. Account) and sends it to the relevant Planhat model (e.g. Company)

    • Where you have set a filter in the integration for the Salesforce object (e.g. Account Type equals "Customer"), only the matching records are synced

Individual Company and related records

  • Where? On an individual Company Profile (e.g. the Company Profile for Apple), click on the icon of three vertical dots in the top right, and select "Sync with Salesforce"

  • What? This fetches the record of that Company (Account) from Salesforce and syncs it into Planhat, and also the related records from other objects, such as related End Users (Contacts) and Tasks etc.

    • It goes through the sync job process, except it's only looking at that Company/Account and what's related (plus the Team section is synced as usual)


b. Planhat to Salesforce

Individual Planhat model

  • Where? On many integration sync sections (model/object pairs), there is an "up arrow" icon that has the tooltip "Push Data to SFDC"

  • What? This sends the data from that Planhat model (e.g. Company) to the relevant Salesforce object (e.g. Account)

Did this answer your question?