Skip to main content
All CollectionsForms & IntegrationsCRM - MarketoPersonalization
Using Marketo as a data source to create personalized Docs
Using Marketo as a data source to create personalized Docs

Learn how to use Marketo lead data to personalize Docs

Radovan avatar
Written by Radovan
Updated over a month ago

Notes:

  • The CRM integration feature / Personalization module are available on our Professional and Unlimited plans. Please contact support if you want to upgrade your plan.

  • Personalized content can only be created for Contacts in Marketo, not Companies or any other object type.

You can use the data within your Marketo CRM to automatically create personalized Turtl Docs when contacts take a certain action - we call this using Marketo as a data source. Once a personalized Doc has been created in Turtl, we can pass the Doc information back to Marketo so it can be used in various processes or campaigns. This article will walk you through how to achieve this.

Within this example, we’ll follow the scenario where a visitor submits a form on your website. When that action happens, we want to automatically create a personalized Doc with the visitor’s name on the front cover and email it out to them via a Marketo email. Your use case might be slightly different, but this should give you an idea of what’s possible and how to achieve it.

Summary of actions:

  • Make sure you have all the prerequisites

  • Set up a Turtl Doc and link it to Marketo

  • Add a Custom Object to Marketo where personalization assets will be stored

  • Add your Turtl Doc webhook to Marketo to inform which Turtl Doc is going to be personalized

  • Set up an email template in Marketo

  • Create a campaign

  • Test

1. Account prerequisites

This process requires you to have a working integration between Marketo and Turtl. When logged into your account, go to "Manage Integrations" to see if you have a working Marketo integration setup. If you don’t already have this enabled or you’re not sure if it’s enabled correctly, please contact support@turtl.co to get this set up.


2. Prepare your master Doc for personalization

Before you can create personalized content, you need to have a completed Turtl Doc which is set up for personalization and includes a personalization form. We call this a master Doc. If you’re new to this process, see our guide on how to set up a Doc for personalization.

In this example, we have a simple personalization form that has three single-line personalization fields for the contacts:

  • First name

  • Last name

  • Company name

These form fields will be mapped to three Marketo properties so the data can be automatically pulled in to personalize the Doc.

  1. Navigate to the personalization form of the Doc you’d like to set up for automatic personalization.

  2. On your first form field, configure the "Prefill Value" so that it is mapped to the Marketo property you’d like to use data from to personalize your Doc.
    To do this:

    1. Select the lightning icon next to the "Prefill Value" field.

    2. Select Marketo as the data source.

    3. Choose the Marketo property to map to your form field.

    4. Test that this has worked by adding in a contact ID from Marketo.

    5. Select OK to save changes

  3. Repeat this process for your remaining form fields. Once all form fields are mapped to an appropriate Marketo property, publish your Doc.

Copy your Turtl Doc automation URL

Within the Share options of your Doc, select the API tab and copy the Automation URL (you’ll need this later on when creating a Marketo webhook).

Note:

  1. Each Turtl Doc you create has a unique automation URL.

  2. You can access this URL again at any time by going to the Share options.


3. Create a new Custom Object

To view Turtl personalizations created for specific contacts, you will need to create a Custom Object with specific fields:

Navigate to "Admin" -> "Marketo Custom Objects" -> "New Custom Object".

Notes:

  • To create a Custom Object you will need a user with enough permissions to set it up.

  • You can title the custom object however you prefer, but the "API Name" must be: turtlPersonalizedDoc

When the custom object is created, go to "Fields" -> "New field" to add 10 Custom Object Fields.

The details needed for each field are listed below:

Display Name: Turtl Doc ID
API Name: doc_id
Description: Turtl Doc ID
Data Type: String
Dedupe Field: NO

Display Name: Turtl Doc URL
API Name: doc_url
Description: Turtl Doc URL
Data Type: String
Dedupe Field: NO

Display Name: Turtl Doc Title
API Name: doc_title
Description: Turtl Doc Title
Data Type: String
Dedupe Field: NO

Display Name: Personalization ID
API Name: pid
Description: Personalization ID
Data Type: String
Dedupe Field: YES

Note: The Personalization ID field is the only field where the "Dedupe Field" is toggled to YES.

Display Name: Personalized Doc Title
API Name: personalized_title
Description: Personalized Doc Title
Data Type: String
Dedupe Field: NO

Display Name: Personalized Doc cover image URL
API Name: personalized_cover_image_url
Description: Personalized Doc cover image URL
Data Type: String
Dedupe Field: NO

Display Name: Personalized Doc cover teaser URL
API Name: personalized_cover_teaser_url
Description: Personalized Doc cover teaser URL
Data Type: String
Dedupe Field: NO

Display Name: Personalized Doc twitter image URL
API Name: personalized_twitter_image_url
Description: Personalized Doc twitter image URL
Data Type: String
Dedupe Field: NO

Display Name: Personalized Doc facebook image URL
API Name: personalized_facebook_image_url
Description: Personalized Doc facebook image URL
Data Type: String
Dedupe Field: NO

Display Name: Lead ID
API Name: leadID
Description: Link field to Lead object
Data Type: Link
Link Object: Person
Link Field: Id
Dedupe Field: NO

Example of the Lead ID field

Example of how the fields will look once created and approved

To use the newly created custom fields in an email template, you will additionally need to create tokens for each one you intend to use within your Marketo program.



4. Create a Marketo webhook

Go to "Admin" -> "Webhooks" -> "New Webhook" to create a Marketo Webhook.

Each Doc you want to personalize with Marketo requires a separate webhook in Marketo.

URL: Turtl automation URL* + ?ttl_mkto_contact_id={{Lead.Id}}.
Request type: POST
Template: {}
Request Token Encoding: JSON
Response: JSON

Once your webhook is created you will need to add the following as a Custom Header. To do this, navigate to "Webhook Actions" and select "Set Custom Header".

Header: Content-Type
Value: application/json


5. Prepare the Marketo email template

In our example scenario, we’d like to send a contact an email containing a personalized Turtl Doc once they’ve submitted a form on our website. To achieve this, we’ll need to create an email template in Marketo that can be used as part of the workflow.

Start by creating an "Automated" email within Marketo. This will enable you to use the email in a workflow later on in this process.

Go to "Design Studio" -> "Emails" -> "Email actions" -> "New email":

You can create an email from a template or from scratch. For our example, we selected one from a basic template. After you select a template and add the name for the email you can click on the button "Create".

Right-click on the created email in the left sidebar to select "Move" from the drop-down menu.

In order for us to use a personalized Doc URL we would need to close this email and move it from "Design Studio" to the "Marketing Activities" and under our program.

In our case, the program is called "Turtl automation". Click on that email and select "Move" from the dropdown. A modal window will show up where you can select where to move this email.

Prepare personalized Doc URL token

Token for personalized Doc URL is not added to the email tokens out of the box. You need to add tokens from custom objects manually to each program.

Click on your new or existing program inside Marketing Activities (in our case "Turtl automation") and click the "My Tokens" tab on the top menu.

In the right-hand sidebar, you will find the "Email Script" option which you would need to drag and drop in the area next to the sidebar.

Add a name to the newly created token and edit the value. In the "Edit Script Token" window select "Custom Objects" -> "Turtl Personalized Doc" -> "Turtl Doc URL" and drag and drop "Turtl Doc URL" in the text area. The token code will show up in the text area.

Click "Save".

You can now use a personalized Doc URL token inside your email. Please note that the token is tied to the program where it was created.

Add a personalized Doc URL token to the email

We can now return to our email to start editing the message and adding tokens. Within the message body, you need to use the {...} icon to insert a new token.

In the Insert Token window search for the name of your newly created token (Personalized Doc URL in our example) and insert it into the email to add the personalized Doc URL to the email.


6. Setup Marketo campaign

Within your Marketo Program, create a New Smart Campaign. Add a Campaign Name, then select "Create":

In your new Smart campaign, navigate to the "Smart List" tab to define the trigger.

In our example, we want to create a personalization for all contacts who submitted a specific form: Find the "Fills Out Form" component under "Triggers" in the sidebar and drag and drop it next to the sidebar.

Navigate to the "Flow" tab - this is where we will define the campaign action and steps. Here, you will need to call the webhook we created in step 4.

Find the "Call Webhook" component under the Integration tab in the sidebar and drag and drop it next to the sidebar. From the dropdown select the webhook we created in step 4.

We will add two additional actions in order for our email to be automatically sent.

The first action is called Wait and just like with other actions you will need to drag and drop it in the area for actions. For the Wait action, we will set duration of 2 minutes. This is needed because our webhook needs some time to create new personalizations.

The next action you will need to add is "Send email". In that action select the email that you prepared in the last few steps. Ensure that your email is approved and not in the draft anymore.

Our flow will now look like this:

Finally, the last step is to activate your campaign within the "Schedule" tab:

Once you click on the "Activate" button in the schedule tab, the smart list is ready for automation.


7. Test and launch

Once you’ve completed the steps above, you’re ready to test and launch your workflow. To test everything is working correctly, we recommend that you:

  1. Manually fill out your form which we set as a trigger in step 5 and review the output.

  2. Ensure that:

    1. A personalized Doc has been created in Turtl and the data from Marketo has been pulled through correctly (e.g. the contact’s name).

    2. The test contact’s record in Marketo has been populated with Doc info.

    3. An email that includes the correct personalized URL to the Turtl Doc has been sent.



#datasources

The personalization engine is protected by US patents.

Did this answer your question?