Providing custom tokens and templates for mailer documents
You can provide third-party mailer templates in the Document Manager so that users can easily create personalized documents for their contacts based on templates. For example, you can import third-party birthday mailer templates with matching criteria into a Document Manager folder so that users can select this folder to print personalized birthday messages for their contacts.
NexJ CRM supports the use of third-party mailer template tokens as custom tokens for merge fields.
Support for third-party mailer template tokens
Your users can create documents such as birthday mailers for contacts based on third-party mailer templates. You can map a third-party mailer template token to an existing NexJ CRM merge field by entering it as a custom token for the merge field. NexJ CRM then populates the same merge fields when a template containing either of the mapped tokens is used to batch print documents. You must enable the Birthday Mailer feature before you enter third-party mailer template tokens as custom tokens for merge fields. Merge fields are added and modified using the Document Codes page in NexJ Admin Console.
Mapped tokens
The following table shows sample third-party mailer template tokens that have been mapped to some of the NexJ CRM merge fields. At any time, you can change the third-party mailer template token mapped to a NexJ CRM merge field by editing the custom token entered for the merge field.
Third-party mailer template token name | NexJ token name | Description |
---|---|---|
LetterDate | now | Current date |
Company | company | Company name |
AddressName | fullNameTitleFirstLast | Title, first name, and last name |
Address1 | homeAddress address1 | Home address line 1 |
Address2 | homeAddress address2 | Home address line 2 |
Address3 | homeAddress address3 | Home address line 3 |
City | homeAddressCity | Home city |
State | homeAddressState | Home state |
Zip | homeAddressZip | Home ZIP code |
Salutation | dear | Salutation |
Birthday | birthdaySummaryString | Birthday: Month Day |
SignatoryLine1 | userFullNameFirstLast | User's first and last name |
SignatoryCredentials1 | userAffix | A name suffix for a user that provides additional information about a user; for example, their educational degree, such as PhD |
SignatoryTitle1 | userFullPosition | User's position and company |
SignatoryInitials | userInitials | User's initials |
SignatoryLastName1 | userLastName | User's last name |
SignatoryFirstName1 | userFirstName | User's first name |
Importing mailer templates
You can import mailer templates for Document Manager items in NexJ Admin Console. For example, you can import birthday mailer templates and matching criteria into a Document Manager folder so that users with appropriate privileges (BirthdayMailerView) can batch print birthday messages for contacts by selecting the folder.
This topic assumes you have a basic understanding of Scheme expressions and have access to your business model. All Scheme expressions are case sensitive.
Before you can import mailer templates, you must create a ZIP file that contains:
- A CSV file that includes a column for mailer template names, a column for the matching criteria for each template written as Scheme expressions, and a column for the user-friendly descriptions of the Scheme expressions in each row. The matching criteria enable NexJ CRM to find a template for each selected contact by matching contact attributes to template metadata when users initiate the batch print operation.
The following example Scheme expression matches female contacts who turn 50 years of age or older on their next birthday with a birthday mailer template:
CODE(and (= (@ genderCode value) (AdminGenderEnum'FEMALE)) (<= (@ birthTime) (date-add-years (date-shift (((invocation-context)'timeZone)'id) ((TimeZoneEnum'get 'EtcslashUTC)'shortCaption) (now)) -49)))
- All mailer template attachment files
The CSV file must not contain a row with headers.
The following image shows an example CSV file.
Also, you must create the folders in the Document Manager that will contain the imported templates. For more information about creating Document Manager folders, see "Managing Document Manager folders" in the end-user documentation.
To import mailer templates:
The mailer templates are imported into their Document Manager folders and a Document Manager item is created for each template listed in the CSV. Each of the items has a template attachment. When specified in the CSV, the matching criteria are displayed in the Matching Criteria column in the Document Manager data table for documents and the Edit Document dialog for the document in Document Manager.
If you want the Matching Criteria field to display user-friendly descriptions and not the actual Scheme expressions, ensure that you have included a user-friendly description for the matching criteria for each mailer template in the CSV.
If you want to make a change later to the matching criteria in the CSV file, you will have to delete the affected templates and then re-import the templates using your modified CSV file.