Map form data to entities with custom Workflows
If you have configured a marketing form to collect form submissions without updating contacts or leads, you can create a Workflow to map the form submission data to any entity.
- Learn more about collecting form data without updating contacts or leads: Create, view, and manage marketing forms
- Learn more about building workflows: Use Workflow processes to automate processes that don't require user interaction
You can build more advanced data flows triggered by form submissions using Power Automate. Learn more: Overview of how to integrate Power Automate flows with Dataverse.
Creating a Workflow
Create a Workflow to extract the values from a form submission. You can use this data to create a custom entity or to create or update any existing entity.
To create a Workflow:
In the navigation bar, go to Settings > Process Center > Processes.
Create new blank process, set the Category to Workflow, and add the entity that triggers your workflow. In this case, we'll add the Marketing form submission.
Next, you will start adding steps to your Workflow. You will find flexible options to handle entities under Add Step > Dynamics 365 Marketing.
For example, you can start with Extract a submitted value by field to find a value inside a submission that you would like to store. Add a Match entity step to match the marketing form submission to the entity that you want to update. Add a Json set property step to be used in the other steps’ JSON properties.
Example Workflow: Collecting credit card applications
In this example, we'll create a Workflow to update a custom entity called “Credit card applications.” The Workflow will allow a user to collect credit card applications through a Marketing form and store the data under the new custom entity.
The credit card application Workflow requires the following general processes:
- Check if the submission is coming from a form the workflow can handle. The simplest method to do this is selecting submissions from a specific form.
- Extract the submitted values so that they available in the Workflow (extract value).
- Combine multiple values into a single structure that is suitable for entity matching or creation (set JSON property).
- Create an entity with properties that were set in the previous step. Alternatively, the Workflow can search for a matching entity and either update the found entity or create a new one if not found (create entity, update entity, and match entity actions).
The following steps detail the actions required to create the credit card application Workflow:
To create a custom entity, in the navigation bar, go to Settings > Customize the System > Entities.
Create a marketing form for the credit card applications containing the fields you want to use. Create fields under the new custom entity to use inside the form. Make sure the form is set to not update contacts or leads.
Next, you will create a Workflow to process the custom entities. Go to Settings > Processes and create a new Workflow process. In the Entity field, select the entity that triggers your Workflow. In this case, we'll select Marketing form submission. Then select OK.
To add a step, select Add Step, then go to Dynamics 365 Marketing > Extract submitted value by field. This will allow you to extract a value from a form submission.
Add a name for the step. We will name our step "Extract value from form submission (E-mail)."
Select the Set Properties button.
Next, we'll extract the email address from a submitted form. To extract the email address, go to the Operator pane and select Marketing form submission in the Look for: drop down menu. Then, select the Add button in the Operator pane. To add the dynamic value to the form submission property, select the OK button.
To select the desired field to extract from the lookup, select E-mail under the Value column for the Marketing form field property.
Next, to match the result of the extracted e-mail value to the logical name of the e-mail entity in the CRM database, go to Add Step > Dynamics 365 Marketing > Json set property.
To find the logical name of the entity, go to Customize the System > Entities, and open the relevant entity. The logical name is the Name field of the entity.
Continue adding the previously set JSON values one by one.
Insert the logical name.
Insert the result from the Extracted value from field.
Choose a previous JSON value to add on top of the extracted value. This ensures that you will combine all of the JSON entries into a combined value that will be used at the end.
Select the Save and Close button.
To create a credit card application record that results from each form submission, select Dynamics 365 Marketing > Create Entity. Set the JSON properties value column to Result of the last JSON set property.
To insert an initial step into your process to filter submissions to only those coming from the form that is collecting the credit card applications, select Add Step > Check condition.
Open the dropdown menu and select Primary Entity > Marketing form submission.
Go to the marketing form you are using for the credit card application and find the Form ID in the form page URL.
Place the Form ID into the condition step in the Worklflow.
To find the specific form, you can set the condition logic to marketing form ID to check if it is equal to the specific form ID. If yes, run the Workflow. If not, add a step to stop the Workflow with the reason for cancellation.