Dynamics 365 App for Outlook Part 4-Working with Emails
Updated 07/06/2021:
Welcome back to part 4 of the Dynamics 365 App for Outlook series. In this post, we are going focus on more specific email tracking scenarios. In the following days, we will break down appointments and contacts.
The first area that needs some attention is automatic email tracking.
In the last post, we went through the email filtering settings in a user's personal options. If a user's personal options (email filtering) are set to track all emails, this will track all email messages regardless, no matter if it is a Dynamics 365 record or not. However, the Sent folder is not tracked by default. 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. This setting works with all automatic email tracking options from within Personal Options. For example, if you want to automatically track emails from Outlook that are being sent to a resolved Contact or Lead, you would need to have the configuration Email Messages from Dynamics 365 Leads, Contacts and Accounts marked in Personal Options along with AutoTrackSentFolderItems to true. This would mean that all outgoing emails from Outlook that resolve to a Lead, Contact or Account for that User would then be auto-tracked. It will also work with Email Messages in response to Dynamics 365 emails. With that setting, it would only work for replies and not the initial email. The initial email would need to be tracked manually via category or App for Outlook. (Updated 7/6/2021)
Unless there is strict Exchange and Outlook governance for what users can and cannot store in Outlook, this setting may not be the best option. It will promote all items to Dynamics, whether they are related to Dynamics or not. In most cases, I see this used only for troubleshooting to ensure emails are promoted into Dynamics and not in live production environments unless emails are governed appropriately. Yes, this means a personal email could be promoted into Dynamics.
In most cases, the setting Email messages in response to 365 email is used. It is also the default setting. However, it is best to evaluate each option to determine what is best for your organization.
Since this is a user controlled setting, an administrator can view and update this using the User Settings Utility within XRMToolbox.
How are emails, replies or forwards, tracked that are part of a conversation, that I may not want tracked in Dynamics 365?
Example A:
-
-
- User A sends an email to multiple recipients, including contacts and other Dynamics users
- User B replies to this thread
- Contact A also replies to this thread
- User B replies to the thread, but removes Contact A as a recipient
- They do not want this reply automatically tracked
-
In this case, it will automatically track because it identifies the ConversationIndex and In-Reply-To values as an email that is part of a thread.
To have this email untracked, the user would have to manually untrack the reply with the App for Outlook as well as any replies to this because the master email is still tracked.
Example B:
-
-
- User A sends an email to multiple recipients, including contacts and other Dynamics users
- User B forwards this thread to another user for internal conversation
- They do not want the information in this forward automatically tracked
-
In this case, it will automatically track because it identifies the ConversationIndex and In-Reply-To values as an email that is part of a thread.
To have this email untracked, the user would have to manually untrack the forward with the App for Outlook as well as any replies to this because the master email is still tracked.
Example C:
-
-
- User A sends an email to multiple recipients, including contacts and other Dynamics users
- User B forwards this thread to another user for internal conversation AND changes the subject
- They do not want this forward or replies automatically tracked
-
In this case, if the reply or forward that is changing the subject comes from the Outlook desktop application, this will not be tracked in Dynamics. This is because the In-Reply-To property is removed, by design, when the subject is changed. However, if this reply or forward comes from OWA, this will be expected to track, as OWA does not use MAPI and will not remove the property.
Updated Setting 4/5/2021: There is now a new OrgDbOrgSetting, DoNotCorrelateForwardedEmailsAsReplies. When set to True, it will enforce that emails correlated using In-Reply-To are actually replies and not forwarded emails
If you untrack a reply or forward to a thread on an email, and if the initial/master email is still tracked, it will continue to track replies. If there are certain replies you do not want to track, you will need to untrack these manually.
A recent change now has the option to select No Email Messages
Depending on requirements, you could set this with the XRM Toolbox and then use the OrgDbOrgSetting to HideEmailAutoTrackOptions, preventing users from changing this.
When resolving recipient email addresses to records in Dynamics, if there is more than one record in Dynamics with the same email address, which record is it resolved to?
It resolves using the method below:
If there are duplicate records within Dynamics 365 with the same email address, the contents of the email From field will resolve first by ownership and then to the first active record in the following order on an incoming email:
-
-
- SystemUser- (Will be first UNLESS the tracking user is ALSO the owner of the duplicated record, such as Contact, Account and others listed below. If the tracking user does NOT own the duplicated record, such as Contact, the sender email will resolve to the SystemUser.)
- Contact
- Account
- Lead
- Equipment
- Team
- Business unit
- Email-enabled entities (for example: Queues, custom, etc.)
-
Email recipients will not resolve to inactive User records in the From field. There is a setting that can be changed to resolve to other inactive entity records but this does NOT include inactive Users: ResolveForInactiveEntities. Regardless of this setting, we will not resolve to inactive Users. This is set to False by default.
Let's look at a few examples of sender resolution:
Example 1:
- 2 Contacts exist with same the same email address
- The tracking user has access to both, but does not own either
The sender will resolve to the first created Contact. This will be the same result if the tracking user owns both Contacts
Example 2:
- 2 Contacts exist with the same email address
- The tracking user has access to both Contacts but owns the last created Contact
The sender will resolve to the Contact owned by the tracking user, even though it was the last created
Example 3:
- 2 Contacts and 1 Account exist with the same email address
- The tracking user owns both Contacts and the Account
- The Account was created before the Contacts
The sender will resolve to the first created Contact
Example 4:
- 2 contacts and 1 Account exist with the same email address
- The tracking user does not own either Contact, but does own the Account
The sender will resolve to the Account
Here are some additional points on how it resolves recipient records in the To or CC field of an incoming email:
If there is an inactive user in the recipients line, the App for Outlook may show that the user matches the email, but when you track, the promotion will not resolve to that email for the inactive user and it will show up in red as unresolved. It will not resolve to inactive users regardless of the ResolveForInactiveEntities setting.
If the email address is tied to an active user, it will display that in the App recipients pane, but it will still resolve to each active Dynamics record with that email address once it is promoted. If the ResolveForInactiveEntities setting is True, it will also resolve to inactive entity records except Users.
The App for Outlook will only show one of these records in the recipients pane, but in Dynamics, it will resolve to all records with that email address on incoming emails as long as Set To,cc,bcc fields to unresolved values if multiple matches are found is set to No in System Settings
Here are some additional points on how the To or CC field resolves on a tracked sent item:
If the user is active and there is a contact, it will resolve to both records, although it will show resolved to the user in the App for Outlook. It will resolve to all active records that match that email address or also inactive records if you have enabled ResolveForInactiveEntities. Again, this does not include users. You can see below it resolves to an Account, User, Contact and Lead.
If the User is Inactive, it may appear that the record is found/resolved in the App, however, when the item promotes into Dynamics, it will show up as unresolved.
One important thing to mention here is that this does NOT resolve to records only in the default email address fields. If you have a custom Single Line of Text field with Email format on a Contact record, you may see some interesting results.
For example:
-
-
- Bob Jones is a user inside Dynamics, and on the User form, the email data field of “Primary Email” has the value Bob@test.com
- There is an Opportunity record named “BobOpp” with the email data field of “Email” set to Bob@test.com
- There is a Case record named “BobCase” with the email data field of “Email” set to Bob@test.com
- There is a Contact record named “Leslie Baker” set to primary email of Baker@test.com with the email data field of “Contact Approver” set to Bob@test.com
- There is another Contact record named “Greg Marcus” set to primary email of Marcus@test.com with the email data field of “Contact Approver” set to Bob@test.com
- There is another Contact record named “Happy Hogan” set to primary email of Hogan@test.com with the email data field of “Contact Approver” set to Bob@test.com
- The System Setting of “Set To,cc,bcc fields as unresolved values if multiple matches are found in Incoming Emails” is set to No
- There is an email in Bob’s mailbox where Bob@test.com is on the To: and CC: line
-
If this email is promoted into Dynamics due to Bob tracking the email through Dynamics App for Outlook (as an example), the promoted email in Dynamics will show the following values:
To: Bob Jones; BobOpp; BobCase; Leslie Baker; Greg Marcus; Happy Hogan
CC: Bob Jones; BobOpp; BobCase; Leslie Baker; Greg Marcus; Happy Hogan
In the screenshots below you can see this example with only the contact records. (disregard my name in the To line. I sent to myself to track the item to demonstrate correlation)
If a Contact has multiple email address fields populated, which email will receive the email when sent directly from Dynamics?
By default, Contact has three email address fields available. emailaddress1, emailaddress2, and emailaddress3. When you are creating an email directly in Dynamics and you select a Contact name in the TO line, it will only use the emailaddress1 field. If this field is empty, the email will fail to send.
Can I remove the option for users to Track without Regarding, so they are forced to Set Regarding to a record in Dynamics?
Yes, you can now change the OrgDbOrgSetting (OverrideTrackInCrmBehaviour) to allow this functionality. This will simply remove the ellipses from the Not Tracked bar, forcing users to Set Regarding.
What happens if I receive a reply to a previously tracked email and choose to reply back before it is tracked.
(This is not immediate tracking, so it waits for the async service to pick it up for tracking)
Replying to emails before it is tracked will still track during the next sync cycle. If you have been using the legacy Outlook client for years, this scenario was different, where a response to a previous reply that is not yet tracked would not be tracked. So that is no longer an issue if you had encountered this in the past. It will still track.
However, this can still be confusing for users where they may think that since they are responding to a reply that does not show up yet as tracked, that their reply will not be tracked either. Here is a break out:
-
-
- User A sends Tracked email to User B.
- User B received email, but it does not show as tracked yet in their inbox (due to asynchronous processing).
- User B replies (they could also forward) the message with sensitive information that should not reside in Dynamics 365. Now that message will end up in Dynamics 365 with the sensitive information.
-
Synchronous tracking would help this situation, but at the time of this post, that is not how emails are promoted/tracked into Dynamics. Something to be aware of.
How can I tell from Outlook if an email or appointment is tracked in Dynamics
If you are familiar with the legacy Outlook client, there was an icon that appeared on tracked items, making it easy to determine if the record was tracked. Unfortunately, with the App for Outlook, there is no icon to show if it is tracked.
What you can do for emails, is pin the App. This will stay pinned as you navigate through emails. However, this does not work for appointments. You must also be Outlook 2016 version 7668.2000 or higher to see this, which means this is not supported on MSI versions of Outlook.
The other option is to use Category Tracking. I will not be going into this during this blog series. We may be looking at this in a future post. However, be sure you test this feature thoroughly to ensure it works for your needs.
When I open the App for Outlook, I see the message, "Create contacts first to avoid duplicates." Can I disable this?
No. This is not configurable and will appear when the sender of the email is unknown (does not resolve to a Dynamics record)
What happens if I move an email that is tracked in Dynamics 365 to a different folder within Outlook?
This item will remain tracked, as long as the folder is in the same default store, including other folders at the root (same level as Inbox) and nested subfolders. If you are using Cached Exchange Mode in Outlook, the item may temporarily shows as not tracked immediately after you move this to another folder, but will show again as tracked as soon as Exchange has completed the move of this item. You should not see this in OWA or Online mode for Outlook.
Which emails are tracked immediately vs. asynchronously?
At the time of this post, this is the most recent functionality
Use Case | Initial Promotion Method | Fallback Promotion Method |
Email without attachments in read mode for the first time | Immediate | Async |
Recipient tracks a previously untracked email (1) | Async | Async |
Track an email in compose mode | Async | Async |
Track an email with attachments | Immediate | Async |
Untrack an email | Immediate | Async |
Attempting to track an email that has been already promoted or tracked from another mailbox in Dynamics (User or Queue) | -- | Async |
- An untracked email is an email that was already tracked into Dynamics and was manually untracked. If you decide to track this again, the process is asynchronous
As a reminder, the asynchronous processing can take up to 15 minutes. The processing time of the mailbox items is dependent on the amount of items it has to process, the configuration settings for which items to process, size of attachments, and health of the mailbox.
Why do I see some emails promoted to Dynamics with CreatedBy as the User who tracked it but others show CreatedBy as System?
When an email is tracked asynchronously, such as in the scenario of tracking while the email is in compose mode (not yet sent), it is processed by the async service. In that case, the email is promoted in the System context. This is also the case for emails that are automatically tracked with correlation or tracking tokens. For example, User A sends an email from Outlook and then tracks it. This will show in Dynamics with CreatedBy as User A. Then, Contact B replies to this email and through email correlation, it is automatically promoted to Dynamics. This will show as CreatedBy System.
When you untrack an email in Outlook, you will receive the option to also delete this in Dynamics 365, as seen below:
What happens when an external contact sends an email to more than one Dynamics user and this record is tracked?
Consider this scenario
1. External Contact sends an email to User A and User B
2. User A sets regarding to Account A
3. The Email is created in Dynamics with Regarding of Account A
4. User B goes to this Email from their Outlook calendar. They will not see that this record is tracked. They will have the option to Track or Set Regarding to a different record.
5. If User B sets regarding to Account B, the email in Dynamics will be updated with a regarding of Account B. However, since there is no two-way sync of the regarding on emails, User A will still see this as Regarding Account A from their Outlook calendar.
There is a Product Suggestion located here to enhance the user experience in this scenario. Please take a minute to vote.
Until this changes, it may be a good idea to use Power Automate to notify the Owner or CreatedBy User if the Regarding does change on an email so they are aware.
How are tracked Email deletions handled?
Email deletions in Dynamics 365
-
-
- Deleting an email message in Microsoft Dynamics 365 does not delete the tracked message from Outlook/Exchange.
-
Email deletions in Outlook
-
-
- Deleting a tracked email message in Outlook does not delete the email message from Microsoft Dynamics 365.
- If you stop tracking an email message in Outlook, the App for Outlook asks whether you want to delete the email message in Microsoft Dynamics 365.
-
Check out the rest of the series below:
Part 1 | Part 2 | Part 3 | Part 5 | Part 6 | Part 7 | Part 8 | Part 9 | Part 10
Thank you!
Aaron Richards
This was originally posted here.
Comments
-
Dynamics 365 App for Outlook Part 4-Working with EmailsHi, is there anyway not to track email that has CRM tracking token and is forwarded from contacts using outlook to to a different user in CRM, may be the contact wants to escalate on the CRM users response to them.
*This post is locked for comments