Using a Merge Field in a Link

Prev Next

Use merge fields to create personalized links in Deliver mailings and System Emails.

📖 Further reading

Learn how to customize links with query string parameters.

Creating a merge field link in a Deliver mailing

🔔 Important: Use descriptive link text.

When you create the link, enter normal display text such as Log in to your account or Submit your recommendation.

Do not use the merge field itself as the visible text, and do not display a raw URL as the link text.

Example:

  • Correct: display text = Log in to your account; URL = login-link

  • Avoid: display text = login-link or a visible URL; URL = login-link

Set up the subquery export

It’s generally recommended to create a subquery export to formulate the full text of your link. This allows you to include record-specific data points in a URL while referencing only a single merge field in link construction later. Skip to Add the merge field link to your message if your merge field is already available — for example, in most system emails.

  1. Go to Deliver.  

  2. Select an existing email message, or create a new one.

  3. Select Edit Recipient Lists.

  4. Configure the recipient list as needed.

  5. In the recipient list query, select Subquery Export.

  6. Configure the following:

    • Name: Enter a descriptive name, like login-link.

    • Type: Dependent subquery

    • Output: Concatenate

    • Exports: Create two exports:

      • Literal: A literal representation of the desired URL up through the query string parameter, like https://apply.slate.edu/account/login?id=.

      • Export: Select the unique ID to be appended to the literal.

     

       

  7. Select Save.

📝 Note:

The example above hard-codes the protocol (https://) in the literal. Whether you do so is up to you — but your choice here affects how you configure the link protocol in the next section.

Add the merge field link to your message

  1. Use the breadcrumb navigation to return to the message overview page.

  2. Select Edit Message.

  3. Select the link icon, or press Ctrl/Cmd + K.

  4. Configure the following settings:

    • Display text: Enter the link’s display text. This should describe where the link goes or what it does; it should not be the link URL itself.

    • Link type: URL

    • Protocol: <other>

    • URL: Enter the merge field for the link, for example {{login-link}}

     

       

  5. Select OK.

  6. Configure the remaining message text, then select Save.

📝 Note:

Select <other> as the protocol in Step 4 above if your subquery export already includes a hard-coded protocol like https://. Otherwise, select the appropriate protocol from the list.

Still looking for what you need?