Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Szenario

Eine Gemeinde schickt jedes Jahr an alle neu zugezogenen Bürger eine Einladung für ein Apéro. Dazu wird aus der Fachapplikation des Einwohneramtes eine Connect-Datei erzeugt, die alle benötigten Daten enthält. Im Dokument steht der Satz:

"Sie sind dieses Jahr am <Zuzugsdatum> von <früherer Wohnort> in unsere Gemeinde gezogen."

Analyse

In diesem Szenario handelt es sich um einen Multiletter, d. h. um ein Dokument mit mehreren Empfängern (nicht Serienbrief, da keine Word-Serienbrieffelder verwendet werden). Die beiden Daten Zuzugsdatum und früherer Wohnort sind für jeden Empfänger unterschiedlich, können also nicht über CustomInterfaceConnector eingefügt werden, da sie dann global für alle Empfänger identisch wären. Stattdessen müssen sie an Recipient angehängt werden.

Um die Daten der beiden Felder ins Dokument zu bringen, gibt es zwei Möglichkeiten:

1. Bestehende Felder umfunktionieren

...

Scenario

Every year, a municipality sends an invitation for a reception to all newly arrived citizens. For this purpose, a connect file is generated from the specialist application of the residents' registration office, which contains all the required data. The document contains the sentence:

"This year on <move date> from <former place of residence> you moved to our municipality."

...

Analyse

In this scenario it is a multiletter, i.e. a document with multiple recipients (not a mail merge, because no Word mail merge fields are used). The two data move-in date and former domicile are different for each recipient, so they cannot be inserted via CustomInterfaceConnector, because they would then be globally identical for all recipients. Instead, they must be appended to Recipient.

There are two ways to bring the data of the two fields into the document:

1. Repurpose existing fields

Each recipient has a wealth of fields available, hardly ever all of which are used. Thus, such can be misappropriated to bring the data into the document.

Code Block
breakoutModewide
languagexml
<OneOffixxConnectBatch xmlns="http://schema.oneoffixx.com/OneOffixxConnectBatch/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Entries>
    <OneOffixxConnect>
      <Function name="Recipient" id="b9e8ec94-bec0-418a-b985-c565ac3bec23">
        <Arguments>
          <ContactList>
            <ContactItem Selected="true" xmlns="http://schema.oneoffixx.com/OneOffixxConnectBatch/1" id="0">
              <Person>
                <LastName>Mustermann<<LastName>Doe</LastName>
                <FirstName>Max<<FirstName>John</FirstName>
                <SalutationShort>Herr<<SalutationShort>Mr.</SalutationShort>
                <Salutation>Sehr<Salutation>Dear geehrter Herr Mustermann<Mr. Doe</Salutation>

                <!-- Birthday zweckentfremdetmisappropriated fürfor MovingDate -->
                <Birthday>01.04.2019</Birthday>

                <!-- NickName zweckentfremdetmisappropriated fürfor PreviousCity -->
                <NickName>München</NickName>

                <Address>
                  <Street>Hauptstrasse<Street>Main Street 42</Street>
                  <City ZipCode="1337">Leethausen</City>
                </Address>
              </Person>
            </ContactItem>
         </ContactList>
      </Arguments>
    </Function>
  </Entries>
</OneOffixxConnectBatch>

(plus) Vorteile: Bestehende Felder werden verwendet, keine weitere Anpassung nötig Advantages: Existing fields are used, no further customization needed.

(minus) Nachteile: Die Daten sind im Empfängerdialog sichtbar, können folglich den Benutzer verwirren Disadvantages: The data is visible in the recipient dialog, consequently can confuse the user.

...

2. Use Extended Fields

...

An alternative is to bring the data into the document via Extended Fields. In the following MovingDate = MovingDate and PreviousCity = PreviousCity.

Code Block
breakoutModewide
languagexml
<OneOffixxConnectBatch xmlns="http://schema.oneoffixx.com/OneOffixxConnectBatch/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Entries>
    <OneOffixxConnect>
      <Function name="Recipient" id="b9e8ec94-bec0-418a-b985-c565ac3bec23">
        <Arguments>
          <ContactList>
            <ContactItem Selected="true" xmlns="http://schema.oneoffixx.com/OneOffixxConnectBatch/1" id="0">
              <Person>
                <LastName>Mustermann</LastName>
                <FirstName>Max</FirstName>
                <Address>
                  <Street>Hauptstrasse 42</Street>
                  <City ZipCode="1337">Leethausen</City>
                </Address>
              </Person>
              <ExtendentFields>
                <Item Key="MovingDate">01.04.2019</Item>
                <Item Key="PreviousCity">München</Item>
              </ExtendentFields>
            </ContactItem>
         </ContactList>
      </Arguments>
    </Function>
  </Entries>
</OneOffixxConnectBatch>

Die beiden Daten werden unter ExtendentFields vermerkt. Der Schreibfehler hat sich in einer früheren Version eingeschlichen und muss aus Kompatibilitätsgründen beibehalten werden.

(plus) Vorteile: Daten sind unsichtbar, keine bestehenden Felder werden zweckentfremdet.

(minus) Nachteile: Das Verknüpfen der Felder in die Vorlage ist aufwendiger.

Extended Fields können nicht über "Inhalt verknüpfen" direkt eingefügt werden, sondern müssen über "Inhaltssteuerelement über Id einfügen" platziert werden. Dabei folgt das Naming der Regel, dass Extended Fields folgendes Präfix erhaltenThe two data are noted in ExtendentFields. The typo slipped in in a previous version and must be kept for compatibility.

(plus) Advantages: Data is invisible, no existing fields are misappropriated.

(minus) Disadvantages: Linking the fields into the template is more time-consuming.

Extended Fields cannot be inserted directly via "Link Content", but must be placed via "Insert Content Control via Id". Thereby the naming follows the rule that Extended Fields get the following prefix: Contact.Recipient.Selected.Spec.. Im untenstehenden Screenshot heisst das Feld Details und würde in der Connect-Datei entsprechend angegebenIn the screenshot below, the field is named Details and would be specified accordingly in the Connect file:

Code Block
languagexml
<ExtendentFields>
  <Item Key="Details">Text...</Item>
</ExtendentFields>

...