Data source is the umbrella term for all situations where you want to read some data from somewhere when personalizing. Using data sources you can personalize Docs by reading data straight from Marketo, and from the URL in the form of query parameters. Each Doc also gets its own automation URL, which can be used to generate personalizations in a number of new ways. Learn more about this here.
In this article, we will cover how to set up your Turtl account and Master Docs in order to create personalizations from Marketo lead data. We will also go over how to set up your Marketo account to build a workflow to designate when the personalizations will be created and where to view them.
Setup Turtl for automation
1. If you are a Turtl Admin you can turn on automation by navigating to your Marketo Rest integration and selecting ‘Setup for Automation’
2. Next, navigate to the Master Doc you’d like to personalize. In the form builder, add the following expression to the ‘Prefill Value’ in your token:
$: datasources.crm.marketo.getProperty('firstName')
Note: the value firstName
will need to be changed depending on what data you want to extract from Marketo. In this example, we will add the expression to both the first_name and last_name tokens in my form builder. We will need to change the firstName
value appropriately.

For my last_name token the predefined value will be:
$: datasources.crm.marketo.getProperty('lastName')

3. Now, exit the Personalization form and navigate to the 'Share' screen.

Select the API tab and copy the automation URL:

Note: Each Doc has a unique automation URL.
Later on, we will go over how to add query parameters to this automation URL, which will be used in Marketo to create personalizations based on your lead’s information.
4. Finally, save and publish your Doc.
How to setup Marketo custom objects
In order to view Turtl personalizations created for specific contacts you will need to create a Custom object with specific fields.
1. Navigate to your ‘Marketo account settings’ (note: you must be an admin user) and within the Database Management tab dropdown click on ‘Marketo Custom Objects’, then select ‘New Custom Object’:
Input the following into the new object and select ‘Save’:
Display Name: Turtl Personalized Doc
API Name: turtlPersonalizedDoc
Plural Name: Turtl Personalized Docs
Description: Turtl Personalized Doc
Show in Person Detail: SHOW
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 Dedupe 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
3. Once all 10 fields are created, navigate back to the ‘Marketo Custom Objects’ tab, select ‘Custom Objects Actions’ and select ‘Approve’. When approved you will be able to see the custom object within your contact’s page:
How to setup Marketo programs
Your Marketo program will designate when a personalization will be created, what data will be used, and when it will be sent to the reader.
1. First you will need to create a webhook for your Master Doc. To do this navigate to the ‘Admin’ tab at the top of the page and within the ‘Integration’ folder select ‘Webhooks’. Then select ‘New Webhook’:
Add the following to your webhook and select ‘Create’:
Webhook Name: Add a name for your webhook
URL: Add the webhook you copied from your Doc’s settings and add the following parameter to the end: ?ttl_mkto_contact_id={{ lead.Id }}
Request Type: POST
So in this example, the URL would be:
https://demjan.turtl.co/webhook/61f304569b544e3ceb6b8808?ttl_mkto_contact_id={{ lead.Id }}
This parameter will allow you to obtain your lead’s data that is stored in Marketo.
2. Now that your webhook is created in Marketo you’ll need to create a new program. To do this navigate to ‘Marketing Activities’ and open the ‘Active Marketing Programs’ folder. In this folder select ‘New’ then click ‘New Program’:
Add the following to your new program and select ‘Create’:
Campaign Folder: Choose which folder you’d like this program to reside
Name: Name your program
Program Type: Default
Channel: Web Content
3. Within your newly created program, create a ‘New Smart Campaign’:
Make sure the Program selected is the one you just created, add a proper Campaign Name, then select ‘Create’:
4. Once created, navigate to the ‘Smart List’ tab - this is where you will define which people this campaign will affect. In our example we want to send a personalization to all people included in a list (more information on creating a list here):
5. Now navigate to the ‘Flow’ tab - this is where we will define the campaign action and steps. In our example we want to call the Webhook created in step 1 and send an email to the user:
6. Finally, activate your triggered campaign within the ‘Schedule’ tab: