Updated 02/03/2021

For part 3 of the App for Outlook series, we are going to take a look at the settings that affect tracking.


Let's start at the organization level settings with System Settings. (We will not be covering folder-level tracking, as the App for Outlook is not required for this)



Configure email correlation

Use correlation to track email conversations - This only works with Server-Side Sync enabled and therefore, will work with the App for Outlook. With this box marked, hidden email properties are used to determine if the email should be correlated to an existing email conversation. If you use the EWS Editor for Dynamics 365, you could identify these as the ConversationIndex and In-Reply-To fields. If Use correlation to track email conversations is unmarked, conversations will not be tracked. The only emails that would be tracked would be manually tracked on an individual basis with the App for Outlook, including replies and forwards.


The option to select Tracking Tokens and Smart Matching is only available when this Use correlation to track email conversations box is marked. There is an OrgDbOrg setting, IgnoreConversationIndexAndInReplyToForCorrelation, which when set to True allows you to use Tracking Tokens or Smart Matching without the ConversationIndex and In-Reply-To fields used in correlation, similar to how correlation was handled before this method was introduced.


Use Tracking Token - This creates a tracking token in the Subject line of an email to help Dynamics 365 determine if the email should be tracked and is still recommended as the most accurate. Although, many organizations are not fond of the token being visible in the subject line. Unlike the legacy client, tracking an email with the App for Outlook prior to sending does not generate a tracking token. The tracking token is only generated when the email is sent directly from Dynamics 365. In this case, it would use the ConversationIndex. Another thing to be aware of is if someone modifies or removes the tracking token, correlation will break. Meaning that reply would not be tracked automatically.


Smart Matching - This is a correlation method from CRM 4.0.

Smart matching relies completely on the existence of similarity between emails. The subject and recipients (from, to, cc and bcc) list are the two important components that are considered with checking for similarity.

When an email is sent from Dynamics 365, there are two sets of hashes generated for it and stored in the database

Subject hashes:

To generate subject hashes, the subject of the email, which may include the Tracking token if its usage is enabled in system settings, is first checked for noise words like RE: FW: etc. The noise words are stripped off the subject and then tokenized. All the non empty tokens (words) are then hashed to generate subject hashes

Recipient hashes:

To generate the recipient hashes the recipient (from, to, cc, bcc) list is analyzed for unique email addresses. For each unique email address an address hash is generated.

Next when an incoming email is tracked (arrived) in Dynamics 365, the same method is followed to create the subject and recipient hashes.

To find the correlation between the incoming email and the outgoing email, the stored subject and recipient hashes are searched for matching values. Two emails are correlated if they have the same count of subject hashes and at least two matching recipient hashes.

Due to the possibility of emails being incorrectly correlated to the wrong message thread when the subject lines and recipients are similar, this is not my correlation method of choice. I recommend using either correlation(ConversationIndex) or Tracking Tokens instead and disabling Smart Matching. The most accurate method would be using correlation (ConversationIndex) along with Tracking Tokens.


Set tracking options for emails between Dynamics 365 users

Having this checked will create two separate email activities. One owned by the sender for the sent email and another for the received email that is owned by the recipient.

When this is not marked and an email is sent from a Dynamics 365 user as tracked to another Dynamics 365 user, the recipient will see this as tracked only for a short period and then tracking will be removed, as we are not tracking the incoming email.

There is another OrgDbOrgSetting (DoNotIgnoreInternalEmailToQueues) that also affects the way this functions. By default, the functionality is setup to cause queue-promoted items to ignore correlation and not create a received activity if the messageid matches another email (i.e. An email sent from Dynamics another Dynamics user or if the sent email is tracked into Dynamics before the queue attempts to promote the item or if a workflow rule sends an email message to a queue, email messages that are sent by the workflow rule are not delivered.)

The default setting is False, which gives you the outcomes above and internal email messages to queues will not be delivered.

If this is set to True, internal email messages to queues will be delivered. I would recommend that this setting be checked.


Now, let's take a look at Personal Options, which are specific to each individual user


Allow Microsoft Dynamics 365 to send email on your behalf

This will allow Dynamics users to send email on your behalf. An example would be a delegate assistant for other users or a service account that is used in a workflow that sends emails. If the service account does not have this marked and the owner of the workflow is a different user, the workflow will fail.


Select the email messages to track in Microsoft Dynamics 365 (This is referred to as Email Filtering, as described in part one)

All email messages
This will track all email messages regardless no matter if it is a Dynamics 365 record or not. If you are using this setting and want the Sent folder to also track, you would need to enable the AutoTrackSentFolderItems OrgDbOrgSetting using this tool. Unless there is strict Exchange and Outlook governance, this setting may not be the best option, as it will promote items to Dynamics, whether they are related to Dynamics or not. It is important to note that when we promote items, these are only items in the default Inbox at the top-level of the information store. This means folders at the same level of the inbox, archive folders, etc.. will not be promoted. This also includes any email where your email address exists in the BCC line. BCC is not promoted for any other settings

Email messages in response to 365 email
This will track emails in response to current emails based on the correlation configuration in System Settings. It looks to see if this email has already been tracked in Dynamics 365, was an email that was generated and sent directly from Dynamics 365, or was automatically promoted in some manner with Server-Side Sync. This is the option I see used in most organizations. This will also include replies and forwards.

Email messages from Dynamics 365 Leads, Contacts and Accounts
This will only track emails if the sender email address resolves to a Dynamics 365 lead, contact, or account. If this resolves to one of the above record types, the email will be tracked automatically, even if it is not tied to a previously tracked email.

Email messages from Dynamics 365 records that are email enabled
This will track emails from all record types, including custom record types that contain an email address field. If this resolves to one of the above record types, the email will be tracked automatically, even if it is not tied to a previously tracked email.

No email messages 
This will prevent automatic tracking of any emails.

When Dynamics 365 does email resolution or association, it looks specifically at the email address field of the entity. This must be a Single Line of Text field with Email format. Any time a field as described above is added to a record, this creates a record in the EmailSearchBase SQL table, which is queried to identify if and what record the email address resolves to. Email filtering, correlation, and resolution will also be discussed in scenarios in part 4 of this series

Since this is a user controlled setting, an administrator can view and update these settings for all users with XRMToolbox. Updated 02/03/2021: There is now a new OrgDbOrgSetting called SSSForceFilteringMethodForUserMailboxes, which will override the incoming email filtering method for all user mailboxes. This is available after version The following are available values

-1. Disabled

0. All Email Messages

1. Email Messages in Response to Dynamics 365 Email

2. Email Messages from Leads, Contacts, and Accounts

3. Email Messages from Dynamics 365 Records that are Email Enabled

4. No Email Messages

There are two other OrgDbOrgSettings that allows you to have extra control over the Email Filtering. HideTrackAllOption, which prevents users from selecting All email messages and HideEmailAutoTrackOptions, which prevents users from changing this setting at all.

Automatically create records in Microsoft Dynamics 365

This will automatically create a Contact or Lead in Dynamics 365 using the Sender or Organizer email address of tracked e-mails if the Contact or Lead does not already exist. There is also an OrgDbOrgSetting to control the organization's ability to create contacts automatically. If you set, AutoCreateContactOnPromote to False, it will prevent automatic contact creation regardless if the personal option is marked to do so or not. This setting does not automatically create Contacts for the unknown recipients in the To or CC lines.

Thanks for reading! Part 4 coming soon...


Check out the rest of the series below:

Part 1 | Part 2 | Part 4 | Part 5 | Part 6Part 7Part 8 | Part 9 Part 10


Aaron Richards