Show Form Submission and Event Registration Summaries in Dynamics 365 Marketing

My previous post showed you how to create an easy to read free text summary for each form submission and event registration (including custom registration fields) in Dynamics 365 Marketing aka Customer Insights Journeys. And also a JSON summary that can be used to export form submissions and event registrations. This post shows you how to use the summaries you created, and turn them into timeline posts and easy to access data within the form and registration captures.

Hurrah for child labour flows

You will need to have set up the wonderful summary creating child flow in my previous post ‘Create Form Submission and Event Registration Summaries in Dynamics 365 Marketing‘ for this one. We will need to provide the child flow with two inputs - FormSubmissionGUID & EventRegistrationGUID. We may not always have these two values but we must provide a value back regardless, and the logic of the child flow is replying on you sending either a GUID or ‘N/A’. There will always be at least one of these items, and maybe both sometimes.

The outputs form the flow are a plain text summary and a JSON summary for the provided form submission or event registrations. Why a JSON summary? So that you can use it to export them in a column based format to excel.

Give a summary a home

We need to create some new columns on the Marketing Form Submission and Event Registration tables to store the summaries created. Create the following columns, and if you are feeling super smart maybe add them to the form as well. All columns should be Multiple lines of text with the maximum character count set to the maximum allowable figure of 1048576.

Marketing Form Submission

  • Summary JSON

  • Summary

Event Registration

  • Summary JSON

  • Summary

Marketing Form Summaries

We will start with Marketing Forms. Marketing Forms can be used for landing page lead capture type experiences and also for event registrations. We wi

When a marketing form submission is successful

This flow runs on modified rather than create as the marketing form submission is always created as ‘processing’ then marked as ‘successful’ or ‘finished’ once its complete with all the attached lead/contact matches and field submissions.

Dataverse: When a row is added, modified or deleted - Marketing Forms Submit Success
Change type:
Modified
Table Name:
Marketing form submissions (msdyncrm_marketingformsubmission)
Select columns:
statuscode
Filter rows:
statuscode eq 192350003 or statuscode eq 192350002

Trigger the child flow

Since we are triggering the flow from the marketing form submission record being updated, we are guaranteed a marketing form submission id, however an event registration may or may not be present. coalesce() is a really neat way to achieve ‘If x is blank, use y’. You can also add as many f these as you want, it will just choose the first item it finds with a value.

Flows: Run a child Flow - CHILD | Marketing Form Submission Summary Text and JSON
Child Flow: The flow you created in the previous post
FormSubmissionGUID⁠⁠: triggerOutputs()?['body/msdyncrm_marketingformsubmissionid']
EventRegistrationGUID: coalesce(triggerOutputs()?['body/msdyncrm_registrationid_value'],'N/A')

Is there an associated Event Registration?

When a marketing form is used for event registrations, both a form submission and an event registration row is created. From the event registration there is no way to get back to the form submission, but on the form submission there is a hidden field called ‘registration id value’. there is a whole heap of other stuff hiding in there too but you will need to add them to the form to see them!

Control: Condition - HasEventReg
registration id value from the marketing form submission triggerOutputs()?['body/msdyncrm_registrationid_value']
is not equal to
null

If Yes - Update the event registration with the summaries

Using the outputs from the child flow, populate the event registration Summary and Summary JSON values

Dataverse: Update a row - SetSummaryTextAndJSONOnEventReg
Table Name:
Event Registrations
Row ID:
triggerOutputs()?['body/msdyncrm_registrationid_value']
Summary
: Child flow output ‘SummaryString’
Summary JSON
: Child flow output ‘SummaryJSON’

Update the marketing form submission with the summaries always

Outside of the condition, we will also add a step to add the summaries onto the marketing form submission record, this ensures that either way the summary is available.

Dataverse: Update a row - SetSummaryTextAndJSON
Table Name:
Marketing got submissions
Row ID:
triggerOutputs()?['body/msdyncrm_marketingformsubmissionid']
Summary
: Child flow output ‘SummaryString’
Summary JSON
: Child flow output ‘SummaryJSON’

Which timeline should you post the summary on?

You can vary how this goes depending on the way you work with leads & contacts but in this case I have set it up so that if the marketing form submission has a matched lead and is not an even registration, post on the leads timeline,. Otherwise use the contact. An event registration will always have a contact (for now anyway), it might have a lead but there is no direct link from the event registration or form submission as to which lead. You could search for it but in this case I’m defaulting to contact for events. Leads for landing page forms when a lead is linked.

Control: Condition - HasLeadAndNotEvent
registration id value from the marketing form submission triggerOutputs()?['body/msdyncrm_registrationid_value']
is equal to
null
AND
Matched lead (value) from the marketing form submission outputs('SetSummaryTextAndJSON')?['body/_msdyncrm_matchedleadid_value']
is not equal to
null

If Yes
Data Operation” Compose - LeadLookup
Inputs:
leads/@{triggerOutputs()?['body/_msdyncrm_matchedleadid_value']}

If No
Data Operation” Compose - ContactLookup
Inputs:
contacts/@{triggerOutputs()?['body/_msdyncrm_matchedcontactid_value']}

Create an activity

For the purposes of demonstration I have used the ‘Task’ table here but ideally you would have a custom activity table that can be used to show these kind of things. I like to use an activity rather than a note because you can ‘Mark Complete’ an activity which then locks it down from being edited as a stamp point in time.

Dataverse: App a new row- ShowAsTimelineActivity
Table Name:
Task
Subject:
New @{if(empty(triggerOutputs()?['body/msdyncrm_registrationid_value']),'form submission','event registration')}
Description
: Child flow output ‘SummaryString’
Regarding (Contacts)
: outputs(ContactLookup')
Regarding (Leads)
: outputs('LeadLookup')

Mark the activity complete

You cannot create an activity in the status ‘Complete’ so we will do an update straight after create which does this. Ensure you set the Activity Status and the Status Reason or your flow will cry.

Dataverse: App a new row- MarkActivityComplete
Table Name:
Task
Row ID:
outputs('ShowAsTimelineActivity')?['body/activityid']
Activity Status
: Completed
Status Reason
: Completed

Marketing form submissions - done. Submit a lead generation marketing form:

Register for an event that uses a marketing form:

Marketing Form Summaries flow overview

Event Registration Summaries (that don’t use a marketing form)

So now all we have left to do is to trigger and capture the summaries when an event registration is created, that does not use a marketing form. This is the ‘classic’ event portal registration experience.

When an event registration is created

The event registration has everything we need at the point of creation so we can start directly on create.

Dataverse: When a row is added, modified or deleted - Event Registration Created
Change type:
Added
Table Name:
Event Registrations

Get Event Details

Before creating a summary, we need to check some details on the Event which is linked to the regrsitration.

Dataverse: Get a row by ID - GetEventMktForm
Table Name:
Event
Row ID
: triggerOutputs()?['body/_msevtmgt_eventid_value']
Select columns
: _msdyncrm_marketingformid_value,msevtmgt_name

Does this event use a marketing form for registrations?

If the associated Event row has a Marketing Form attached, then we need to cancel the flow run because our previously created ‘Marketing Form Summary’ flow run will pick this up. We only need to run this flow when the event registration does not have a marketing from submission also. This is not possible to tell at the trigger stage which is why we need to first get the event details. If a marketing form is found, exit stage left!

Control: Condition - Event Has Marketing Form
Marketing Form (Value) outputs('GetEventMktForm')?['body/_msdyncrm_marketingformid_value']
is not equal to
null

If Yes
Control: Terminate
Status: Cancelled

Trigger the child flow - without a form submission id

From here, the flow run will only continue if its a registration created without a form submission. This time, we are guaranteed a event registration id, and definitely not a marketing form submission id.

Flows: Run a child Flow - CHILD | Summary Text and JSON
Child Flow: The flow you created in the previous post
FormSubmissionGUID⁠⁠: N/A
EventRegistrationGUID: triggerOutputs()?['body/msevtmgt_eventregistrationid']

Add the summaries to the event registration

Using the outputs from the child flow, populate the event registration Summary and Summary JSON values

Dataverse: Update a row - SetSummaryTextAndJSON
Table Name:
Event Registrations
Row ID:
triggerOutputs()?['body/_msevtmgt_eventid_value']
Summary
: Child flow output ‘SummaryString’
Summary JSON
: Child flow output ‘SummaryJSON’

Create an activity

This time the activity will always be regarding the contact, but again this bits up to you.

Dataverse: App a new row- ShowAsTimelineActivity
Table Name:
Task
Subject:
New event registration
Description
: Child flow output ‘SummaryString’
Regarding (Contacts)
: contacts/@{triggerOutputs()?['body/_msevtmgt_contactid_value']}

Mark the activity complete

Just the same as last time - this makes the activity read only in the timeline.

Dataverse: App a new row- MarkActivityComplete
Table Name:
Task
Row ID:
outputs('ShowAsTimelineActivity')?['body/activityid']
Activity Status
: Completed
Status Reason
: Completed

That’s it! Register for an event that uses the classic portal form:

Event Registration Summaries (that don’t use a marketing form) flow summary

How terribly helpful!

It’s a pretty cool set of functionality to add that takes Dynamics 365 Marketing Form Submission and Events to the next level. Remember though, this functionality is specific to outbound marketing forms and events only. In the future I will post about an updated version for real-time (Customer Insights Journeys), or maybe you will beat me to it? 😉

What about JaSON?

He’s on don’t worry! The JSON summary is going to come in handy when you start looking at Exporting Marketing Form Submissions and Event Registrations (Blog post pending, but check out the Marketing Form one for some ideas!).

Previous
Previous

Converting Dataverse Choice(s), (Multi-select) Option Sets, or Picklists in Power Automate

Next
Next

Create Form Submission and Event Registration Summaries in Dynamics 365 Marketing