Bring recipient-specific data into the document invisibly for users
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.
<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>Doe</LastName>
<FirstName>John</FirstName>
<SalutationShort>Mr.</SalutationShort>
<Salutation>Dear Mr. Doe</Salutation>
<!-- Birthday misappropriated for MovingDate -->
<Birthday>01.04.2019</Birthday>
<!-- NickName misappropriated for PreviousCity -->
<NickName>München</NickName>
<Address>
<Street>Main Street 42</Street>
<City ZipCode="1337">Leethausen</City>
</Address>
</Person>
</ContactItem>
</ContactList>
</Arguments>
</Function>
</Entries>
</OneOffixxConnectBatch>
Advantages: Existing fields are used, no further customization needed.
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
.
<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>
The two data are noted in ExtendentFields. The typo slipped in in a previous version and must be kept for compatibility.
Advantages: Data is invisible, no existing fields are misappropriated.
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.. In the screenshot below, the field is named Details and would be specified accordingly in the Connect file:
<ExtendentFields>
<Item Key="Details">Text...</Item>
</ExtendentFields>
Â
PrimeSoft AG, Bahnhofstrasse 4, 8360 Eschlikon, Switzerland