Custom URL tags

What a custom URL tag is

A custom URL tag is a placeholder in a template that is filled from a parameter on the document's link when it opens. It lets a single published link carry extra values that appear in the document, without adding fields to Salesforce.

For example, a template with a custom URL tag named contractRef will show whatever is passed as ?contractRef=... on the link.

Inserting one

In the builder, open the URL Params tool. Enter a parameter name (letters, numbers, underscores, and hyphens; it must start with a letter or underscore). The tool inserts an expression:

#{Params:contractRef}

You can insert the same tag in several places; they all resolve to the same URL value.

How it resolves

When the document renders, the engine reads the link's query string and replaces each #{Params:name} with the value of that parameter. If the parameter is not present on the link, the tag resolves to an empty string, so the document does not show a broken placeholder.

So a link like:

.../apex/b3d__Document?templateId=...&recordId=...&contractRef=ABC-123

renders the document with ABC-123 wherever #{Params:contractRef} appears.

Using URL parameters in repeat filters

URL parameters can also drive the filtering of a repeat block. A repeat block's custom filter can reference a parameter, so the list of related records shown is controlled by the link. See Repeat sections and repeat blocks.

Auditing

The full set of URL parameters on a link is recorded on the document's tracking record, so you can see exactly what a given document was rendered with.

Tips