Generate a Link to Lead or Contact Record in Microsoft Dynamics CRM in an Alert Email

Anonymous
Not applicable

Inquiring minds who read my last post on generating a custom field that stores the CRM GUID might be wondering why anyone would do that. Is it even useful? Well, I am about to show you one reason why you'd do that.

By default, alert emails sent out of Marketo using the {{SP_Alert_Info_Token}} do not include a link to the CRM record if you are using Microsoft Dynamics.

However, you can manually generate a link to the CRM lead record that will resolve correctly. Here’s how:

First, you need to find the URL to a lead record. The approach for doing this varies based on the version of CRM you're on.

Here's the method for on premise:

Go into CRM and copy the URL of a lead record, e.g. https://xrm.democompany.com/main.aspx?etc=4&id=%7b7EC64103-5EC6-E311-82EF-00155D05A92B%7d&pagetype=e... The highlighted part in yellow is the GUID, which is the identification number of the record in CRM.

Here's the method for online:

Open the lead record. Click on the …

Click on Email a Link:

This will generate an email with the link:

This part highlighted in yellow is the GUID:

<https://marketoconsulting.crm.dynamics.com/main.aspx?etc=4&extraqs=formid%3de3b6ddb7-8df0-4410-ac7b-...>

Second, you need to have a custom field in Marketo that stores the GUID, which varies by whether it's a lead or a contact. See my blog post here on how to do this.

Third, create an alert email. Add in the text you want to display and hyperlink it to a modified version of your CRM link in which you replace the GUID highlighted above with the token to your Marketo custom field. In this example, the token is {{lead.mkto_GUID}}:

<a href="https://marketoconsulting.crm.dynamics.com/main.aspx?etc=4&extraqs=formid%3de3b6ddb7-8df0-4410-ac7b-...{{lead.mkto_GUID}}%7d&amp;pagetype=entityrecord">Link to CRM Lead Record</a>

Then, send yourself a sample and you will see that clicking on this link opens up the lead record directly in CRM. Now you can use this in your alert emails.

Important Note: The URL is not exactly the same for leads as for contacts. If some of your records that you're sending alerts on are leads and some are contacts, you will need to change the green highlighted part based on the Microsoft Type. If so, you may need to vary the alert emails based on the CRM type.

In this example, etc=4 is for a lead and etc=2 is for a contact. Please confirm that this is the same with your CRM URLs, as this may vary with different Dynamics versions.

https://xrm.democompany.com/main.aspx?etc=4&id=%7b7FC64743-5FC6-E311-82CF-00115A02A92B%7d&pagetype=e...

3067
1
1 Comment