Conversation Capture for Google Workspace
Prerequisites
You need to have access to your Google Workspace Admin Console (https://admin.google.com/)
Enable "Roll up activities to a contact's primary account" in Salesforce (Setup > Feature Settings > Sales > Activity Settings)
Enable "Allow Users to Relate Multiple Contacts to Tasks and Events" in Salesforce (Setup > Feature Settings > Sales > Activity Settings)
Create an Email Service (in Salesforce)
In Salesforce go to Setup and find "Email Services" (Setup > Custom Code >Email Services).
Create a new Email Service and fill out these fields:
Email Service Name: Goldie_Activity_Sync (important to use exactly this name)
Apex Class: AbSfSyncHandler
Accept Attachments: All
Advanced Email Security Settings: unchecked
Accept Email From: leave this field blank
Convert Text Attachments: unchecked
Active: checked
Leave all other fields as they are ("Discard Message")
Enable error routing: checked
Route Error Emails to This Email Address: put support@goldie.ai or any other email address that should be informed if errors occur
Hit "Save" which takes you back to the newly created EmailService's overview page
At the bottom of the page click "New Email Address"
On the Email Service Address page populate these fields:
Email Address Name: Goldie_Activity_Sync (important to use exactly this name)
Email Address: Goldie_Activity_Sync (important to use exactly this name)
Active: checked
Context User: ideally, pick a service user account with ModifyAllData permissions; if you don't have a service user account, select a user with with ModifyAllData permissions (typically a Sys Admin)
Accept Email From: leave this field blank
Hit "Save"
Setting Up Goldie Activity Sync (in Google Workspace)
Open the Goldie Setup page in Salesforce
The link to the Setup page has the form https://<mydomain>.lightning.force.com/apex/absf__AbsfSetup
Click the button "Copy email address to clipboard"
Open the Google Workspace Admin Console (https://admin.google.com/)
Navigate to Apps > Google Workspace > Settings for Gmail > Compliance
Find the section "Content compliance"
Click the button "Configure" (or "Add another rule" if you already have rules defined)
In the modal "Add settings" select these options:
Call the setting "Goldie Activity Sync"
1. Email messages to affect:
check the box "Inbound" and "Outbound" (but leave "Internal - Sending" and "Internal - Receiving" unchecked)
2. Add expressions that describe the content you want to search for in each message: Add an expression ("Advanced content match")
Location = Full headers
Match type = Contains text
Content = Message-ID
3. If the above expressions match, do the following
Also deliver to > Add more recipients
Use the email address that you copied to the clipboard in step 2
Click Save to close the modal.
Testing Goldie Activity Sync
Find a test account in Salesforce that has a contact and an open opportunity.
Send an email to the contact (but don't add any other recipients to the email).
Important: the subject line must start with "testing Goldie", otherwise you will have to wait for up to 10 minutes for the email to be synced.
Your email should be displayed in the opportunity's, the contact's and the account's activity history a few seconds later.
If you have access to the contact's email inbox, reply to the email you just sent.
The reply should be displayed in the opportunity's, the contact's and the account's activity history.
Notice: Regular email and calendar events are synced every 10 minutes.
Notice: The user that is configured as context user of the Salesforce email service address (described above) cannot be deactivated without selecting a different user as the context user first.