File Export Definitions

Prev Next

The File Export Definition object defines the data used to generate a CSV File. The File Export Definition is comprised of the Header Record Export Definition and the Data Record Export Definition. Together, they are used to create the CSV File that is generated during the Automated Customer Invoicing Process.

File Export Definitions

Create a CSV file export definition on the File Export Definitions tab or search in the App Launcher. This feature is available to generate Customer Invoice Export files in a CSV format.

The Customer Invoice Export File is made up of records for the following objects.

  • Loads

  • Stops

  • Line Items

  • Customer Invoices

Create a File Export Definition once the necessary information to include in the CSV file is determined.

  1. Click New on the File Export Definition list view.

  2. Select CSV as the File Type.

  3. The File Generator Class field default value is FileExportGenerator. If set to blank, the TMS uses the FileExportGenerator class. A custom class that generates the file for this file export definition may also be created and used.

  4. Query Fields, if you would like to include any fields on the Load record that are lookup fields, use the field API name + record name and enter here.

Create the Header Export Definition.

The Header Export Definition determines the column headers in the CSV file. For each column header in the file that is created and exported, one CSV Field Export Definition must be created.

  1. Click New on the CSV Record Export Definitions related list.

  2. The Record Type is Header.

  3. Enter the Sequence Number as 1.

  4. The Record Format is Fixed Length.

  5. The Field Separator is a ,.

Create the Field Export Definitions for the Header CSV Record Export Definition.

  1. Open the Header Record Export Definition.

  2. Click New on the CSV Field Export Definitions related list.

  3. Enter the following and repeat for each header column.

    1. The File Type field is CSV.

    2. The Sequence Number field starts with 1. set in sequential order of the columns in the CSV file.

    3. The Default Value field is entered as the column header as it displays in the CSV file.

    4. The Data Type field is the data type of the corresponding field.

Create the Data Record Export Definition.

The Data Record Export Definition will be used to enter the actual data in the CSV File.

  1. Click New on the CSV Record Export Definitions related list.

  2. The Record Type is Data.

  3. Enter the Sequence Number as 2.

  4. The Record Format is Variable Length.

  5. The Field Separator is a ,.

Create the Field Export Definitions for the Data CSV Record Export Definition.

For each data column in the file to be created and exported, create one CSV Field Export Definition.

  1. Open the Data Record Export Definition.

  2. Click New on the CSV Field Export Definitions related list.

  3. Enter the following and repeat for each field included in the CSV File

    1. The File Type field is CSV.

    2. The Sequence Number field starts with 1. Number sequential order of the columns to display in the CSV file. This order matches the Header columns entered in the step above.

    3. The Default Value field is left blank. The data from the record is entered.

    4. Select the Data Type of the corresponding field.

      1. If Date is selected, the default output is YYYY/MM/DD. Enter the Date Type Format as desired to see the Date in the CSV File. For example, enter MM/DD/YYYY.

    5. Enter the object API for the field referenced as the Reference Object field.

      1. For example, rtms__Load__c.

      2. Since rtms__LineItem__c is a child object, enter the Object in the Child Relationship Name, too.

    6. Enter the field API name in the Reference Field.

      1. For example, rtms__PO_Number__c, rtms__First_Stop__r.rtms__Location_Name__c, rtms__First_Stop__r.rtms__State_Index__c.

    7. Enter the object API name if the object is a child of the Load in the Child Relationship Name field.

    8. Check the Multi-row checkbox if the field is part of a child relationship in the query with potential multiple records for the parent record. Line Items are an example of this relationship.

Relate the Export File Definition to the Customer.

  1. From the Customer Transportation Profile, search and select the Export File Definition in the Customer Invoice Export File field.