Salesforce Lightning for Gmail
In my previous blog (Part I) I discussed about Lightning for Gmail – the email integration for Gmail users. In this blog (Part II) we’ll look at Lightning Sync.
Lightning Sync keeps contacts and events in sync between your Google applications and Salesforce.
When you sync contacts and events between your Google applications and Salesforce, you increase your productivity. That’s because there’s no need to duplicate work between the two applications. In addition, Lightning Sync syncs items whether you’re working from your desk or from your mobile device using Salesforce1.
Following are high level steps to configure Lightning Sync in Salesforce:
Step 1: Prepare your G Suite account for Lightning Sync
The Google administrator at your company can prepare Google servers to communicate with Salesforce. Your Google admin can complete these steps by logging in to your company’s Google API Console and Google Admin Console.
Using Google API Console
- Create a Google project dedicated to Lightning Sync. (https://console.developers.google.com/projectselector/apis/library?pli=1)
- From the new project, to set up reps to sync events, enable Google Calendar™ API.
- From the new project, to set up reps to sync contacts, enable Google Contacts API.
- Create credentials for a service account with the role Project Owner and the key type JSON.
- Enable Domain-Wide Delegation for the service account. Doing so generates a Client ID (also known as Client name) for the service account, which you need later.
- Save the JSON private key from your service account in a secure location and share it with your Salesforce admin. (But only your Salesforce admin.
Using Google Admin Console
- Navigate to your security settings, select the advanced section, and click Manage API client access.
- Authorize read-only calendar scope for the service account by entering the service account Client ID (also known as Client name) you generated in Google API Console. Enter the scope:
- https://www.googleapis.com/auth/contacts.readonly and https://www.google.com/m8/feeds
When you’re finished, Salesforce admins can take the next steps by preparing Salesforce for Lightning Sync.
Step 2: Prepare Salesforce for Lightning Sync
Lightning Sync, complete the necessary steps to prepare Salesforce, too.
- From Salesforce Setup, Register a new remote site for https://www.googleapis.com. Don’t disable protocol security for the site, or Salesforce will not be able to connect with Google.
- From Salesforce Setup, enter Lightning Sync Setup in the Quick Find box, then select Lightning Sync Setup.
- Enable Lightning Sync.
- Select OAuth 2.0 for Google (Beta) as your preferred connection method.
- Upload the private key for your Google service account. Your Google admin generated the key when setting up the service account for Lightning Sync.
- Click Save.
When you’re finished, run the Lightning Sync connection test to make sure that you’ve setup your connection correctly.
After your Salesforce admin initiates contacts sync for you, Lightning Sync creates a group in Google Contacts called Salesforce Sync. Any contacts that have synced from Salesforce to Google are found in the Salesforce Sync group.
Gmail™ accesses those contacts automatically when you attempt to email or chat with those contacts. Or if you are setup to sync from Google Contacts to Salesforce, you can add Google Contacts to the Salesforce Sync group, and Lightning Sync starts syncing the contact with Salesforce during the next sync cycle.
Note: Don’t rename, move, or delete the Salesforce Sync group, or syncing between Salesforce and Google Contacts could stop.
Setting both Lightning for Gmail and Lightning Sync lets you choose which Google Calendar™ events sync to Salesforce. When you relate Google events to Salesforce using Lightning for Gmail, edits made in Google Calendar sync back to Salesforce, keeping important Salesforce events up to date automatically.