Note: Selective sync requires a Salesforce Enterprise license.
The Salesforce User whose credentials are used to sign in to Salesforce from the HubSpot Settings screen facilitates the connection between HubSpot and Salesforce -- we'll refer to this user as the integration user. The basic principle to achieve a selective sync from Salesforce to HubSpot is to intentionally hide or expose records in your Salesforce Org to the integration user to either prevent or allow those records to sync with HubSpot. If the integration user has read/write permission to a Salesforce record, the record is eligible to sync with HubSpot; stated differently, any Salesforce records that the integration user cannot read/write will not be eligible to sync with HubSpot.
To ensure that you have all of the necessary permissions, we recommend that you clone the System Administrator profile and modify the cloned profile. After cloning the profile, edit the Profile's Standard Object Permissions to remove the Data Administration permissions from any object that you would like to sync selectively with HubSpot. In this example, we are going to limit Leads and Contacts. Remember to save your changes when you are finished. Learn more about creating and editing Salesforce Profiles
Next create a new Role to be used by the integration user. In this example, we create the new Role at the highest level of the Role Hierarchy, so the new Role will be outside of any existing hierarchical Permissions schemes. Creating the Role at the outside of any existing hierarchies is typically the simplest implementation, but the specific needs of your Salesforce organization may vary. Learn more about Salesforce Role Hierarchies
When creating the Role, don't worry about the Contact Access settings; this setting will be overridden by the Sharing Rules we create later in this guide.
If you don't want to create the new role outside of the existing hierarchy, please keep in mind two possible issues:
Now that we've created the Profile and Role for the integration user, we can create the new User with the Profile and Role. Learn more about creating a Salesforce User
Last, make sure the integration user is assigned the HubSpot Integration Permission Set. Navigate to the HubSpot Integration Permissions in your Salesforce Org's Permission Sets (note: this Permission Set is only available after installing the HubSpot Managed Package in your Salesforce Org). Learn more about assigning a Permission Set to a Salesforce User
Now that we've created the integration user with its own role and profile, we can configure your Salesforce Organization's Sharing Settings to hide or expose the desired records to HubSpot. The following steps demonstrate the process on the Lead object, but this process can be repeated on the Contact object or any other object for the same effect. Learn more about Salesforce Sharing Settings
First we need to set the Organization-Wide Default Sharing Setting for the object to private. In this example, we are editing the settings of the Lead object. If your Organization-Wide Default setting was 'Public', you may need to edit individual Profiles to give View or Modify All access to this Object. Any profile with View/Modify All permissions to an object will override the Organzation-Wide Default. Learn more about editing Organization-Wide Sharing Defaults
Create a new Sharing Rule to choose which records sync with HubSpot. In this example, we are syncing leads if they have both a 'True' value in a custom field named, Sync to HubSpot, and an '@' symbol in the email field to verify that the lead has an email address. (Records without a valid email address will not sync to HubSpot, so this adds additional safeguards against sync errors.) This is only an example -- any criteria can be used in a Sharing Rule, so Rule criteria can vary to meet your business needs. Make sure the Sharing Rule is set to 'Read/Write' Access so that the HubSpot integration can continue to update records. Learn more about Salesforce Sharing Rules
This method will allow you to sync a subset of Salesforce records with HubSpot based on the criteria you define in your Salesforce Sharing Settings, but you should be aware of the following:
Note: This service is not provided by HubSpot's Support Team.
Customers may purchase time with a Technical Consultant for support with implementing Selective Sync.