Query parameters are the simplest data source to use in personalization. As long as you have personalization enabled on your account, there's no setup required. Learn more about other possible data sources here.
Let’s personalize a Turtl Doc with some query parameters. Most commonly, a data source expression should be placed in the prefill value field of the personalization form.
In the example below, our Doc has two personalization fields, one for name, and one for company.
1. Open the personalization form builder for your Turtl Doc.
2. Select the name field and type
$: datasources.queryParam('name') into the 'prefill value' field.
As a bonus, we also have a shorthand expression available for query parameters, which is
4. Select the company field.
$: datasources.queryParam('company') or
$: datasources.qp('company') into the 'prefill value' field.
6. Click 'Publish'
Your Turtl Doc is now ready to be personalized with query parameters! To test it, open Doc's Share screen and copy in the Automation URL from the API tab.
If you open this URL in your browser and add two query parameters to the end, specifically
?name=Gandalf&company=Fellowship opening it will generate a brand new personalized Doc with those values inserted into their respective tokens.
The result for our example above would look like this:
Congratulations, you’ve personalized your first Doc with data sources!