Mail Merge Specification: Technical Req'mts: Mail Merge Data Set
WORK IN PROGRESS
THIS PAGE IS WORK IN PROGRESS!
NOTE: Please refer to the Terminology for the exact definition of words and phrases!
Overview
The Mail Merge Data Set contains data that is determined at the time of Production of Mail-merged Documents (some data items may be calculated). That term describes the data for all the Partners that are to be processed in the Production of Mail-merged Documents (that is, 1..n instances of Partner Mail Merge Data).
Preface: 'Placeholders' for Data - Difference of Approaches in Petra 2.x and OpenPetra
In Petra 2.x, Placeholders (in the sense of the meaning for the Mail Merge implementation of OpenPetra) are differentiated into the following:
- 'Inserts' are what comes closest in Petra 2.x to what is meant with Placeholders in OpenPetra.
- See below for details!
- The Address of the recipient, the opening and closing Greetings, the date on the Form Letter, the 'Sender Name' and 'Closing Text' are all separate items that are not seen as 'Inserts'!
- In OpenPetra, all those items will be either Placeholders or simply static text that is contained in the Mail Merge Document (e.g. the Sender's Name and the Closing Text would most likely just be part of the Mail Merge Document).
Data for Inserts
Data For Inserts - (Petra 2.x)
There are two ways of how Inserts can be used in Petra 2.x:
- 'Same (identical) Inserts' for all Partners in a Mail Merge Run.
- Example: Suppose a letter contains 3 Inserts that are the same for all Partners (e.g. a standard invitation letter contains a date, a time and a place - all as Inserts).
- That means that the static data for each Insert is determined only once at the beginning Mail Merge Run and then substituted for the corresponding Insert - the same data for all Merged Documents.
- 'Different inserts' for each Partners in a Mail Merge Run.
- Example: Thank-you letter to donors, stating the Gifts received from each Donor in a given period. The list of received Gifts will be different for each Partner.
- That means that data that is specific for each Partner is determined for every Merged Document and that this data is substituted for the corresponding Insert - different data for every Merged Document.
The difference thus only lies in how the data that is substituted for the Inserts is created:
- the same data for all the Partners, or
- different data for each Partner.
Capturing of Data for Inserts
Petra 2.x provides two ways of capturing the data for Inserts:
- entering the data at the time the Mail Merge Run
- entering the data in advance of the Mail Merge Run
Storage of Data for Inserts
Once the data for Inserts of a particular combination of 'Form Letter Body + Extract + Partner Key' got captured (in one of the two ways described in the paragraph above) it is stored in the 'Form Letter Insert Table'. If the data is the same for all Partners in a Mail Merge run then the Partner Key is simply 0000000000, else it is the Partner Key of each Partner in the Mail Merge Run.
Data For Placeholders - (OpenPetra's Mail Merge Implementation)
In OpenPetra the same two options of how data that is substituted for the Inserts is created are to be made available:
- the same data for all the Partners, or
- different data for each Partner.
...but the capturing of Data for Placeholders will be different than in Petra 2.x.
'Capturing' of 'Data'
Same (Identical) Data
For places in the Mail Merge document where the same data for all the Partners should be used then that is seen as part of the Mail Merge Document and not part of the Mail Merge Data Set!
- That means that
- such data just needs to be included as ordinary plain text in the Mail Merge Document;
- no Placeholder must be put at its place in the Mail Merge Document;
- no data items need to be stored in the Mail Merge Data Set!
Different Data
For places in the Mail Merge document where data that is specific for each Partner needs to be determined for every Merged Document, data will need to be
- either captured (in one of the two ways described earlier) and stored (similar to the Petra 2.x approach);
- captured and not stored.
- In that case there
- is no need to keep that data in the OpenPetra DB after the Mail Merge Run;
- the data will only be available in it's inserted form (which may well differ from the raw data!) in the Merged Documents. If the OpenPetra Site wants to be able to look at it later they can do so only if they keep the Merged Documents.
- In that case there
TODO: A decision will be needed as to how the implementation is to be done, most likely involving Key Users!
TODO