Email Tracking in Power Apps

Email Tracking in Power Apps

Following my previous two blogs about Dataverse Activity tables and Server-Side Synchronisation, today I’ll be looking into Email Tracking, a feature within Power Platform / Dynamics 365 that allows you to track emails sent from an activity table, and retrieve responses from your mailbox to the contacts timeline.

Be sure to check out my two previous posts, Dataverse Activity Tables, and Dataverse Activity Tables Exchange Integration if you want further context.


Email Tracking

The email tracking feature, as mentioned above, allows users to track mail communication between contacts and accounts within Power Platform and Dynamics 365-enabled products. In order to use email tracking, you do need to ensure that a user’s mailbox is enabled within the environment. I also want to reiterate that Power Platform / Dynamics 365 currently only allows users to have one enabled and approved mailbox across all your environments. This is slightly annoying, considering you’d probably want to apply some development regression testing and user acceptance testing at some point.

The email tracking feature can be found within your environment settings in the Power Platform Admin Centre. Select Emails, and then Email Tracking. You should land on a page as per the below. You’ll notice that email tracking has a variety of settings to configure, all with various purposes.

Tracking Email Conversations

This settings within this section allows you to configure how you would like to track email exchanges and conversations between your contacts.

Use Correlation

The use correlation feature is usually on by default. This setting uses specific email header properties to match emails conversations between your emails and a contacts response. If you open an email header, you will find a Message-Id. This is used to track the In-Reply-To Id to match the conversation when a recipient response to your email.

//Sent email header
Message-ID: <F844422CE5E14775A9C2DDD64895DC2C1DB7D4FC4F6@NATI.TEST.COM>

//Response email header
References: <F844422CE5E14775A9C2DDD64895DC2C1DB7D4FC4F6@NATI.TEST.COM>
In-Reply-To: <F844422CE5E14775A9C2DDD64895DC2C1DB7D4FCDF6@NATI.TEST.COM>

Now that Power Platform / Dynamics 365 can map the conversation trail between you and a contact, the email tracking feature can reference a Correlated Activity ID to see if the thread is associated with an existing activity or not. If the correlated activity IDs do not match, a new activity for that email is created for the contact.

//Sent email header
X-MS-Office365-Filtering-Correlation-Id: 81c49fc4-9cfa-445c-c1f8-08dd4b66ed75
X-MS-Exchange-Organization-Network-Message-Id: 81c49fc4-9cfa-445c-c1f8-08dd4b66ed75

//Response email header
X-MS-Office365-Filtering-Correlation-Id: c0f6906e-45a0-4333-6774-08dd4b673cf1
X-MS-Exchange-CrossTenant-Network-Message-Id: c0f6906e-45a0-4333-6774-08dd4b673cf1

Finally, Power Platform / Dynamics 365 use the Thread-Index (ConversationIndex) in the email header to recognise an ongoing conversation thread. Throughout an email conversation, the thread-index becomes longer, containing all the previous email thread-indexes allowing Power Platform / Dynamics 365 to correctly associate the activity with the correct activity hierarchy.

//Sent email header
Thread-Index: AQHEZgaeKETqrWbDZi155lPbff/E3w==

//Response email header
Thread-Index: AQHEZgaeKETqrWbDZi155lPbff/E37Nx1AtI

Below are some samples of emails tracked using standard correlation:

Use Tracking Tokens

Tracking tokens probably sound cooler than what they actually are. Similar to correlated tracking, this also uses the Message-ID, Thread-Index and In-Reply-To to ensure that responses are correctly associated with activities. Tokens, however, are an additional layer applied and are appended to the subject of your email being sent. This allows Power Platform / Dynamics 365 to clearly identify conversations simply through the email subject.

Let’s break down the meaning of a token:

PartDescription
PrefixThis can be configured up to 20 characters, providing unique configuration for environments/tenants. If you have a ticketing system instead of a CRM, you can prefix it to tck.
Base Tracking NumberThe base tracking number works in line with the number of digits for personal numbers and acts as a decimal placer for the personal numbers. Based on the value of your configured personal number, the base tracking number can prefix it to be 001 to 501. You can configure the base tracking number to be extremely large as well.
Number of digits for personal numbersThis is a range from 1 to 10. When users create activities within Power Platform / Dynamics 365, this value determines how many digits should be used for the user number (the unique number belonging to the user creating the email activity).
Number of digits for email activity counterThe activity counter is as it sounds. It’s the range, between 1 to 9 digits, defining how large the counter can go. If it is set to 3, the counter will max out at 999 collated activities.

Below are some samples of emails tracked using tacking tokens:

Use Smart Matching

Smart Matching is a server-side correlated method that Power Platform / Dynamics 365 uses to associate emails to activities and contacts without relying on correlated data in headers and tracking tokens. It primarily used the subject, sender address and recipient’s address to link the emails with activities.

Unlike tokens and correlated headers, smart matching solely relies on similarities between emails. As mentioned, this includes the subject, sender address, recipient address, and even spans into CC addresses and BCC addresses.

Because emails create subject hashes across forwards and replies, you can configure Hash filter keywords so certain words can be ignored. The default regex value for this is ^[s]([w]+s?:[s])+. This will ultimately allow Power Platform / Dynamics 365 to ignore subjects such as:

SubjectIgnored WordsFiltered Subject
Re: Test EmailRe:Test Email
FW: Meeting UpdateFW:Meeting Update

Within smart matching, you can configure how many subject keywords are hashed. Allowing too many words can result in longer processing times to analyse and match your emails.

You can also define how many matching emails are needed for a correlation. This can ensure that only emails with the appropriate number of people included are added to specific activities.

Folder Level Tracking

Folder Tracking is another email tracking feature that allows the configured exchange profile to map specified folders to activities within Power Platform / Dynamics 365. A great use case for this is when you have specific folders per customer. Folder level tracking can track emails in this folder and associate them with the related customer records as an activity. Ensure you have an exchange rule that moves emails to a specified folder, then configure your email settings to monitor these folders.

If the folder level tracking feature is enabled, users can configure what folders they want to map themselves. Within your Power Platform MDA app or Dynamics 365 CE app, click on the Settings icon in the top right corner and select ‘Personalisation Settings’. This opens a configuration window for the user.

Under the Email tab, users can configure what type of emails you want to track. For example, you can track emails only sent from your Email activity, or you can track emails from Contacts, Leads and Accounts as well. But focusing on folder level tracking, a user can set up their folder mapping by selecting ‘Configure folder tracking rules‘. When creating a new rule, a list of folders will appear in the dropdown, and you can match the rule against a contact, account or lead.

Tracking Between People

Although I’ve been talking about tracking emails from senders and recipients, referring to contacts and accounts, the tracking between people feature focuses on tracking emails between internal users. When this feature is enabled, Power Platform / Dynamics 365 creates two separate email activities. It creates one for the sender and one for the recipient. This ensures that internal communication regarding contacts or accounts reflects on both individuals timelines, ensuring full visibility of the ongoing conversation and communication.

Server-Side Synchronisation Monitor

Lastly, there is a more Dynamics 365 focused monitoring dashboard you can access through the classic interface under the ‘Email Configuration’ settings page. There are a variety of nifty dashboards that allow you to monitor various aspects of your configured server-side synchronisation, as well as email traces and active mailboxes. The dashboard also provides a short summary of how many mailboxes are active within the environment and if there are potential warnings. It’s definitely a great tool to use if you want to keep an eye on your mailboxes in an environment.

Show 2 Comments

2 Comments

  1. Youcef Doumandji

    Hi Nati,
    Thank you for this great article.
    I have in my tenant a slight problem and was wondering if you encountered this issue or not.
    As a system admin I can track email from new senders but one of my users can use the Dynamics 365 app for Outlook but cannot track. He only sees the dashboards entry.
    Any clue ?
    Bets regards.
    Youcef

    • Hi Youcef,
      I’ve never heard of this. Maybe have a look at the security roles for that user, or try redeploy the app to them. I know MS have had problems with the Anchor Solution, so it may be worthwhile raising a ticket.

      Sorry I could not be more help.

Leave a Reply

Your email address will not be published. Required fields are marked *