Create a File Specification template
- Outbound > Contact List > Add, Delete, Edit, View permissions
- Outbound > File Specification Template > Add, Delete, Edit, View permissions
To import column definitions from a contact list template:
- Outbound > Contact List Template > View permission
A sample file to upload in delimiter separated or fixed-length format that is encoded in UTF-8 format
Create a file specification template to use when you build your contact lists. A file specification template describes the format of the input file for the contact list that you build. You can use advanced preprocessing to modify input data when you create a file specification template. A file specification template allows you to upload your contact records in different file formats when you build contact lists.
The supported file formats include:
- Delimited formats .csv and .dsv
- Fixed Length formats .txt and .dat
Use the File Specification Templates tab to create a new file specification template and to display a list of your File Specification Templates.
Here’s how to create a file specification template.
- Click Admin.
- Under Outbound, click List Management.
- Click the File Specification Templates tab.
- Click Create New.
- In the File Specification Template Name box, enter a unique name. Names can contain spaces, numbers, and special characters, but must be unique.
- Optionally, describe the file specification template in the Description box.
Next, select the File Format for the input file to use when you create your contact list.
- In the File Format box, select Delimited.
- In the Delimiter Symbol box, select a delimiter. Delimiter options are: Comma, Colon, Semicolon, Tab, Pipe, or Custom. Select Custom to define a single character value in the Custom Delimiter box. Custom allows you to use a non-standard delimiter character, for example ^ and %.
- In the Skip Heading Lines box, enter the number of header records to skip before processing the input file. Enter a value greater than or equal to 0.
- In the Skip Trailing Lines box, enter the number of trailing records to skip at the end of the input file. Enter a value greater than or equal to 0.
- If you want to use the header row of the input file to define column names and not build the Input File Fields Definitions visually, switch the Use column names from file header toggle to Yes.
- If you want to visually build the Input File Fields Definitions, switch the Use column names from file header toggle to No. Visually building the input file fields definitions might be useful if you want better control over which columns of the input file import into the contact list.
Input File Fields Definitions
In the Input File Fields Definitions section, define the fields from your contact list input file to create your file specification template.
There are three ways to define the fields for the column definitions table. You can:
- Extract the column names from your sample input file to view your column names, when the file is in delimiter separated format and has a header row, and then complete the column definitions table.
- Extract the column names from the existing contact list template.
- Complete the table manually.
To extract the column names from your sample input file and complete the column definition table:
- In the Show sample rows from file box, select Browse, and then open your sample input file. The first three rows of your input file display.
- Select the Import Column Names button. You can now view the column names imported from your sample file in the column definitions table.
- You can now manually edit column names and definitions, as needed. Sample rows automatically adjust to show your changes.
- To add more column names to your table, select Create New and enter the name of the column from your input file in the Column Name box.
- To delete a column from your table, select the check box for the column to delete and click Delete.
- Use search to edit a column name for your file specification template. In the table Search box, enter the column name to change. Select the column, and then click Apply. Edit the column name in the row. Sample rows automatically adjust to show your update. To clear the search box, click Clear Filters.
- Specify the column number that you want to map to a particular column name. You can use some or all of the columns from the input file.
- To create your file specification template, click Save.
To extract the column names from an existing contact list template and complete the column definition table:
- In the Get column names from Contact List Template box, select the contact list template.
- Click the Import Column Names button. You can now view the column names from your contact list template in the column definitions table.
- Next, to see sample rows from your contact list input file, in the Show sample rows from file box, click Browse and open your input file. The first three rows of your input file display.
- You can now manually edit column names and definitions, as needed. Sample rows automatically adjust to show your changes.
- To add more column names to your table, click Create New and enter the name of the column from your input file in the Column Name box.
- To delete a column from your table, select the check box for the column to delete and click Delete.
- Use search to edit a column name for your file specification template. In the table Search box, enter the column name to change. Select the column, and then click Apply. Edit the column name in the row. Sample rows automatically adjust to show your update. To clear the search box, click Clear Filters.
- Specify the column number that you want to map to a particular column name. You can use some or all of the columns from the input file.
- To create your file specification template, click Save.
To enter the column names from your input file manually and complete the column definition table, follow these steps:
- Click Create New. A new row is added to your table.
- In the new row, enter the name of the column from your input file in the Column Name box.
- Specify the column number that you want to map to a particular column name. You can use some or all of the columns from the input file.
- To add more column names to your table, continue to click Create New and enter the name of the column from your input file in the Column Name box.
- To delete a column from your table, select the check box for the column to delete and click Delete.
- Use search to edit a column name for your file specification template. In the table Search box, enter the column name to change. Select the column, and then click Apply. Edit the column name in the row. Sample rows automatically adjust to show your update. To clear the search box, click Clear Filters.
- After adding your column names, to see sample rows from your contact list input file, in the Show sample rows from file box, click Browse and open your sample input file. The first three rows of your input file display.
- To create your file specification template, click Save.
- In the File Format box, select Fixed Length.
- In the Skip Heading Lines box, enter the number of header records to skip before processing the input file. Enter a value greater than or equal to 0.
- In the Skip Trailing Lines box, enter the number of trailing records to skip at the end of the input file. Enter a value greater than or equal to 0.
Input File Fields Definitions
In the Input File Fields Definitions section, define the fields from your contact list input file to create your file specification template.
There are two ways to define the fields for the column definitions table. You can:
- Extract the column names from the existing contact list template.
- Complete the table manually.
To extract the column names from an existing contact list template and complete the column definition table:
- In the Get column names from Contact List Template box, select the contact list template.
- Click the Import Column Names button. You can now view the column names from your contact list template in the column definitions table.
- Next, to see sample rows from your contact list input file, in the Show sample rows from file box, click Browse and open your input file. The first three rows of your input file display.
- You can now manually edit column names and definitions, as needed. Sample rows automatically adjust to show your changes.
- To add more column names to your table, click Create New and enter the name of the column from your input file in the Column Name box.
- To delete a column from your table, select the check box for the column to delete and click Delete.
- Use search to edit a column name for your file specification template. In the table Search box, enter the column name to change. Select the column, and then click Apply. Edit the column name and definitions in the row. Sample rows automatically adjust to show your update. To clear the search box, click Clear Filters.
- Specify the Start Position and Length for each column that you want to map.
- To create your file specification template, click Save.
To manually enter the column names from your input file and complete the column definition table, follow these steps:
- Click Create New. A new row is added to your table.
- In the new row, enter the name of the column from your input file in the Column Name box.
- Specify the Start Position and Length for each column that you want to map.
- To add more column names to your table, continue to click Create New and enter the name of the column from your input file in the Column Name box.
- To delete a column from your table, select the check box for the column to delete and click Delete.
- Use search to edit a column name for your file specification template. In the table Search box, enter the column name to change. Select the column, and then click Apply. Edit the column name and definitions in the row. Sample rows automatically adjust to show your update. To clear the search box, click Clear Filters.
- After adding your column names, to see sample rows from your contact list input file, in the Show sample rows from file box, click Browse and open your sample input file. The first three rows of your input file display.
- To create your file specification template, click Save.
Advanced input preprocessing
Create Advanced input preprocessing search and replace expressions for your file specification template that the system uses to upload data for your contact list. Preprocessing allows you to manipulate the input data before it is uploaded. Search and replace expressions are applied to each line of the input file before it is uploaded into the contact list.
To create search and replace expressions:
- Select Advanced, and then click Add New Expression.
- Enter a regular expression in the Search For box. Regular expressions can be a straightforward search for a specific word, a sequence of characters, or more complex patterns.
- To make the search case insensitive, toggle Ignore Case to Yes. The default No makes the search case sensitive.
- To replace every occurrence in the input line, toggle Global Replace to Yes. The default No only replaces the first found occurrence in the input line.
- Enter a replacement string in the Replace With box. The results of your search and replace are automatically shown in the Sample Rows. You can delete a string from your input data by leaving the Replace With box blank in your search.
- To add more search and replace expressions, click Add New Expression. The additional expressions are applied to the input file in the order in which they are created. You can add up to five search and replace expressions.
- To remove a search and replace expression, click the minus button in the upper right corner of the Search/Replace Expressions box.
- To create your file specification template, click Save.
One preprocessing search and replace expression can create a result that might be unintentionally manipulated by the next preprocessing expression. Always check the results when using multiple search and replace expressions in your file specification templates.
The following examples show what can be achieved when applying search and replace expressions.
Replace abbreviations with words in a delimiter-separated input file
Search For | Replace With | Ignore Case | Global Replace |
---|---|---|---|
Dr | Drive | No | No |
St | Street | No | No |
Ln | Lane | No | No |
Pl | Place | No | No |
Ct | Court | No | No |
Wy | Way | No | No |
Cir | Circle | No | No |
Replace abbreviations with words in a fixed length input file
To maintain the file structure for a fixed length input file, the search and replace expressions must be the same length. For example:
Search For | Replace With | Ignore Case | Global Replace |
---|---|---|---|
Dr\s{3} | Drive | No | No |
St\s{4} | Street | No | No |
Ln\s{2} | Lane | No | No |
Pl\s{3} | Place | No | No |
Ct\s{3} | Court | No | No |
Wy\s | Way | No | No |
Cir\s{3} | Circle | No | No |
Remove ND, RD, and TH in a delimiter-separated input file
This example shows how to remove the input text for addresses such as 19th Street
or 19TH Street
, and replace it with 19 Street
. The change is made only if there are numbers before the search string. Words such as second
and north
are not affected.
Search For | Replace With | Ignore Case | Global Replace |
---|---|---|---|
^(.*)([0-9]+)nd(.*)$ | $1$2$3 | Yes | No |
^(.*)([0-9]+)rd(.*)$ | $1$2$3 | Yes | No |
^(.*)([0-9]+)th(.*)$ | $1$2$3 | Yes | No |
Add fields to the end of a delimiter-separated input file
This example shows how to add the Campaign Name
as the last field to each record of the input file:
Search For | Replace With | Ignore Case | Global Replace |
---|---|---|---|
^(.*)$ | $1, Campaign Name | No | No |
Change inconsistent dates to consistent dates in a delimiter-separated input file
This example shows how to change inconsistent date fields in a delimiter-separated input file to a consistent uniform format of MM/DD/YYYY
. The example below contains dates with a single digit month, single digit day, or both, or a two digit month and two digit day, as in the third field of the input file example below.
phone,name,dob,userfield
+16504661100,John,1/22/1979,Other-1
+16504661101,Jane,12/3/1975,Other-2
+16504661102,Jake,3/4/1980,Other-3
+16504661103,Jacob,10/12/1973,Other-4
Search For | Replace With | Ignore Case | Global Replace |
---|---|---|---|
^([^,]*,[^,]*,)(\d)/(\d{2})(.*)$ | $10$2/$3$4 | No | No |
^([^,]*,[^,]*,)(\d{2})/(\d)(/.*)$ | $1$2/0$3$4 | No | No |
^([^,]*,[^,]*,)(\d)/(\d)(/.*)$ | $10$2/0$3$4 | No | No |
The Search For expression is written to operate over the third field in the comma-separated input file.