Skip to main content
Version: 4.1 (2026 H2)

Data


Purpose and use​

This document function can be used to transfer properties via the
primedocs Connect interface (Structure ) by defining a schema using this function.


Supported template types​

Data can be enabled on Word content templates, PowerPoint content templates, Excel templates and email templates. For email templates, the restrictions under Data in email templates apply.


Basic structure​

<DataConfiguration>
<Schema>
<Text Id="MyTestValue" />

<Object Id="TestObject">
<Schema>
<Text Id="TestValueInTestObject" />
</Schema>
</Object>

<ObjectCollection Id="TestObjectCollection">
<Schema>
<Text Id="TestValueInTestObjectCollection" />
</Schema>
</ObjectCollection>
</Schema>
<!-- Optional:
<GlobalSchema Key="GlobalKey" />
-->
</DataConfiguration>

Schema / GlobalSchema​

This function uses the schema element to define which data can be transmitted via the interface.
The elements defined here can then be stored in the respective template. The schema can also be stored at Global Configurations via <GlobalSchema Key="..." />.

The Schema or GlobalSchema can then define these types:

Text​

Texts can be received via the Text-element.

Attribute nameDescription
Id
(required)
Is required for identification. Must not contain spaces and must be unique.

FormattedText​

The FormattedText-element can be used to receive text with simple formatting options.

Attribute nameDescription
Id
(required)
Is required for identification. Must not contain spaces and must be unique.
note

The data can be transmitted in various formats (Html or HtmlBase64).

WordContent​

The WordContent-element can be used to receive texts with Word-specific formatting options.

Attribute nameDescription
Id
(required)
Is required for identification. Must not contain spaces and must be unique.
note

The data can be transmitted in various formats (DocxBase64, FlatOpc or FlatOpcBase64).

Object​

If you want to group several elements, an element of the Object type is suitable. Below the Object you can place Text, FormattedText or WordContent elements as well as further Object and ObjectCollection elements — objects can therefore be nested to any depth.

Attribute nameDescription
Id
(required)
Is required for identification. Must not contain spaces and must be unique.
Required
(optional)
If true: The object must be transmitted.

:::note
> Objects configured with Required="true" can be used directly as fields in the template.
warning

If an Object with Required="true" is not transmitted, this is considered an error and document generation is aborted.

ObjectCollection​

Whereas an Object represents a single data record, an ObjectCollection receives several records of the same kind — that is, a list, e.g. invoice line items or participants. It can contain Text, FormattedText or WordContent elements as well as further nested Object and ObjectCollection elements; these define the fields that each entry of the list has.

Attribute nameDescription
Id
(required)
Is required for identification. Must not contain spaces and must be unique.

Data in email templates​

In email templates, Data values are available as {{Data.<Id>}} placeholders in the subject, in To, CC and BCC, and in both the HTML and the plain text content. Nested values are addressed by their path, for example {{Data.Customer.Name}}. The schema is configured exactly as for the other template types.

Three restrictions apply compared with Word templates:

  • WordContent is not supported. Passing such a value to an email template aborts generation with the message “Word Content is only supported on Word templates”.
  • FormattedText only in the HTML content. Referencing a FormattedText field in the subject, in To, CC, BCC or in the plain text content aborts generation. Unreferenced FormattedText fields have no effect.
  • No preview with Connect data. The preview in the template editor receives no Connect payload. Data-based content can only be checked through an actual Connect call.

A complete example with template and Connect call is available under Email template — Data through Connect.