2020.2

Table Of Contents
Tip
In Workflow, you may make use of the system variable %U to create unique strings.
Inserting a pURL
Assuming that the necessary data and Workflow processes are available, here's how you insert
a personalized URL in a template.
1. Open the template and find or enter the text that you want to turn into a link.
2.
Select the text, right-click it and select Wrap in Span....
3. Give the span an ID, for example: get_pdf_link. Click OK.
The text Download PDF, wrapped it in a span with the ID get_pdf_link, would look
like this on the Source tab:<span id="get_pdf_link">Download
Invoice</span>.
4. With the span selected, click on 'ID' on the Attributes pane (click on the field name, not the
field itself). This will insert a script that has this ID as selector, and open it in the script
editor.
Since it's dynamic, inserting a personalized URL always implies writing a script, however
small and simple. For a basic explanation of scripts, see "Writing your own scripts" on
page853.
5. Type the code that wraps the span in a <a> element (a hyperlink). In the link, the host
should be followed by the action with which the corresponding Workflow process is
triggered and the data with which Workflow will be able to create a personalized
response.
Sample script
Let's assume:
l A Workflow process is triggered by the HTTP action: MakePDF.
l The template that outputs the pURL is to be merged with a record that contains a data
field invoice_UUID. This data field holds the information that the 'MakePDF' Workflow
process needs in order to create personalized output.
l The template contains a span with the link text "Download Invoice": <span id="get_
pdf_link">Download Invoice</span>.
The following script, with the selector #get_pdf_link, will create a valid link around the span:
Page 824