Data inserts are specially formatted text strings that you can include in paragraph, letter, and internal message templates. Data inserts extract data from a work item or from the system. When correspondence is generated, XTRAC replaces each data insert with the extracted data.
You can use data insert codes to retrieve a customer’s name and address to personalize a letter. For example, you include the data insert ||D.address1||
in a letter template. When the letter is generated and if a value exists in the Address 1 field for the work item, XTRAC replaces the data insert code with the first line of the customer’s address.
The format for a data insert is ||Dcontrol.field->party:format||
The following table explains the syntax of a data insert statement:
Syntax Item |
Description |
D |
Indicates a data insert. D must be an uppercase character. Nothing else is case sensitive. |
control (Optional) |
Suppresses blank lines and spaces that result when specified fields don't have a value. !IF inserts data only if the field contains data. If no data exists and the data insert is immediately followed by a return character or a space, XTRAC parses out the empty field and the return character or space. See Blank Lines and Spaces.
XTRAC inserts the information in the second address line of the ORIG party if it exists. Otherwise, XTRAC does not insert anything. |
field (Required) |
Specifies the work item field from which XTRAC extracts data.
If field refers to a custom field (TSF), you must include that name.For example |
party (Optional) |
Specifies any legitimate party-type value.
The party-type value specifies which party’s data to use. If you omit this field value, the values are taken from the ORIG party. |
format (Optional) |
The data insert can have only one character. XTRAC truncates extra characters.
Two digits follow the decimal point, such as 34.56. No decimal is allowed and numerical values are rounded. 34.56 appears as 35.
Creates a date of 20-11-06.
Creates a date of 11/20/06. Date fields that are custom fields display in this format by default.
Creates a date of November 20, 2006.
Inserts a money amount with two decimal places ($15,385.59). No rounding of the cents occurs. |
If you specify an address insert that has a blank value in the work item, a blank line is inserted into the correspondence template.
For example:
||D.address1||
||D.address2||
||D.city||, ||D.state|| ||D.postal_code||
There is no value for address2 for the ORIG party, so the following lines are inserted into the correspondence:
31 Lois Lane
Metropolis, MA 12345
To avoid blank lines, use the !IF control for fields that might be blank. The character that immediately follows a data insert that uses the !IF control must be a return character.
||D.address1||
||D!IF.address2||
||D.city||, ||D.state|| ||D.postal_code||
The following lines are inserted into the correspondence:
31 Lois Lane
Metropolis, MA 12345
Although the !IF field works with all fields, it works best with the following fields:
You can also use the !IF option to suppress the blank space that follow a middle initial if the middle initial field is blank.
||D.first_name|| ||D!IF.middle_name|| ||D.last_name||
When you insert date, keep in mind the following tips:
You can use the following examples for common data inserts:
Data Insert |
Description |
|
Current date in the default format: |
|
First address line of the ORIG party: |
|
Second address line of the ORIG party if it exists. Otherwise, it does not insert anything. Use the !IF control to avoid creating a blank line in the template. |
|
City of the ORIG party: |
|
State of the ORIG party: |
|
Postal code of the ORIG party: |
|
Account number of the ORIG party: |
|
Value of the Fund custom field: |
|
Description associated with the value of the custom field: |
|
Phone number of the ORIG party in a format preset by the administrator: |
|
First address line of the BANK party type: |
|
ORIG party’s name, including the middle initial: |
XTRAC supports the following field codes:
Field Code |
Meaning |
account_number |
Account number. |
account_type |
Account type. For example, Retail, H&W, or FICL. |
address1 |
First line of the address. |
address2 |
Second line of the address. |
address3 |
Third line of the address. |
address4 |
Fourth line of the address. |
address5 |
Fifth line of the address. |
address6 |
Sixth line of the address. |
amount |
Transaction amount. |
cause |
Cause field value. |
cause_desc |
Description of the cause. |
city |
City. |
comm_type |
Communication type. |
comm_desc |
Description of the communication type. |
country |
Value of the country. For example, US. |
country_desc |
Description of the country. For example, United States. |
creation_date |
Date when the work item was created. |
cus_name |
Full name of the customer. |
date |
Current date. |
description |
Description. |
file_number |
Number of the work item. |
first_name |
First name of the customer. |
item_subtype |
Value of the Item subtype field. |
item_subtype_desc |
Description of the subtype. |
item_type |
Value of the Item type. |
item_type_desc |
Description of the item type. |
last_name |
Last name of the customer. |
memo |
Memo. |
middle_name |
Middle name of the customer. |
node |
Current node name. |
oper_id |
ID of the operator who generated the correspondence. |
oper_name |
Name of the operator who generated the correspondence. |
org_name |
Name of the customer organization. |
phone |
Telephone number of the customer. |
postal_code |
Zip code. |
priority |
Priority value. |
queue |
Work item’s current queue. |
ssn_tin |
Customer number. For example, SSN, TIN, or SIN. |
state |
State. |
status |
Status field value. |
status_desc |
Description of the status. |
sub_cause |
Value of the Subcause field. |
subcause_desc |
Description of the subcause. |
type_specific |
Value of the custom field. |
type_specific_desc |
Description of the custom field for value group data type only. |
Copyright © 2011-2014 XTRAC, LLC. All rights reserved.