Loading
Sales Productivity
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          How Email Activity Matches with Other Records

          How Email Activity Matches with Other Records

          When Sync Email as Salesforce Activity is turned on, Einstein Activity Capture tries to associate each address in the From, To, and CC on the email to user, contact, or lead records. The addresses and related activity are also matched with account and opportunity records. The default matching logic considers record ownership, recent activity, and other factors to connect new addresses and activity to your existing data.

          Required Editions

          Available in: Lightning Experience
          Available with Einstein Activity Capture Standard in Sales in Starter, Pro Suite, Professional, and Enterprise Editions
          Available with Unlimited Edition, Einstein 1 Sales Edition, and Agentforce 1 Edition
          Available with Einstein for Sales, which is included in Einstein 1 Sales Edition and available for an extra cost in Enterprise and Unlimited Editions
          Available with Sales Engagement, which is included with Sales in Performance and Unlimited Editions, and available for an extra cost in Professional and Enterprise Editions
          Available with Revenue Intelligence, which is available for an extra cost in Enterprise and Unlimited Editions
          Note
          Note We’re reorganizing the Einstein Activity Capture documentation. We’re moving some information around, but we aren’t deleting anything.

          Email addresses are matched upon first detection, including in replies. On existing email threads, only addresses for newly added recipients are matched. Original recipients retain their existing record associations.

          Email replies inherit account and opportunity associations from the parent email message. If the parent email doesn’t have associations and a new email address is added to a reply, the matching process looks for an account or opportunity for the new address based on the matched user, contact, or lead or the address domain.

          User Records

          Email addresses are checked against active users. If there aren’t any active users, the connected account owner is used. If no active users or connected account owners match, inactive users are considered. If still no users match, the email addresses are considered as possible matches for contacts and leads.

          API-only and users associated with automated processes aren’t considered.

          Note
          Note If an email matches to a user and also a contact, person account, or a lead record, the email is matched to the user record. Make sure that contact, person account, and lead records don’t include email addresses that belong to your users.

          Contact and Lead Records

          Email addresses that don’t match user records are reviewed to match contact or lead records. Contacts are reviewed for matches before leads. Only one contact or lead record is matched to each email address on a message.

          If multiple contact or lead records have the same email address, this criteria determines the match.

          1. Partner account (if turned on): The contact is associated with an account record that matches the partner account.
          2. Account owner: The contact record’s related account is owned by the matched user.
          3. Contact owner: The contact is owned by the matched user.
          4. Privacy check: Private contacts not owned by a matched user are excluded to protect data visibility.
          5. Recent activity: A contact with the most recent LastActivityDate is prioritized.
          6. Last modified: As a final selection tiebreaker, the contact with the most recent LastModifiedDate is matched.

          If an address remains unmatched, it’s suggested as a new contact. If no new contact is created, the address is stored on the email message record without a relation.

          Account Records

          Account records that are related to matched contacts are considered. If multiple accounts qualify, this criteria determines which record matches to the email message.

          1. Partner account (if turned on): Only partner accounts are considered.
          2. Most contacts: The account record with the greatest number of associated contacts is selected.
          3. Recent activity: An account with the most recent LastActivityDate is prioritized.
          4. Last modified: As a final selection tiebreaker, the account with the most recent LastModifiedDate is matched.

          If an email can’t be matched to an account by using an existing contact, the domain from the email address is checked against the website field on all account records. An account is matched if the email domain (or subdomain) is found in the website field value. For example, the email address example@salesforce.com matches the website field values www.salesforce.com and www.help.salesforce.com.

          Opportunity Records

          After email activity matches to accounts, opportunity records are considered for matching. If an email already matched to an account also matches with an opportunity, the opportunity relationship takes precedence. The direct relationship to the account is replaced with a relationship to the opportunity.

          Opportunity matches are determined by this criteria.

          1. Close date: The close date is 60 days or more after the email activity occurs.
          2. Owner: The opportunity owner is included in the email.
          3. Account owner: The related account is owned by a matched user.
          4. Created date: The opportunity was created no more than 60 days after the email activity date.
          5. Activity window: The activity date falls between the opportunity’s create and close dates.
          6. Status: An open opportunity is selected before a closed one.
          7. Close date: An opportunity with an earlier close date is selected before one with a later date.
          8. Recent activity: An opportunity with the most recent LastActivityDate is prioritized.
          9. Last modified: As a final selection tiebreaker, the opportunity with the most recent LastModifiedDate is matched.

          How Matching Works

          The Activities: Match Email to Records flow controls the matching process. The flow automatically triggers when Einstein Activity Capture or Salesforce Inbox captures a new email message. These four default flow actions run in this order.

          1. Get Users from Email Address
          2. Get Contacts and Leads from Email Addresses
          3. Get Account and Opportunity from Email Addresses
          4. Create Email Activity with Associations

          Emails sent from the Salesforce Email Composer in Lightning Experience or the email application don’t use flow-based matching. They’re associated with the open user, contact, or lead records. The Activities: Match Email to Records flow doesn’t overwrite any manual association between an email and an activity.

          Flow and platform limitations apply to Activities: Match Email to Salesforce Activity, including usage-based entitlements, per-transaction flow limits, and object access requirements.

          Important
          Important Activities Match core actions don’t support system-run flows or automated process users. Activities Match core actions are executed in the context of the user, who is also referred to as the “context user.” The flow has the same access level as the context user.

          Customize Matching Rules

          To customize matching, edit the default flow actions by using Flow Builder. Select the Activities Match category, and search for the appropriate action. For example, add criteria to make sure that emails match to a customer account record instead of a partner account.

          Use Apex to create additional custom matching rules for specific use cases. For example:

          • Block certain emails from being logged based on information available in the flow.
          • Use custom email addresses instead of standard email addresses.
          • Skip or change the object records to match and use, for example, custom objects.
          • Create your own tiebreaker for when the flow matches an email to multiple records.
           
          Loading
          Salesforce Help | Article