Part II: Correspondence > Data Inserts > Formats for Data Inserts

Data Inserts

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.

Formats for Data Inserts

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.

||D!IF.address2||

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.

||D.city||

If field refers to a custom field (TSF), you must include that name.For example,||D.type_specific->FUND||

party (Optional)

Specifies any legitimate party-type value.

||D.address1->BANK||

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)

One of the following formats:

  • SXX: The maximum number of characters that the insert can use.

    ||D.middle_name:S1||

The data insert can have only one character. XTRAC truncates extra characters.

  • FXX: The number of digits after the decimal point.

    ||D.amount:F2||

Two digits follow the decimal point, such as 34.56.

||D.amount:F0||

No decimal is allowed and numerical values are rounded. 34.56 appears as 35.

  • DD: The current date using the format DD-MM-YY.

    ||D.date:DD||

Creates a date of 20-11-06.

  • US: The current date using a U.S. format of MM/DD/YY.

    ||D.date:US||

Creates a date of 11/20/06. Date fields that are custom fields display in this format by default.

  • FD: The current date using a formal format of month DD, YYYY. This is the default date format if no format is specified.

    ||D.date|| or ||D.date:FD||

Creates a date of November 20, 2006.

  • $: The money format of $XX,XXX.XX.

    ||D.amount:$|| or ||D.type_specific->AAMT:$||

Inserts a money amount with two decimal places ($15,385.59). No rounding of the cents occurs.

Blank Lines and Spaces

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:

Sample Data Inserts

You can use the following examples for common data inserts:

Data Insert

Description

||D.date||

Current date in the default format:
October 27, 2006

||D.address1||

First address line of the ORIG party:
100 Main St.

||D!IF.address2||

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.

||D.city||

City of the ORIG party:
Boston

||D.state||

State of the ORIG party:
MA

||D.postal_code||

Postal code of the ORIG party:
02142

||D.account_number||

Account number of the ORIG party:
502710

||D.type_
specific->FUND||

Value of the Fund custom field:
314

||D.type_
specific_desc->FUND||

Description associated with the value of the custom field:
Fidelity Asset Manager

||D.phone||

Phone number of the ORIG party in a format preset by the administrator:
nnn-nnnn, (nnn)nnn-nnnn, or nnnn

||D.address1->OTHR||

First address line of the BANK party type:
205 First St.

||D.first_name|| ||D.middle_name:
S1||
||D.last_name||

ORIG party’s name, including the middle initial:
Alfred Stephen Smith displays as Alfred S Smith

Field Codes

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.