Skip to main content
Version: 4.2 (2027 H1)

Campaign Fields

The Campaign Fields document function injects active campaigns into Outlook signature templates. It defines named campaign fields that are used as placeholders in the signature. Tag filters control which campaigns appear in which signature template.

note

This document function is available exclusively on Outlook signature templates.


Basic Structure​

<CampaignConfiguration>
<Campaign Name="SommerAktion" Label="Sommeraktion 2024">
<TagFilter>
<Tag>Kampagne</Tag>
<Tag>Sommer</Tag>
</TagFilter>
</Campaign>
<Campaign Name="WinterAktion" translate-Label="Campaigns.Winter" />
</CampaignConfiguration>

Placeholder in the signature​

Every campaign field is available in the HTML content and in the plain text content of the signature template as the placeholder {{<Name>}}. At runtime it is replaced by the content of the selected campaign template, in the HTML content by its HTML, in the plain text content by its plain text. If no campaign matches or the user chooses no campaign, the placeholder stays empty.

{{#if SommerAktion}}<p>{{SommerAktion}}</p>{{/if}}

The {{#if}} block omits the surrounding markup when the field is empty. Without a placeholder in the content, the campaign does not appear, even when it is active.


Campaign​

Each <Campaign> element defines a campaign field entry.

Attributes​

AttributeDescription
Name (required)Technical identifier of the campaign field and at the same time the placeholder in the content. Must be unique and contain no spaces.
LabelDisplay name of the campaign selection in the add-in.
translate-LabelTranslation key for the display name (alternative to Label).
AutoInsertControls whether an active campaign is inserted without the user doing anything. Default: true. With false, the effect differs per client type (see How AutoInsert behaves).

How AutoInsert behaves​

AutoInsert="false" does not suppress a campaign the same way everywhere:

Client typeEffect of AutoInsert="false"
Outlook web add-in, signature inserted automatically (new message, changed recipients)The campaign placeholder stays empty.
Outlook web add-in, signature inserted manuallyThe campaign dropdown is preselected to «no campaign». The campaign remains selectable and can be inserted deliberately.
primedocs Desktop, automatic signatureNo effect. The automatic desktop signature uses a separate mechanism with the ribbon commands Activate campaign and Deactivate campaign.
primedocs Desktop, creating a document or testing a templateNo effect. The campaign is inserted.
<!-- Campaign only on deliberate selection, not on its own -->
<Campaign Name="Sonderaktion" Label="Sonderaktion" AutoInsert="false" />
note

AutoInsert controls the preselection, not the permission. To keep a campaign out of the selection entirely, use the TagFilter or the permissions of the campaign template.

TagFilter​

<TagFilter> restricts which campaign templates are eligible for this campaign field. Each <Tag> is an alternative: a campaign template matches as soon as it carries one of the listed tags. Several tags within one <Tag> element, separated by ;, must all be present on the template.

<Campaign Name="SommerAktion" Label="Sommeraktion">
<TagFilter>
<Tag>Sommer</Tag>
<Tag>Retail;Schweiz</Tag>
</TagFilter>
</Campaign>

This field accepts campaign templates with the tag Sommer as well as campaign templates that carry both Retail and Schweiz.

If no <TagFilter> is specified, all active campaign templates are eligible, including those without a tag.


Interaction with Campaign Templates​

Campaign fields in a signature template are populated by campaign templates. A campaign template defines the concrete content (banner, text, image) and is linked to the campaign field via tags.

The interaction:

  1. The signature template defines a campaign field (Name) using Campaign Fields and carries the placeholder {{<Name>}} in its content.
  2. One or more campaign templates carry matching tags, are published and released for the user, and their period (Active from, Active to) is running.
  3. When the signature is generated, primedocs selects the first of these campaign templates by priority and inserts its content into the placeholder. In the web add-in the user can choose another eligible campaign or no campaign when inserting the signature manually.

Period, priority and the order among several active campaigns are described on the Campaign Template page.