Part II: Correspondence > Paragraph Templates > Format for Conditional Paragraph Templates > Creating a Paragraph Template

Paragraph Templates

Paragraph templates let you create text that can be used in any other paragraph, letter, or internal message templates. You add paragraph insert codes into the applicable template. Then, when XTRAC generates the correspondence, it replaces the paragraph insert codes with the contents of the referenced paragraph templates.

For example, you might create a closing paragraph template that contains a telephone number and hours of business.

XTRAC also allows you to insert a paragraph template within a paragraph template.

Using paragraph templates can save you maintenance time. If you update the text in a paragraph template, other templates that contain a reference to the updated paragraph template will use the updated text the next time the correspondence is generated.

There are two kinds of paragraph templates that can be added to a letter template:

XTRAC supports a maximum size of 5 MB for each paragraph template. The number of paragraphs you can insert into a letter template is limited only by the maximum size of a letter template, which is 10 MB.

Paragraph types let you categorize paragraph templates. When XTRAC finds a paragraph type insert in a document, it evaluates the paragraph selection rules for that paragraph type and then inserts the paragraph that is defined for the rule. See Paragraph Selection Rulesand Paragraph Selection Rules

Creating a Paragraph Template

Note: To define a paragraph template, you need the Create, Update, and Paragraph Template security functions as part of the security group that is associated with your entitlement set.

To define a paragraph template

  1. In Feature Explorer, click Correspondence.
  2. Click Paragraph Templates.
  3. In the Paragraph Template Summary window, click New.
  4. In the Paragraph Template Detail window, in the Name field, enter a name for your paragraph template (up to 30 characters).

Do not use an asterisk as part of the name.

  1. In the Description field, enter a description for the paragraph template (up to 60 characters).
  2. (Optional) In the Paragraph Type drop-down list box, select the applicable paragraph type.

    XTRAC lists all of the paragraph types that are defined for your organization.
  3. Click Edit Template.
  4. Click Yes to save the template.
  5. In Microsoft Word, enter the text for the paragraph.

The text can include data inserts, paragraph templates, and variable or non-variable text.

  1. Click XTRAC > Save Template from Word.
  2. On the successful message, click OK.
  3. (Optional) In the Paragraph Template Detail window, in the Change Request ID field, enter the change request ID (up to 30 characters).
  4. (Optional) In the Memo field, enter the reason for creating the paragraph template.
  5. Click Save.

XTRAC saves the new paragraph template and adds it to the Paragraph Template Summary window.

Paragraph Templates in Other Templates

You can add paragraph insert codes into paragraph, letter, or internal message templates. When XTRAC generates the correspondence, the paragraph insert code is replaced with the contents of the paragraph template.

XTRAC supports up to six levels of nesting templates.

XTRAC considers the spelling and case of the words in the paragraph insert.

IMPORTANT: XTRAC Administration verifies data inserts and checks the existence of all paragraph templates. However, it does not assemble the paragraphs and does not know when you have reached the maximum of six nesting levels. You should always run your letters against your QA data to verify that they assemble correctly. Because data from a work item is not available in XTRAC Administration, this step is especially important if you use conditional paragraphs. XTRAC Work Manager displays an error if you have too many nested levels of paragraph templates.

The format of the paragraph insert code depends on whether you want to insert standard or conditional paragraph templates.

Format for Standard Paragraph Templates

Use the following format to insert a standard paragraph template:

||P.Paragraph Template Name||

For example, to insert a standard closing paragraph named New Accounts Closing Paragraph into a letter template, use the following paragraph insert code in the Microsoft Word letter template document:

||P.New Accounts Closing Paragraph||

Format for Conditional Paragraph Templates

Many possible combinations of paragraphs might be needed to create a letter in response to a customer. Rather than configuring separate correspondence templates for each combination of paragraphs, you can design a template that determines the paragraphs to include based on the value of a custom field in the work item.

See Paragraphs Based on Custom Field Values and Paragraphs with Template Names as Values

Paragraphs Based on Custom Field Values

Use the following format to insert a conditional paragraph insert that uses a custom field value to determine what paragraph to use:

||P.Paragraph Template Name.Custom Field Name=Custom Field Value||

For example, a work item contains a Language custom field with a group that contains two values: French and German. You can create two separate paragraph templates that open a customer letter: Opening French and Opening German. The letter template uses the following paragraph insert:

||P.Opening French.Language=French||

When an operator generates correspondence, XTRAC looks at the Language custom field in the work item. If the value is French, XTRAC inserts the Opening French paragraph into the correspondence. If a paragraph is not inserted, XTRAC deletes the return character following the paragraph so that no blank line occurs.

You can require specific conditional paragraphs by adding paragraph inserts for each of the possible values of the value group for the custom field. For example, you add paragraph inserts to the letter template for both French and German values:

||P.Opening French.Language=French||

||P.Opening German.Language=German||

When correspondence is generated, XTRAC looks at the Language custom field. If the value equals French, XTRAC inserts the Opening French paragraph into the correspondence. If the value equals German, XTRAC inserts the Opening German paragraph.

Paragraphs with Template Names as Values

Use the following format to insert a conditional paragraph that determines the paragraph to use based on the paragraph template name in a custom field value:

||C.paragraph=Custom Field Name||

For example, you define the following values for the Language custom field: Opening French, Opening German, and N/A. You then use the following format for the paragraph insert:

||C.paragraph=Language||

Based on the value that the operator selects for the Language field, the following actions occur:

Note: If the paragraph template value is not named and N/A is not specified, XTRAC assembles the correspondence. However, it inserts the following error string in place of the paragraph:

<<ERROR - Unable to retrieve paragraph ID>>

Copyright © 2011-2014 XTRAC, LLC. All rights reserved.