Personalizing content

Variable-data printing is a form of digital printing in which elements such as text and graphics may be changed using information from a database or data file. It prints unique documents with customized messages for each customer. This is exactly what you can do with Connect: using variable data you can personalize your company's communications (including but not limited to printed matter).

Before you can start personalizing the content of a template, you must open a data mapping configuration, Data Model, data file or database; see: Loading data.
Alternatively, you could create a Data Model, without extracting data, within the Designer; see Changing the Data Model.

The most common ways to personalize templates are listed below.

Variable data

Variable data are data from a database or data file that are used to personalize documents. Data fields can be inserted in the text directly. For example, if a person's last name can be found in your data, the field that holds the last name can be used in the text of a web page,letter, invoice or email. Scripts in PReS Connect Designer are the basis of Variable Data Publishing and are used to personalize documents based on your data.

The easiest, quickest and most direct way to add customer data to content is via drag and drop; see Variable Data.

The drag-and-drop method results in a Text Script. Another way to create a Text Script is to use the Text Script Wizard. Often it is better to use the Text Script Wizard than the drag-and-drop method.
The Text Script Wizard gives you more control over the way data is displayed. It can insert one or more data fields, each with an optional prefix and suffix. For blocks of data, such as addresses, the Text Script Wizard definitely is the better choice. See Using the Text Script Wizard.

Conditional content

In a template you may want to reveal content - text or images - to one group of recipients, but hide it from others. You can use a Conditional Script Wizard to achieve this, if you have a data field in your data on the basis of which a condition can be set. See Showing content conditionally.

Conditional Print sections

Entire Print sections can be included in or omitted from the output on the basis of one or more values in variable data. See Conditional Print sections.

Dynamic images and Print section backgrounds

Dynamic Images are dynamic in the sense that they are replaced by another image when a data field contains a certain value. Think of a signature image being swapped based on the sender's name, for example. You can use the Dynamic Image Script Wizard to make this happen; see Dynamic images.

To swap a Print section's background dynamically, you can use the Dynamic Background Script Wizard; see Dynamic Print section backgrounds.

Dynamic tables

A Dynamic Table is a table with a variable number of rows that can overflow on one or more pages. It can also display subtotals on transport lines. In invoices, a Dynamic Table is an essential element. Read Dynamic Table to learn how to insert a dynamic table.

Snippets

Snippets are pieces of content that can be re-used within the same template, in all contexts and sections. Snippets can contain any contents that a section can have, such as text, images, variable data, dynamic tables, etc. They are often very useful to personalize content, especially in combination with variable data and scripts. See Snippets and Loading a snippet via a script.

Scripts

As soon as you want to do more than what can be done with the available Script Wizards, self-made scripts are the solution. You could, for example, combine data of two or more data fields in a condition for conditional text. Or you could load a part of a snippet depending on the value of a data field. With a self-made script you can achieve anything that can be done by any of the Script Wizards, and much more.

The basics of script-writing in the Designer are explained in the following topic: Writing your own scripts.

Control Scripts

When output is generated from a template, Control Scripts run before all other scripts, when a record is merged with a context. They determine how different sections of the context are handled. They can, for example, make the page numbering continue over all Print sections, split Email attachments, or omit Print sections from the output.

Some knowledge of JavaScript is needed to edit Control Scripts, just as for any other self-made scripts; see Writing your own scripts. Some functionality is provided as a Scripting Wizard, for example Conditional Print Sections.

See Control Scripts.

Post Pagination Scripts

Post Pagination Scripts are run in a Print context after the content has been paginated. Because they can search through the output of all Print sections, and modify Print sections (one at a time), they may be used to create a Table Of Contents (TOC), as explained in the topic: Creating a Table Of Contents.

See Post Pagination Scripts.