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:
Automatic and manual syncing in the Salesforce integration β¬ οΈ You are here
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
Automatic sync
Salesforce to Planhat ("Receive from Salesforce")
Sync job every 10 minutes, identifying updated records by looking at the LastModifiedDate in Salesforce, going through all objects in turn
Alternative sync job every 30 minutes, identifying updated records by looking at the SystemModStamp in Salesforce, going through all objects in turn
Planhat to Salesforce ("Send to Salesforce")
Creation or update of a record in Planhat by a user triggers that record to be synced to Salesforce
There is a daily sync of all records of Companies and End Users in Planhat to Salesforce (to include changes made by the system)
Manual sync
Salesforce to Planhat ("Receive from Salesforce")
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
Sync specific object to Planhat, by clicking "Fetch Data from SFDC" (respecting any filter)
Sync specific Account record (and related records of other objects) to Salesforce, by clicking "Sync with Salesforce" on a Company Profile
Planhat to Salesforce ("Send to Salesforce")
Sync specific model to Salesforce, by clicking "Push Data to SFDC"
1. Automatic sync
In this section, we'll cover:
2 possible syncs:
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:
Team (Users)
Companies / Accounts
End Users / Contacts
Notes
Tasks
Licenses
Assets
Projects
Other custom mapped model/object sections
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 that it doesn't only send the specific field that was updated
However, it does only sync the default fields or custom mapped fields
π 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)