Shared EDI Export Concepts

Shared EDI Export Concepts

Shared EDI Export Concepts

Summary

Use this article to configure automated data exports from Transvirtual. This guide explains how to create export rules, select export methods, configure file formats, and set up automated triggers.

Overview

EDI Data Export allows you to send data automatically when specific events occur. You can export consignment updates, proof of deliveries, extra charges, freight scans, photos, runsheets, equipment transactions, or any other data tracked in Transvirtual.

Use this when:

     You need to send data to external systems automatically

     You want to notify stakeholders when specific events occur

     You need to integrate with accounting packages, customer systems, or other software

Before You Begin

Ensure the following prerequisites are met:

     User permissions to access Import/Export > Data Export

     Understanding of what trigger event you want to use

     Access to destination system (FTP credentials, email addresses, printer details, etc.)

     Knowledge of what data fields you need to export

Planning Your Export

Before creating an export rule, define your requirements:

Trigger Event

     What event should trigger the export? (e.g., failed delivery, driver leaves depot, consignment status change)

Frequency

     How often should the system check for new data? (every few minutes, hourly, daily, monthly)

Data Required

     What information needs to be sent? (consignment details, proof of delivery, charges, etc.) 

Delivery Method

     How should the data be sent? (email, FTP, printer, SMS, web service)

 

Recipients

     Who needs to receive this data? (customer, driver, agent, manager, accounts staff)

Example

     Trigger: Driver selects 'check address' delivery issue in mobile app

     Frequency: Check every 2 minutes

     Data: Consignment information

     Method: Email

     Recipient: customerservice@yourcompany.com

This configuration sends an email every 2 minutes containing details of consignments that changed to 'check address' status since the last export.

Create an Export Rule

Step 1: Navigate to Data Export

1.   Go to Import/Export > Data Export

2.   Select the appropriate category based on your trigger event (e.g., Consignment Status Updates, POD, Equipment Transactions)

3.   Review the list of existing export rules 

Step 2: Create New Rule

4.   Click New Rule

5.   Enter a descriptive name for the rule

6.   Select the Export Framework (method): FTP, Email, Printer, Webservice, Account Package, or SMS

7.   Click Create

The new rule appears in the list on the left in orange (disabled state). 

Step 3: Configure Export Settings

8.   Select the rule from the list

9.   Configure the Trigger Period (how often to check for new data)

10. Configure the Export Framework settings (see Export Framework section below)

11. Select the Export File Type and configure required fields (see Export File Types section below)

12. Click Update to save settings

Step 4: Set Data Filters

13. Configure the Data Filter to specify which records to export

14. Example: Set 'Status Name' 'Equals' 'Mobile - Check Address'

15. Click Update

Step 5: Test and Enable

16. In Rule Details, turn on 'Perform a Test Export'

17. Click Update

18. Verify the test export was received correctly

19. Turn on 'Enable Export'

20. Click Update to activate the rule

Export Frameworks

Transvirtual supports six export frameworks. Configuration settings vary by framework type.

FTP Export Framework

Transfers data via FTP or SFTP connection.

Configuration Steps:

1.   Select FTP in the Export Framework field

2.   Click the Settings button

3.   Enter the following information (typically provided by the FTP host):

 

   FTP Server URL: The hostname of the FTP service (e.g., ftp.domain.com)

   Username: Username for the service

   Password: Password for the service

   

Port: Default for FTP is 21, SFTP is 22

   

FTP Folder: Path to the destination folder (e.g., 'POD/photo/in')

   Active Mode: Tick to enable Active transfers (default is PASV)

   

SFTP: Tick to use Secure FTP connection

   

Update Other Configurations: Tick to update other export rules using the same FTP Server URL


Email Export Framework

Sends data via email. Configuration includes three sections: Details, Email Body, and HTML Body.


Details Section

     Send to Consignment Sender Email: Yes/No

     Send to Consignment Receiver Email: Yes/No

     Send to Consignment Creator: Yes/No

     Send to Customer/Assigned Agent Contact: Select the contact type to receive the email

     Email To: Enter one or more email addresses

     Subject: Enter the email subject

Info
 The Customer Contact emails will be based on what has been setup in the relevant Customer Card under the Contact Details Tab as shown below.
    
To navigate contact detail tab of customer, on TMS web portal, go to Transport > Configuration and Setup > Card Files, click on Customer tab and then double click on applicable customer, the customer detail will display. Now click on Contact Details as shown above.


Once done, click on Validate button to check the preview and click on Update button to save the changes. 

Email Body (Text)

The text-based email body can include variable information using Razor syntax. If you require a complicated email, don't hesitate to contact the support team to help you understand the syntax.

 

Field Insertion

1.   Right-click where you want to insert a field

2.   Select the required field from the menu

3.   Change the field reference to use 'Model' instead of the object name

Example: @consignmentStatus.ConsignmentNumber becomes @Model.ConsignmentNumber

List Insertion

1.   Right-click where you want to insert a list

2.   Go to the List menu and select the list type

3.   Add fields within the curly braces {}

4.   Use @Raw() to output plain text within the loop

 Example:

@foreach(var consignmentStatus in Model.ConsignmentStatusChange){

}

Now you need to insert the fields you wish to output within the listed loop, This is done within the "{}" brackets that was inserted above. Right click in there and select the fields required, so it looks similar to the following;
@foreach(var consignmentStatus in Model.ConsignmentStatusChange){
@consignmentStatus.ConsignmentNumber
@consignmentStatus.ConsignmentCurrentStatusDate
@consignmentStatus.ConsignmentCurrentStatus
}
Within the "{}" brackets if you would like to output text is must be done using a @Raw() command. An example follows;
@foreach(var consignmentStatus in Model.ConsignmentStatusChange){
@Raw("Consignment Number: ")@consignmentStatus.ConsignmentNumber
@Raw("Status Change Date: ")@consignmentStatus.ConsignmentCurrentStatusDate
@Raw("Status Value: ")@consignmentStatus.ConsignmentCurrentStatus
}
This would output
Consignment Number: CUSTA37157
Status Change Date: 1/09/2017 3:19 PM AEST
Status Value: Assigned
Click on the validate button to check and preview and click the update button to save your changes.

Email Body (HTML)

The HTML email body uses the same Razor syntax as the text body but allows richer formatting with images and styling.

After configuring the email body, click Validate to preview and Update to save changes.

             


Printer Export Framework

Sends data to a configured printer.

     Printer Name: Select the printer from the dropdown

     Print Count: Enter the number of copies to print

 


SMS Export Framework

Sends data via SMS.

Configuration Steps:

1.   Select SMS in the Export Framework field

2.   Click the Settings button

3.   Configure the following:

 

Field Description
  • Send to Consignment Sender Phone:  Yes/No

  • Send to Consignment Receive Phone:  Yes/No

  • Send to Customer Contact:  Select the contact type you require from the Customer Contact List

  • Mobile Number:  Enter a mobile number for the required contact

  • SMS Message:  SMS Message can be a simple text or can also include variable data.

There are 2 types of variable data that can be entered. This is handled using Razor Syntax, if you require a complicated SMS, don't hesitate to contact the support team to help you understand the syntax.

    1. Field Insertion

Right click in a location you need to enter a field. You will be presented with a menu to select fields. Find you field and select it and it will be presented like follows;

@consignmentStatus.ConsignmentNumber

You will need to change the name of the field between the "@" and the "." to be "Model" to look similar to the following;

@Model.ConsignmentNumber

This will enable the output of the field in the location you require on the page.

    1. List insertion

Right click in a location you need to output a list. You will be presented with a menu to select lists and fields. Go into the List menu and select the list type you would like to insert. It will display similar to the following.

@foreach(var consignmentStatus in Model.ConsignmentStatusChange){

}

Now you need to insert the fields you wish to output within the listed loop, This is done within the "{}" brackets that was inserted above. Right click in there and select the fields required, so it looks similar to the following;

@foreach(var consignmentStatus in Model.ConsignmentStatusChange){

@consignmentStatus.ConsignmentNumber

@consignmentStatus.ConsignmentCurrentStatusDate

@consignmentStatus.ConsignmentCurrentStatus

}

Within the "{}" brackets if you would like to output text is must be done using a @Raw() command. An example follows;

@foreach(var consignmentStatus in Model.ConsignmentStatusChange){

@Raw("Consignment Number: ")@consignmentStatus.ConsignmentNumber

@Raw("Status Change Date: ")@consignmentStatus.ConsignmentCurrentStatusDate

@Raw("Status Value: ")@consignmentStatus.ConsignmentCurrentStatus

}

This would output

  Consignment Number: CUSTA37157

  Status Change Date: 1/09/2017 3:19 PM AEST

  Status Value: Assigned

Click on the Validate button to check and preview and click on the Update button to save your changes.

Export File Types

Transvirtual supports multiple file types for data export. Choose the format that matches your destination system requirements.

There are currently 2 base export file types to perform your data export, follow each of the links to see an article on how to configure each of them.

  • XML/JSON/TEXT/Other

  • CSV/Excel

The 3rd option allows you to combine the 2-output type above into a single output

  • CSV and TEXT

CSV/Excel Export

Use for spreadsheet-compatible exports.

Configuration Fields:



  • Delimiter Char: This is the character that separates the fields within the row. This is commonly a comma.

  • CSV File Type:  Select Standard for CSV, Excel 2003 or Excel 2007.

  • Include Header Row:  Tick the box to include a header row.

  • Send PDF Report:  Send a PDF of the output file.

  • Send Consignment Image:  Tick the box to send an image of the consignment.

  • Send Signature Image: Tick the box to send a signature image.

  • Export POD Image Format:   Normal (PNG), Black & White, Group 4 Tiff, PDF.

  • File Name Format (POD Image):   POD image file name that is exported. [number] to display consignment number in file name [ddMMyyyy] to display day, month and year of file export [ddMMyyyyhhmmss] to display day, month, year, hour, min and sec of file export.

  • File name format:  XML (or other) file name that is exported. [ddMMyyyy] to display day, month and year of file export [ddMMyyyyhhmmss] to display day, month, year, hour, min and sec of file export.

  • File Extension Name:  The extension of the file type. Defaults to ".csv" can be changed to anything required.

  • Data to Export:  By default, a few common field names will be inserted in this field. The order of these is replicated in the output file. Left click to add a field to the output. You can re-order the fields by dragging the field that requires moving.

Once done the changes, click on the Update button to save your changes.


Advanced Formats XML/JSON/TEXT/Other Export

This guide will show you how to setup a file export using the XML/Json/Text/Other file type export. The fields required for setup of this file type depend on the EDI Category. Some are POD Only related.


  • Send PDF report: Yes/No. This is a PDF File of the below File Structure

  • Send consignment image:   Yes/No

  • Send signature image:  Yes/No

  • Export POD Image Format:  Normal (PNG), Black & White, Group 4 Tiff, PDF

  • File name format (POD Image):   POD image file name that is exported. [number] to display consignment number in file name [ddMMyyyy] to display day, month and year of file export [ddMMyyyyhhmmss] to display day, month, year, hour, min and sec of file export

  • File name format:  XML (or other) file name that is exported. [ddMMyyyy] to display day, month and year of file export [ddMMyyyyhhmmss] to display day, month, year, hour, min and sec of file export

  • File extension name:  The extension of the file type. Defaults to ".xml" can be changed to anything required

  • Strip out whitespace:  Yes/No

  • Strip out new line:  Yes/No

  • File Structure:  By default, an XML output is created to get you started, this can be modified as suits.

  1. Field Insertion

Right click in a location you need to enter a field. You will be presented with a menu to select fields. Find you field and select it and it will be presented like follows;

@consignmentStatus.ConsignmentNumber

You will need to change the name of the field between the "@" and the "." to be "Model" to look similar to the following;

@Model.ConsignmentNumber

This will enable the output of the field in the location you require on the page.

  1. List insertion

Right click in a location you need to output a list. You will be presented with a menu to select lists and fields. Go into the List menu and select the list type you would like to insert. It will display similar to the following;

@foreach(var pod in Model.PodData){

}

Now you need to insert the fields you wish to output within the listed loop, this is done within the "{}" brackets that was inserted above. Right click in there and select the fields required, so it looks similar to the following;

@foreach(var pod in Model.PodData){

@Raw("<Delivery>")

@Raw("<DeliveryTime>")@Model.ReceivedTime@Raw("</DeliveryTime>")

@Raw("<ReceivedBy>")@Model.ReceivedBy@Raw("</ReceivedBy>")

@Raw("<ConsignmentNumber>")@Model.ConsignmentNumber@Raw("</ConsignmentNumber>")

@Raw("</Delivery>")

}

Within the "{}" brackets if you would like to output text must be done using a @Raw() command. An example follows;

<root>

<DeliveryList>

@foreach(var pod in Model.PodData){

@Raw("<Delivery>")

@Raw("<DeliveryTime>")@Model.ReceivedTime@Raw("</DeliveryTime>")

@Raw("<ReceivedBy>")@Model.ReceivedBy@Raw("</ReceivedBy>")

@Raw("<ConsignmentNumber>")@Model.ConsignmentNumber@Raw("</ConsignmentNumber>")

@Raw("</Delivery>")

}

</DeliveryList>

</root>

This would output

<root>

<DeliveryList>

<Delivery>

<DeliveryTime>30/05/2016 11:53 AM AEST</DeliveryTime>

<ReceivedBy>David</ReceivedBy>

<ConsignmentNumber>DEM90241</ConsignmentNumber>

</Delivery>

</DeliveryList>

</root>

Click on the Validate button to check and preview and click on the Update button to save your changes.

Combined CSV and Text Export

Sends both CSV/Excel and XML/JSON/TEXT formats in a single export.

 

1.   Configure CSV/Excel settings as described above

2.   Configure XML/JSON/TEXT settings as described above

3.   Select 'CSV and Text' as the export file type

4.   Click Update

Invoice Export Rules

Invoice export rules allow you to split invoice data into different General Ledger codes and jobs when exporting to accounting packages (MYOB or Xero).

This feature enables more accurate categorisation by separating different price components (e.g., expenses vs income types) rather than sending all invoice data as a single entry.

Refer to the Invoices article for detailed configuration steps. 

Important: Ensure the Account or Job Code you link to is correct. Data will be sent to these codes in your accounting package. If you need help using Xero, or MYOB there are plenty of online articles, videos etc.


Advanced Helper Functions

Use these helper functions within your export file structure to format and manipulate data.

Replace Lookup

     Takes an input string and replaces Value1 with Value2 for each occurrence

     Code: {ReplaceLookup(input, [Value1|Value2])}

     Returns: String with replacement complete

 

Total Number of Pallets on a Consignment

     Code: {ConsignmentTotalPallets(idConsignment)}

     Returns: Number

 

Total Number of Non-Pallet Items on a Consignment

     Code: {ConsignmentTotalNonPallets(idConsignment)}

     Returns: Number

 

Trim or Pad String to Length (Right)

     Code: {TrimPad(string, length)}

     Returns: String trimmed or padded to specified length (e.g., 'TEST ')

 

Trim or Pad String to Length (Left)

     Code: {TrimPadLeft(string, length, padValue)}

     Returns: String trimmed or padded to specified length (e.g., ' TEST')

 

Max Width of String

     Truncates a string to maximum number of characters

     Code: {Max(str, length)}

     Returns: Truncated string (e.g., 'TESTIN')

 

Hour Range

     Provides a time range one hour before and one hour after the time passed in

     Code: {HourRange(object dateTime)}

     Returns: Time range (e.g., '13:45-15:45')

 

Split String

     Splits a string based on a character and returns a specific element

     Code: {Split(String, Split Value, ReturnNumber)}

     Example: {Split('this|is|a|test', string '|', 1)}

     Returns: 'this' (first element, zero-indexed)

 

Date Formatting

     @Model.Date - outputs date in default culture format

     @Model.DateDateTime - converts to datetime object for .NET functions (e.g., @Model.DateDateTime.ToString('dd/MM/yyyy'))

     @Model.DateDateTimeUTC - same as above but in UTC timezone instead of client timezone

     @Model.EventLocationDateTime - uses the timezone of the event location (for multi-office environments with different timezones)

 

Decimal Formatting

     @Model.Cubic - outputs as string

     @Model.CubicDecimal - converts to decimal object for .NET functions

     Example: @Model.CubicDecimal.ToString('n3') - formats to 3 decimal places with thousand separators

Common Issues & Troubleshooting

Issue: Export rule is not triggering

     Cause: Rule is disabled or data filter is too restrictive

     Resolution: Check that 'Enable Export' is turned on and review data filter settings

Issue: Test export fails

     Cause: Incorrect configuration in export framework or file type settings

     Resolution: Verify FTP credentials, email addresses, or other framework-specific settings. Check file structure syntax for XML/JSON exports

Issue: Razor syntax errors in email or file structure

     Cause: Incorrect field references or missing @Raw() commands

     Resolution: Ensure field references use 'Model' instead of object names. Use @Raw() for plain text output. Click Validate to check syntax before saving

Issue: Export sends duplicate data

     Cause: Trigger period is too frequent or data filter is not specific enough

     Resolution: Adjust trigger period. Refine data filters to exclude already-processed records

 

FAQs

Can I export to multiple email addresses?

Yes. In the Email Export Framework settings, enter multiple email addresses separated by commas in the 'Email To' field.

What is the minimum trigger period?

The minimum trigger period is every 2 minutes.

Can I combine multiple export frameworks in one rule?

No. Each export rule uses a single framework. Create separate rules if you need to send the same data via different methods.

How do I get help with complex Razor syntax?

Contact the support team for assistance with advanced Razor syntax configurations.

Can I export data in JSON format?

Yes. Use the XML/JSON/TEXT/Other export type and structure your file template as JSON using Razor syntax.

 

     Card Files



    • Related Articles

    • Shared EDI Import Concepts

      Shared Import Concepts The import framework within TransVirtual allows you to import your data in a number of ways. This framework will expand as technology develops. There are 6 import frameworks as below. Remote FTP TransVirtual Hosted FTP Server ...
    • Photos and Images Import (EDI)

      OVERVIEW In Transvirtual there is the ability to import photos and images and attach them to relevant consignments. This is done by creating an EDI (Electronic Data Interchange) Import rules in your account that can accept information via Email, FTP ...
    • Consignment Export (EDI)

      SUMMARY / PURPOSE Use this article to automatically export consignment data from Transvirtual using EDI rules. This guide explains how to send consignment details, labels, and documents to customers or external systems when consignments are created ...
    • Consignment Import (EDI)

      OVERVIEW Transvirtual provides the ability to create EDI (Electronic Data Interchange) Import rules that enable consignment creation without using the standard consignment creation page in the Transvirtual Web Portal. This feature is particularly ...
    • Scan Import (EDI)

      OVERVIEW In Transvirtual there is the ability to setup Scan EDI (Electronic Data Interchange) Import rules that can import scan data relating to consignments. These imports can be setup to receive information via FTP, Email, etc. This article will ...