Skip to main content
Version: 4.2 (2027 H1)

Campaign Template

A campaign template contains HTML and plain-text content, typically a banner or a promotional block, that is inserted into email signatures. Campaigns are managed independently of individual signature templates. Multiple campaigns can be active simultaneously.

Campaigns are linked to placeholders on the signature template via the Campaign Fields document function. When a campaign is active, its content in the email's format is injected into the matching placeholder in the signature.

How a campaign gets into the signature​

Three things have to fit together: a campaign field on the signature template, the placeholder of that field in the signature content, and an active campaign template that matches the field.

  1. On the signature template, add the Campaign Fields document function and define a campaign field with a Name. An optional TagFilter narrows down which campaign templates are eligible for this field.

    <CampaignConfiguration>
    <Campaign Name="Banner" Label="Campaign banner">
    <TagFilter>
    <Tag>Campaign</Tag>
    </TagFilter>
    </Campaign>
    </CampaignConfiguration>
  2. In the HTML content of the signature template, insert the placeholder {{Banner}} where the campaign should appear, and in the plain text content if needed. Without this placeholder the campaign stays invisible, even when it is active.

    {{Profile.Org.Title}}<br/>
    {{Profile.Org.Postal.Zip}} {{Profile.Org.Postal.City}}
    {{#if Banner}}<p>{{Banner}}</p>{{/if}}
  3. Create a campaign template (see below), give it the matching tag if a TagFilter is set, publish it and set its period (see Activating a campaign).

When the signature is generated, primedocs looks for all campaign templates that are published, whose period is running, that are released for the user, that cover the language of the email and, if a TagFilter is set, that carry a matching tag. The first of these campaigns by priority is inserted into the placeholder. If no campaign matches, the placeholder stays empty and the signature is generated without a campaign.

Which templates are released for the user is controlled by the permissions of the campaign template. A campaign that only one department should see is restricted to that department there, not via the TagFilter.

Activating a Campaign​

A campaign is activated via its period. It is set in the template editor of the campaign template on the Properties tab:

SettingMeaning
Active fromFirst day on which the campaign is inserted. Empty: from now on.
Active toLast day on which the campaign is inserted. Empty: unlimited.
PriorityPriority 1 (Lowest) to Priority 10 (Highest). Decides which campaign is inserted when several are active at the same time.

Without any dates set, the campaign is active permanently. The three settings belong to the respective template version. On publishing, the values of the version being published apply.

In addition, the campaign template must be published, list the document language of the email in the Languages dropdown and be released for the user. A campaign that should appear in all languages does not need a template of its own per language, see Multilingual Outlook templates.

Selection among several active campaigns​

If several campaigns are eligible for a campaign field, primedocs orders them as follows:

  1. Higher priority first.
  2. For equal priority, the later Active from.
  3. For equal start dates, the order of the templates in the template group. Template administrators change it in primedocs Desktop with Move up and Move down. In classic Outlook, the template saved last decides instead.

The first campaign in this order is inserted. What the user sees depends on the client:

  • Web add-in, automatic signature: the first campaign is inserted without asking, unless the campaign field carries AutoInsert="false".
  • Web add-in, inserting the signature manually: the task pane shows a selection per campaign field with all eligible campaigns. With AutoInsert="true" (default), the first campaign is preselected, with AutoInsert="false" No campaign is preselected. The campaigns remain available for manual selection. No campaign leaves the placeholder empty.
  • primedocs Desktop and classic Outlook: see How AutoInsert behaves.

Creating a Template​

  1. In primedocs Desktop, click «New Template» and select «Campaign» (Microsoft Outlook category).
  2. On the Properties tab, select the Languages in which the campaign should appear and set a tag if needed.
  3. Click «Editor». The editor opens the language-independent content. Language versions of their own are created via «Create in other language», see Multilingual Outlook templates.
  4. Create the campaign content in the «Visual Editor» tab.
  5. On the Properties tab, set Active from, Active to and Priority.
  6. Save, test and publish the template.

Visual Editor​

Campaigns are designed in the visual editor: no HTML knowledge required. The HTML markup is generated and saved in the background. HTML or script code is never visible.

  • Format text: Font, font size, font and highlight colour, bold, italic, underline, strikethrough, alignment, and indentation.
  • Insert image: Insert an image file via the toolbar (PNG, JPEG, GIF, BMP, TIFF).
  • Insert link: Select text and assign a URL via the toolbar (or Ctrl+K).
Images as picture fields

On save, the editor automatically stores inserted images as Picture fields in the template's field configuration. The fields are named CampaignPicture_1, CampaignPicture_2 and so on, and the prefix marks them as generated automatically. The HTML only contains the placeholder, for example <img src="{{CampaignPicture_1}}">. Identical images are stored only once. Images removed from the content are removed from the field configuration on save. Picture fields created by hand are left untouched.

30,000-character limit

The campaign becomes part of the signature, and the Outlook web add-in inserts signatures of at most 30,000 characters (Outlook (New), Outlook on the web, Outlook for Mac). If the finished signature is longer, it is not inserted. Images from Picture fields do not count towards this limit, because primedocs transfers them as embedded attachments. An image embedded as Base64 (data:image/…;base64,…) directly in the HTML counts in full, and even a small banner can exceed the limit. When adding images by hand on the HTML tab, reference a Picture field (<img src="{{FieldName}}">) instead of embedding the image as Base64. See also Images in the signature template.

Large images​

For large images already stored as image fields, the visual editor uses a reduced display copy up to 1200 pixels wide when needed. The original image field content remains unchanged. On saving, the display copy is mapped back to its original field.

Inserting an image file follows a different rule: files larger than 1 MiB (1,048,576 bytes) are reduced to a maximum width of 1200 pixels after an informational message. Smaller dimensions are not scaled up. The reduced version is inserted. The source file on disk remains unchanged.

«Text» and «HTML» Tabs​

In addition to the visual editor, two further tabs are available:

  • Text: Plain-text variant of the campaign for emails in plain-text format. Use «Extract text from HTML» to derive it from the HTML content.
  • HTML: Direct access to the generated HTML, with a live preview and selectable preview profile. For technically experienced layouters, e.g. for complex layouts the visual editor does not cover.

Campaign content is inserted in the format of the email: HTML uses the content of the HTML tab, plain text the content of the Text tab. If no email format is supplied, it is derived from the available content. HTML content only selects HTML, plain-text content only selects plain text, and both or neither select HTML. If the Text tab is empty, the plain text is derived from the HTML content during generation. A dedicated text content is worthwhile where that derivation does not produce a usable result.

Campaigns in the test document

When a signature is tested with Test document (Ctrl+T), the campaign also follows the format of the signature: a plain-text signature receives the plain-text content of the campaign, an HTML signature the HTML content. The plain-text result can therefore be checked directly in the test document.