When would you like to export the data? To run a data export, we need a trigger event. Some examples of a trigger event are such as a failed delivery, when a driver leaves the depot, when freight isn't delivered and returned to the depot.
How often would you like to export the data? The data can be exported every few minutes, every hour, every second day, once a month or any other time frame you desire.
What data would you like to send? Consignment updates, proof of deliveries, extra charges, freight scans, photos, runsheets, equipment transactions or anything else Transvirtual tracks and records.
In what format would you like the data? Emailed, Printed, Remote FTP, SMS or Web Service API.
Who needs the data you are exporting? A customer, driver, agent, depot manager, accounts staff or manager. The choices are limitless.
A common example might be:
Trigger: A driver selects a 'check address' delivery issue against a consignment in the mobile application
Trigger Period: Check every 2 minutes
Data Required: Consignment Information
Export Framework: Generate an email
Export to: customerservice@yourcompany.com.
This means that every 2 minutes the system will send data for consignments whose status has changed to 'check address' since it last exported. It will email the details to customer service for them to follow up.
Now that we know that the trigger event is a Consignment Status, we can go to the EDI > Data Export > Consignments Status Updates page.
You will be presented with a page that shows all currently setup rules.
Click on the New Rule button and enter a name for the rule and select the Export Framework or method of sending that will be used.
Rule Name: Check Address Email
Export Framework: Email
Click on the Create button to create the rule.
This will now create a rule and it will be presented in the list on the left in orange. (Orange means the rule is disabled)
Once you select this rule, the right-hand side of the screen will be populated with the current configuration of this rule.
Configure the Trigger Period as required. Every 2 Minutes is the Default
Configure the Export Framework to email to the appropriate email address with subject and body.
Select the Export File Type and populate with the required fields
Click the Update button to save these settings.
Configure the Data Filter to "Status Name" "Equals" "Mobile - Check Address"
Go back up to the Rule Details and turn on "Perform a Test Export" and click . This will send a test email with the rules you have setup
Turn on "Enable Export" once ready and click Update to enable this rule.
The FTP export framework allows the transfer of data via an FTP or SFTP Connection.
FTP Server URL: The hostname of the FTP service (i.e. ftp.domain.com)
Username: Username for the service
Password: Password for the service
Port: Defaults for FTP is 21 & SFTP is 22.
FTP Folder: Path to the folder the data will be exported to. (i.e., "POD/photo/in")
Active Mode: By default, all data transfers are initiated with a PASV transfer, Tick this box to enable Active transfers.
SFTP: Tick this box if you require a Secure FTP connection
Update other configuration that have the same 'Server FTP URL': Tick this box if you would like to update other EDI Export rules that use the same FTP URL
The Email export framework allows the transfer of data via an Email. To configure the Email, you may require filling the following information. To do so, first select the Email in the export framework field and then click on Setting button to configure the information as describe below.
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 Customer/Agent contact type you would like to receive the email.
Email To: Enter one or more email addresses to send the email to.
Subject: Enter the Email Subject you require.
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.
You will need to change the name of the field between the "@" and the "." to be "Model" to look similar to the following;
This will enable the output of the field in the location you require on the page.
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;
}
The email body HTML is the same as the text-based email body above, but you have the ability to present the email in a much nicer format with images etc. You can still insert the same variable information into a HTML Email.
The Print export framework allows the printing of data to a printer configured in the software. Once selected, the Printer Name and Print Count become available below the export framework as shown below.
The SMS export framework allows the transfer of data via an SMS. To configure the SMS, you may require filling the following information. To do so, first select the SMS in the export framework field and then click on Setting button to configure the information as describe below.
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.
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;
You will need to change the name of the field between the "@" and the "." to be "Model" to look similar to the following;
This will enable the output of the field in the location you require on the page.
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.
The export file types within Transvirtual allows you to export your data in a customized output through a range of file types.
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
This guide will show you how to setup a file export using the CSV/Excel file type export. The fields required for setup of this file type depend on the EDI Category. Some are POD Only related.
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.
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.
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.
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.
CSV and Text when used enables you to send both CSV/Excel and XML/Json/Text/Other files when configured.
Configure CSV/Excel as above
Configure XML/Json/Text/Other as above
Select the Combined Basic and Advanced Files and click Update
This section will show you the available helper functions to display data in meaningful ways on your report.
Returns: String with replacement complete
Code: {ConsignmentTotalPallets(idConsignment)}
Returns: Number
Code: {ConsignmentTotalNonPallets(idConsignment)}
Returns: Number
Code: {TrimPad(string, length)}
Returns: "TEST "
Code: {TrimPadLeft(string, length, padValue)}
Returns: " TEST"
Code: {Max(str, length)}
Returns: " TESTIN"
Provides a time range an hour before and an hour have the tame passed in
Code: {HourRange(object dateTime)}
Returns: " 13:45-15:45"
This function enables you to split a string based on a character and return a specific element of that back
Code: {Split(String, Split Value, ReturnNumber)}
Example: {Split("this|is|a|test", string "|", 1)}
Returns: " this"
@Model.Date
That would output a string in the default culture date time string. For greater control, you could do the following:
@Model.DateDateTime which converts the string to a datetime object which then allows all .net functions such as @Model.DateDateTime.ToString(“dd/MM/yyyy”)
@Model.DateDateTimeUTC – same as above, but in place of the client time zone will be UTC time
@Model.EventLocationDateTime – same as above, but the timezone of the event. Only used if client has multi offices with different timezones.
Same for decimal, example @Model.Cubic would be a string, if we need to call .net functions, can convert to a decimal via:
@Model.CubicDecimal then allows things like @Model.CubicDecimal.ToString(“n3”) which would be converted to 3 decimal places with standard 1000 , format