Skip to main content
All CollectionsForms & IntegrationsCRM - Microsoft Dynamics 365Personalization
Using a hidden MS Dynamics 365 form behind a personalization form
Using a hidden MS Dynamics 365 form behind a personalization form

Using a hidden MS Dynamics 365 form behind a personalization form

Robert Sedovsek avatar
Written by Robert Sedovsek
Updated over a week ago

Note: This feature is available as a Professional Service if you have purchased the personalization module. To request this feature, please email professional-services@turtl.co and our team will support you by adding an extension to your account. Please ensure this extension is turned on in your Doc settings.

1. Introduction

Turtl Docs can be personalized using reader forms, where readers input data that is stored in Turtl’s database and used to tailor their Doc. This article explains how to push that data into a third-party CRM, specifically MS Dynamics 365, through blind form submissions.

The process involves syncing tokens within the Turtl Doc with the corresponding form fields in MS Dynamics 365. This synchronization occurs automatically when the names of the tokens in Turtl match the form field names in MS Dynamics 365 exactly.

Requirements:

  1. A Turtl Doc with a reader form personalization and the "Sync personalization data with MS Dynamics 365" extension enabled. This extension can be found under the "Extension" tab in the Doc’s settings.

  2. Tokens in the Turtl form must exactly match the names of the MS Dynamics 365 form fields, including capitalization. For instance, "firstname" and "FirstName" are considered different and cannot be used interchangeably.

  3. The personalization form must include two invisible, pre-filled tokens named "organizationId" and "formId", corresponding to your Dynamics 365 organization ID and the ID of the form you want to sync data with.

2. Setting up a MS Dynamics 365 form

Create a MS Dynamics 365 form as you normally would, including the form fields you wish to capture from Turtl’s reader form. Ensure that your Dynamics 365 form contains the same or fewer fields than the form on the Turtl Doc.

2.1. Form configuration

Ensure the following prerequisites are met:

  1. Your domain must be enabled for external form hosting (search for "domain authentication" in your MS Dynamics 365)

  2. Your Turtl Docs must be on the same domain as your MS Dynamics 365 form (refer to the guide on setting up a custom domain for Turtl)

  3. Disable Redirects: Make sure your form does not redirect after submission. Navigate to "Form Settings" → "Redirect after submission" and ensure this option is turned OFF.

  4. Field Name Accuracy: For each form field, note the lead property name (not the label). For example, the lead property name for the "First Name" field is "firstname" (all lowercase) and an "Emai" is "emailaddress1", as demonstrated in the examples below. This is crucial because the tokens you define in a Turtl Doc must exactly match these field names on your form.

Lastly, you will need to locate your MS Dynamics 365 form ID and organization ID, as these will be required in step 3. Please refer to the next chapter for instructions on how to find them.

2.2. Find the MS Dynamics 365 form and organization ID

After you’ve created your form, please click on the "Publish options" button and copy the JavaScript code.

Paste the code in any text editor. It should look similar to this:

<div
data-form-id='a123abcd-5678-ef12-ghi3-456789012345'

data-form-api-url='https://public-usa.mkt.dynamics.com/api/v1.0/orgs/b987cdef-1234-ef12-jkl5-678901234567/landingpageforms'

data-cached-form-url='https://assets-usa.mkt.dynamics.com/b987cdef-1234-ef12-jkl5-678901234567/digitalassets/forms/a123abcd-5678-ef12-ghi3-456789012345'></div>

<script src = 'https://cxppusa1formui01cdnsa01-endpoint.azureedge.net/usa/FormLoader/FormLoader.bundle.js'></script>

Note: The following values are examples extracted from the code snippet provided above. These are not the values you need to use. You will need to extract your own Form ID and Organization ID from your specific code.

  • Form ID: a123abcd-5678-ef12-ghi3-456789012345

  • Organization ID: b987cdef-1234-ef12-jkl5-678901234567

3. Setting up a public personalized form

Design your personalization form as you normally would, but ensure that the tokens are named exactly as the corresponding MS Dynamics 365 form fields to allow proper data flow. To find the correct names for the form fields, please follow the steps outlined in section 2.1.

Additionally, you need to add two new fields to your form:

  1. Form ID: Name the token for this field "formId". Use the value you found in step 2.2 as the "Prefill value".

  2. Organization ID: Name the token for this field "organizationId". Again, use the value you found in step 2.2 as the "Prefill value".

Mark the new form fields as invisible in the "Advanced" settings. This ensures that visitors to your document won’t see these fields, but the values will still be passed to the extension that syncs data with the MS Dynamics 365 form.

4. That’s it!

Once your forms are set up, you can test the functionality by filling out a public personalization form in a Turtl Doc. This should generate your personalized Doc and automatically send the submitted data to your MS Dynamics 365 form.

Did this answer your question?