Custom Fields in Dynamics Customer Insights Journeys Real-time

Custom Fields in Dynamics Customer Insights Journeys Real-time

A widely used feature in Dynamics Customer Insights Journeys (formerly known as Dynamics 365 Marketing) and event management is the use of custom fields. These fields are essential for gathering event-specific information that is not relevant at the contact level or should not be retained due to GDPR regulations.

As of January 2025, this feature has not yet been integrated into real-time marketing. Many users are delaying their transition to real-time marketing due to this missing functionality. However, a workaround is available that involves minor CSS changes and a background flow to make the data easily accessible for end-users.

Step 1: Create the Field in CSS

To create a new field on your form, use the following HTML code:

<div class="textFormFieldBlock" data-editorblocktype="TextFormField" data-prefill="false">
    <label title="Field Title" for="inputdatafield"><span style="color:#481125;">Title on form</span></label>
    <input id="inputdatafield" type="text" name="inputdatafield" placeholder="Placeholder Text" title="Field Title" maxlength="150" value="">
</div>

Replace the placeholders with your specific details:

  • inputdatafield
  • Placeholder Text
  • Title on form
  • Field Title

This code will create a new field on your form with the specified details:

Step 2: Identify and Process Form Submissions

When the form is submitted, the data is saved in CRM. However, this data is not easily usable by CRM users, especially when a single form is used for multiple events. To address this, we need to update the event with the submitted data.

To mimmic the original structure and make the change as small as possible from outbound to real time, we must first create the Custom registration field.

This can be done several ways but one easy way is to open the related  tab from your event and select «Event Custom Registration Fields and click new. This should give you the following quick create.

The next stage requires the Custom Registration Field. Click the search icon and select «New.» For this example, we will use the «Text» value for the flow. This Custom Registration Field corresponds to the field created in CSS: inputdatafield.

Step 3: Fetch the form submission and paste it to the old custom registration field structure.

Overview of the flow:

Use a flow that triggers on adding or modifying form submissions where the state code is either Success (575440002) or Finished (575440003).

Create a variable for the input field and search the field submissions for the form submission.

Use the following filter rows to get the field submission :_msdynmkt_marketingformsubmissionid_value eq @{triggerOutputs()?['body/msdynmkt_marketingformsubmissionid']} and msdynmkt_name eq '@{variables('fieldname')}'

Include an if condition to check if the field submission contains the value from the variable using the length formula:length(outputs('Show_field_submissions')?['body/value'])

    If the length returns 1, it means a field submission was found, and you can proceed to create a new event submission.

    Gather Mandatory GUIDs:

    Retrieve the event registration from the trigger output to establish the relation back to the event.

    Get the custom registration field created in step 2 to obtain the ID for the next stage.

    Use these details to create records in Registration Responses.

      For your convenience, here are the expressions used:

      • /msevtmgt_customregistrationfields(@{first(outputs('Get_custom_registration_field')?['body/value'])?['msevtmgt_customregistrationfieldid']})
      • /msevtmgt_events(@{outputs('Get_event_registration')?['body/_msevtmgt_eventid_value']})
      • /msevtmgt_eventregistrations(@{outputs('Get_event_registration')?['body/msevtmgt_eventregistrationid']})
      • first(outputs('Show_field_submissions')?['body/value'])?['msdynmkt_fieldvalue']

      Legg igjen en kommentar

      Din e-postadresse vil ikke bli publisert. Obligatoriske felt er merket med *