Hello everyone,
In my Dynamics 365 for Marketing contacts, I have contacts who have email addresses in the fields emailaddress1, emailaddress2 and emailaddress3. I have created a marketing email that I want to send to contacts in a segment comprising contacts with emails in any of these fields.
Is there a way for me to write a dynamic expression in the "To address" in the marketing email such that for each contact, the system checks for a valid email address in emailaddress1 field, then emailaddress2, then emailaddress3 fields? The first field where valid data is found should be selected and the marketing email should be sent to that address.
Best regards
Why field {{contact.emailaddress1}} cannot be updated?
"To address: This should almost always be set to {{ contact.emailaddress1 }}, which sends the message to each contact included in the customer journey that sends the email. You might change this to use a different email address field (such as emailaddress2), or enter a dynamic expression that chooses the best of several available email fields."
Hi Fola,
Yes, it will permanently copy the email address in emailaddress2 or emailaddress3 to the emailaddress1 field with my solution.
Then how about copy the valid email address to emailaddress2 or 3 or a custom email field, which can be set as invisible to others?
It can be achieved in a similar way.
You just need to adjust the conditions and steps in the workflow and set the dynamic expression as something like {{ contact.emailaddress2 }} , {{ contact.emailaddress3 }} or {{ contact.the name of the custom field }}.
Thank you for your response Nya.
A bit more context to help. The reason some contacts have email addresses in emailaddress2 and emailaddress3 fields is because some teams do not want the email addresses of their contacts visible to everyone else using the CRM. The configured views and forms for contacts only show emailaddress1. However, when segments are created for marketing emails, some of these contacts without email addresses in emailaddress1 field are included in these segments and the goal is to have the marketing email delivered to them as well.
So, I am looking for a temporary solution that ensures the marketing email targets not only the emailaddress1 field, but also emailaddress2 and emailaddress3. I do not want to permanently write values to the emailaddress1 field if no email address was written in there initially.
Am I right in understanding that the approach of creating an on-demand workflow will permanently copy the email address in emailaddress2 or emailaddress3 to the emailaddress1 field?
Regards,
Fola
Hi,
Assuming that some of the Email Address fields are empty, we can use the following workflow to handle these fields.
The workflow allows to ensure that the emailaddress1 always has a value if one of the addresses contains data.
Thank you for your response Nya.
Pardon my use of the term "valid" in the initial question. It is not relevant for this issue since all email addresses in these fields are valid as you rightly stated. The main challenge is about how to get the email sent to the email addresses in emailaddress2 and emailaddress3 since the system sends emails to emailaddress1 by default.
Hi,
Would you please explain your definition of Valid?
Due to the type of the email field, if the input value is an invalid email, it cannot be saved.
If there are other rules for the format, the request cannot be achieved by dynamic expression.
It is recommended to create an on-demand workflow targeting at Contact entity, which checks the email addresses one by one and sets the value to emailaddress1 if you find a valid one.
Then insert the workflow into the customer journey to process the contacts who are going to be sent the email. So that you don’t need to modify the dynamic expression of the Marketing Email's "To address" field.
André Arnaud de Cal...
291,965
Super User 2025 Season 1
Martin Dráb
230,836
Most Valuable Professional
nmaenpaa
101,156