*** NOTE: ALL INFORMATION IS ACCURATE AT DATE OF PUBLISHING ***
There are number of different types of fields that can be added to a marketing form in Customer Insights – Journeys (D365 Marketing). Most commonly used are text fields such as First Name, Last Name and Email, or even Choice fields for ‘How did you hear about us?’ to set the Lead Source. These can be added to the form and no additional steps are needed. Simple! What about those fields that are lookup fields? One of the most common I have seen is where organisations add a new type of record named Country which is then used to set the location of a Lead or Contact. This can be added to a real-time marketing form but does need a few extra steps to walk through before using that form. We’ll take a look in this post.
While editing your form, search for the lookup field you need to add. You can see the column type listed above the field on the right side panel.
After adding the field to the form, you’ll need to turn on the switch to make the data publicly viewable, regardless of if you are wanting this to be a hidden field or not. This means that access to ‘read’ the records found on the table that the field ‘looks up’ to is being granted. You then need to pick from a list of system views to determine which records should be displayed. In order to make sure only the records you want displayed are shown, your system administrator will need to provide views for you using the correct filtering. For example, let’s say we are showing the Country field, but want to display just countries in the Nordics, or EMEA or APAC, a view filtering to only show those related Countries would need to be added to your system. You can then select from the correct view to make sure only THOSE filtered Countries show. The attribute shown will more than likely be the Name, but you might want to show a different field from that type of record instead.
Once you save the form and try and make it live, you may get this error stating that the lookup field requires extra permissions of Marketing Services User Extensible Role to be used in the form. There is a role provided by Microsoft that makes sure people filling out the form can see and submit forms that include lookup fields. Until that security role has access to the Country table (or whatever table you are adding to your form), the form cannot be used.
Your system administrator will need to find the security role first.
Next, they will need to find the table that you are trying to add to your form via the lookup field in question, and grant full read access to it. As soon as this is done, the form can be saved and made live to be used on your website.
When someone interacts with the field on the form, they can scroll through the list of values, or start typing in the box and it will filter the list of records.
The form submission contains all of the related field submissions. For any lookup fields, the name of the value chosen will be shown, along with the GUID (or ID) of the record and the logical name of the table.
Prior to version 1.1.35296.75, when adding a lookup field you could hide it but there was no simple way to set a default value without fiddling about in the HTML of the form.
A massive THANK YOU to the product team for finally adding this as a standard feature from version 1.1.35296.75 onwards, where you can now set your default value!!! This is pretty common to do for the Source Campaign field on a Lead where different forms relate to specific Campaigns. The field can then be hidden, but on submission the default value will have been set on any new or updated records. Hooray!
Check out the latest post:
Split Your Audience By Number Or Percentage In Customer Insights - Journeys
This is just 1 of 480 articles. You can browse through all of them by going to the main blog page, or navigate through different categories to find more content you are interested in. You can also subscribe and get new blog posts emailed to you directly.
Hey Megan!
I already played with this a few days ago and also created a JavaScript which sets the Value (like the UTM Parameter). So when I send an email, I can add the record ID of the campaign to the email. This is then resolved, because the Script sets up Brackets {} and fills out the hidden campagin field. This worked perfectly (for my case). Best regards!
Hi Ferdinand, oh nice idea! What if someone lands on the page with your form and they DID NOT come via an email? Are you setting a default and then updating via the parameter in the URL if it exists?
Hi Megan,
this post and the Table Customisation Of Real-time Marketing Journeys have been really useful for me to adding Campaign lookup to the real-time marketing tables.
But I’m still struggling to adding Campaign lookup field to the RTM Email’s form. I tried to add it to the Information form like with the Journey but it didn’t worked.
Do you have any instructions how to add Campaign lookup field to the Email editor’s form?
Best Regards,
Eetu from Finland
Ps. Loving your post and the D365 Marketing Weekly
Hi Eetu!
I am not sure what you mean about adding it to email editors form. Are you talking about adding a new field to the Email table, and then adding that field to the form that is used when someone is creating an email? If so, there are likely two forms that you need to edit. One that adds it to the main information form, and one that includes it in the settings area. Check out this post that might help – https://meganvwalker.com/table-customisation-real-time-marketing-journeys/
Megan
Yes, I checked that post but the Email’s form seems to work little bit differently than Journey’s form when adding a new field to it.
I added the Campaign lookup field to Email’s “Information” and “Email settings control” forms but still it doesn’t show up in the Settings area when creating a new email in real-time marketing.
I would really appreciate if you can try to do this and maybe write a post about it. 🙂
I was able to add the Campaign lookup field in the outbound email form by adding it to “Email Properties” and “New editing experience” forms.
Hi Eetu,
There are two forms to edit. One is the Email header (not the email header form) and the other is the Information one. Add your field to both forms and on the Information one, make sure the settings on the field are unticked for ‘Visible by default’.
Hi Megan,
thanks a lot for your response. I was now able to add the Campaign field to RTM Email’s form.
Also I added it to the RTM Form’s form by adding the Campaign lookup field to the forms “Information” and “Form settings”.
Now our customer can relate any marketing related entities to specific Campaigns to get analytics and reporting sorted for good.
Once again, thank you a lot!
Excellent, glad you got it sorted Eetu!!!
Hi Megan,
Really like this feature. Do you know if there’s a way to sort the values other than just A>Z!?
For example, i use the list below, but in an A>Z sorting this list makes no sense. In the D365 Table i added a sorting column with the right order but i can’t find out how to use that in a Form.
Average
Bad
Excellent
Good
Poor
Hope you can help!
Best regards,
Bert
Hi Bert, for something like that, you would need to have something on your table with an ordering logic. A simple number field that you can then add 1 to Average, 2 to Bad, 3 to Excellent and so on. Then you could sort the view by your new order number field.
Hi Megan, When I use Legal Entity lookup field , set a default Company and hide the field on form, publish it. Wait for few mins for my change to reflect on external site where this form is hosted.
After filling all fields and click submit , my form wont submit at all.
If I unhide the Company lookup field and try my form submits.
Any idea what would be the issue?
Hi Srikrishna, assuming you added the extra permissions to the Marketing Services User Extensible Role, and you set the value in the field, it should work regardless of if the field is hidden or not. Have you checked the developer console to see if there are any errors showing there when you press submit?
I am experiencing this same issue. It seems like the default value for the Company field is not populating, and since I have this as a required field, then the form will not submit. I am trying to figure out why this default lookup field is not populating on the form.
Hi Cheyenne, perhaps check out this recent post from Amey Holden. Does this help? https://www.ameyholden.com/articles/account-company-name-lookup-realtime-marketing-form-customer-insights-journeys
Hi Megan, Is it possible to set the default value using JavaScript?
Hi James, what would it be based on? Are you thinking when the person picks a specific value on another field that it sets it? It ‘might’ be possible but you would need to have the GUID’s for those values to set things. Not tried it before so not 100% but should work.
Hi Megan,
I’ve noticed that when a form doesn’t include a lookup field, a consent record is created at the contact point for both email and SMS. However, if the form contains lookup fields, the consent record is only created for email, not for SMS. Have you encountered this issue before? If yes, how did you solve this? Thanks
Hi Anita, I have never seen this. The creation or update of Contact Point Consent records when someone fills out and submits a form isn’t linked to having a Lookup field, but related to the Purpose/Topic tick boxes themselves. That is where you set if it is going to update for Email and/or SMS.