D365 Marketing Weekly
Have you seen the D365 Marketing Weekly newsletter yet?
A weekly issue covering features, functionality and news on the topic of Marketing, specifically covering Dynamics 365 Marketing and other interesting tools and tips for anyone interested in the subject.
Subscribe Here
*** NOTE: ALL INFORMATION IS ACCURATE AT DATE OF PUBLISHING ***

I’ve previously written about how you can send emails from the owner of a record which can be useful to send out communications using Customer Insights – Journeys from an Account Manager or Support Rep. What about building nice dynamic email signatures for the bottom of those emails, including the profile image of that person? With one quick new field on the user record, and setting some dynamic content on the email we can definitely achieve this. Let’s take a look.

First, this is what I am trying to achieve. A nice little signature block for the bottom of an email that I want to send out when a case is closed (using a trigger). We can see the photo, full name, title, clickable link for phone, and clickable link for email. Although in my example I am using a trigger that will fire when a case is closed, you can apply the same approach for the Owner of the Lead/Contact or related Account or some other trigger where you are able to get back through to the User table.

Click to view in detail

All of the contact information about the User are easy to get, but we need somewhere to pull the image from and that image needs to be accessible to the outside world. So trying to use the Entity Image from the User isn’t going to work, nor are you going to be able to use images from your internal locked down SharePoint site. The easiest thing to do is use an image from the asset library in the marketing app. Get your administrator (ask nicely 😜) to add a new field to the User table. It needs to be a lookup to the File table, but make sure it’s the msdyncrm_file table selected rather than the other one. Call it something logical and save the new field.

Click to view in detail

Now add the field to whatever User form is typically used when reviewing a User record. You will then add a Component to the field. Likely you won’t see the specific image select option we need, so click on Get more components.

Click to view in detail

Then select the ImageSelectButtonControl and add it to the field. There are no specific settings required, just add it to your new user image look up field.

Click to view in detail

Note that there is already a standard out of the box field called Photo URL that if your images are stored on your website for example, you could add a direct link in to that field (you would need to add to the form as it’s not there by default. For the User Image field you added, assuming you added the control, it should look like this. Click on the magnifying glass icon.

Click to view in detail

This will open a familiar control which you see within the marketing app. You’ll have access to all of the images already there, or can add a new file. Select the right one for this user.

Click to view in detail

Here you can see the two options, the top one is the lookup to the file table where it will have an image from the marketing asset library, the other is a URL direct to an image on my website. Decide which option is right for you, no need for both the fields.

Click to view in detail

Now we will move on to creating an email. I’ve added a section with two columns, added an image on the left and my values on the right. I find that it’s fastest to just start typing out my personalised tags by using double curly brackets then add something logical like you see below.

Click to view in detail

For the image, notice above it says Dynamic image. I’ve set this by stating I want to insert the image from a URL, then used curly brackets to define Owner Photo.

Click to view in detail

Now let’s determine where all of the dynamic text is coming from. If you click on the little Personalise icon on the far right of your email, notice they are all showing a red icon meaning the email has no idea where to find that information. We can click on each one to then set the mapping to pull the value dynamically from a field.

Click to view in detail

Regardless of if you want to pull from a trigger or the Owner of the Lead/Contact or related Account, likely you will need to go through and find the path to the Owning User. Below I have a trigger called Case Owner Test, and from there, I find the Case table, then the User table via the Owning User field on the Case. I can then search through all of the fields on the User record and find Full Name below. Clicking on that will set the right value.

Click to view in detail

For the OwnerPhoto, I can go through from the Case to the Owning User record, then find the Photo URL if I opt to use the out of the box field that exists and I am adding URL’s to the photos on a website somewhere.

Click to view in detail

If you have added a new lookup File field on the User table, then you will map through from the Owning User, then look for whatever you named that field, then click on that and you will have access to all of the fields on that file in the asset library. You will need to pick the BLOB CDN URL field which is the full URL to the asset.

Click to view in detail

There may be occasions when a User hasn’t had a profile photo added to their record yet. To make sure you don’t send an email with a broken image, you can use the Default value to add a link to a specific image in your asset library, or somewhere on your website. Consider if any of your other dynamic values might need a default. Do all users have a phone number or title set up? That’s your call!

Click to view in detail

If I now preview the email, I can click the Preview tab at the top, and then set the Case, or Contact or Account I want to use as an example to see what the signature will look like. OK, it’s working, but we can make it look a bit better.

Click to view in detail

I can select the value where I am displaying the email address and then click the link button from the editor tool, then in the URL set it as mailto: and then use the same name that you used when you added the Owner Email initially.

Click to view in detail

You can also do the same for the phone number as a link, and use tel: then whatever you used for the phone number personalisation tag.

Click to view in detail

I’ve also set the image to have rounded corners at 100px, added a right side border to the column with the image in it, and a bit of padding to the image to make it look centred. I’ve adjusted the font used on the full name and set my links to be grey and underlined. Pretty happy with that!

Click to view in detail

If someone doesn’t have an image or are missing other values, their signature will display those along with the default image I set using the full URL to an image in the asset library. Hooray!

Click to view in detail

D365 Marketing Weekly
Have you seen the D365 Marketing Weekly newsletter yet?
A weekly issue covering features, functionality and news on the topic of Marketing, specifically covering Dynamics 365 Marketing and other interesting tools and tips for anyone interested in the subject.
Subscribe Here
This is just 1 of 488 articles. You can browse through all of them by going to the main blog page, or navigate through different categories to find more content you are interested in. You can also subscribe and get new blog posts emailed to you directly.




Leave a Reply

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