Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Suggested answer

How can I add the originating URL for an embedded D365 form to the email that will get sent internally so that they can know which web page the form submission came from?

(0) ShareShare
ReportReport
Posted on by 15

We want to use one form on multiple pages of our site, but still be able to tell which web page a particular submission came from. I know that I can view this information in the Insights > Submissions area of the CRM for the particular form, but I would like to include this information in the email that will get sent to the internal recipient of the submission emails. Any help would be greatly appreciated.

  • Suggested answer
    cloflyMao Profile Picture
    cloflyMao 25,202 on at
    RE: How can I add the originating URL for an embedded D365 form to the email that will get sent internally so that they can know which web page the form submission came from?

    Hi Michael,

    If you want to send an email with originating page URL to recipient after he/she has been added into Dynamics as contact, then you could refer to following solution:

    Due to Insights data is separate and not available to be used in Dynamics, therefore, we can store form submissions manually by enabling "Store form submission" option of marketing form,

    it will store all submitted data in an entity called "Marketing Form Submission", include matching contact, matching result(create/update), associated marketing form and originating URL of page. 

    1. Go to Marketing form > Summary > Submission behavior, enable the "Store form submission" option.

    2. Sync Marketing Form Submission entity with marketing-insights service by following the guidance:

    https://docs.microsoft.com/en-us/dynamics365/marketing/mkt-settings-sync

    3. Insert a code element to your marketing email, add following expression to content of the code.

    pastedimage1607418667934v1.png

    Please check the originating URL
    {{#each contact.msdyncrm_marketingformsubmission_contact_msdyncrm_matchedcontactid}}
      {{#if (eq this.msdyncrm_marketingformid contact.msdyncrm_marketingformid)}}
           {{# if (eq this.msdyncrm_contactmatchingresult 'Created')}}
             
    {{this.msdyncrm_pageurl}} {{/if}} {{/if}} {{/each}}

    Test 

    r1.JPG

    r2.JPG

    How does the code work:

    1. Step through all marketing form submission records that are related to the contact with for-each loop.

    https://docs.microsoft.com/en-us/dynamics365/marketing/dynamic-email-content#for-each-loops

    2. Check whether associated marketing form of the submission record equals to source marketing form value of the contact.

    3. Moreover, check whether it is the first time submission.(create type)

    4. Display originating URL of the submission.

    (Only host name(company.com) will be logged.)

    Regards,

    Clofly

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,965 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,817 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans