Building Export Templates

IN THIS GUIDE

Overview
Template Details
Template Actions
Automatic Processing
Add Fields
Field Filters
Importing Templates from Other Stores
Exporting Data from Order Desk

Overview

The Export Template feature in Order Desk allows you to build your own customized csv (or txt) file. This can be useful for submitting orders and other information to third party vendors as well as for keeping more detailed records and creating custom reports.

To access the Export Templates page in your Order Desk store, click on Export Templates under the Settings menu in the left sidebar.

If you have already created any export templates, they'll be listed on the page with the option to create a new one at the bottom of the list.

If you haven't created any export templates yet, you'll be taken to the page where you can create a new template.

Before any information can be exported as a file from Order Desk, an Export Template must be created first. This template is necessary because Order Desk needs to know what information should be included in the exported file, including how each field should be named. As an example, where Order Desk calls a product SKU the "code", you may need to call it "SKU", "Item Code" or some other specific name. Setting up a template to your specifications ensures the data that is exported as a file will be laid out precisely how you need it, with each field matched to fit your requirements.

This guide will go over the details of setting up and using Export Templates in Order Desk.

Template Details

In the Template Details section, you will set up a few details specific to the export template you are creating, including:

  • The name of the template, so you can easily select it from a list of templates, if necessary
  • The name of the file that will be exported
  • The delimiter type of the file that will be exported, so it can be opened in and read by other apps or software
  • Any custom parameters for extra customization of the exported file, such as removing the title line, etc.

We'll go over each option in the Template Details section and what they mean here.

Name and File Name

Give each template you create a unique and easily identifiable Name, as you may need to select it from a list of templates later, depending on how many you make over time. You can also edit the default File Name if you need it to have a certain name, especially for third party vendors who will be receiving it. If you need to export a txt file instead of a csv file, update the File Name to use the .txt extension instead.

One Line Per - Order/Item

If any product fields are added to an export template, the file will need to be exported with  One Line Per Item. This allows for each product in an order with multiple items to be expanded out on separate lines. The product fields are the fields specifically about the item(s) in the order, such as the product name, the SKU, the weight, the price, etc. For more information, read through the Add Fields section of this guide.

When "Item" is selected, each separate item (product) in an order will get its own line in the exported file:

When "Order" is selected, the information for each separate order will be on its own line, and the product information from the orders won't be included:

Delimiter - Comma/Tab/Pipe/Semicolon

Choose the delimiter necessary for your file type, your vendor requirements or your software needs. Export templates are most often set up as a .csv file type with a comma as the delimiter, which is the default setting for each export template. If you aren't sure what file type you need, you can leave this setting alone.

As an example, this is a Comma Delimited csv export (a standard spreadsheet):

And this is a Tab Delimited txt export:

Custom Parameters

The Custom Parameters field in the Template Details section is for extra customization that some templates might require.

Use any of these parameters as needed. If using more than one, each parameter should be separated by a space.

Custom Parameter Description
NO-TITLE-LINE Skip the title line
CRLF Use Windows line endings (\r\n), the default is Unix (\n)
NO-BOM Skip the UTF-8 encoding characters placed at the front of the document
IS-8859-1 Convert the character encoding from UTF-8 to USO-8859-1
NO-WEEKEND Do not run the report on Saturday or Sunday, local store time
FORCE-QUOTES Put quotes around all fields regardless of whether they are actually required
MAX5K Override the 2000 order limit; export up to 5000 orders
EACH-LINE-TOTAL Order totals are shown on each line item when more than one item per order
COLUMN-NAME-FILTERING Run the filters against column names as well as field names


Inventory Location Match

The Inventory Location Match field allows you to set up a filter so that when running the export, only items that match that specific location will be exported. Any items from the orders selected for export that do not have this matching inventory location will not be included in the exported file.

The location is a field that can be set on the individual  inventory items:

Add Lines Per Order and Item

If your exported file needs to have multiple lines per order or item, select one of these options and add the field names to the box below to specify the data and the layout in which it should be exported. Separate columns with a comma. New lines will be created in the exported file for each new line added in this box.

As an example, this layout:

Would be exported like this:

Template Actions

When processing the export template, there are a few options for how to download or send the file. Any combination of these actions can be used.

1
If Download CSV File is selected, any time the export template is processed, it will automatically download directly to the computer where the request is made. 
2
If Send To Email is selected, put in the email address of the intended recipient. If you need to send to more than one email address, separate them by a comma. When the export template is processed, the file will be emailed to that address as an attachment. Additionally, if an Order Export Email Template has been created in your Order Desk store, you can choose which template to use from the dropdown that appears.

Tip: Order Export Email Templates can be created and customized from the  Templates page in Order Desk. If no template has been created, the template dropdown will not appear under the Send  To Email option in the Template Actions section, and the email sent to the recipient will use the default template. For more information on working with and customizing email templates, please refer to  this guide on working with code in Order Desk.
3
If Send To FTP is selected, the export will be sent through FTP to the server specified in the credentials section.

Automatic Processing

To automatically process the export template, select the Schedule, Folder and Start Date from the Automatic Processing section.

The Schedule can be set to Hourly, Four Times Daily, Twice Daily, Daily, Weekly or Monthly:

The template can run an export on any one folder. Click the Folder dropdown to choose from the folders in your Order Desk store.

The Start Date will default to the current time that the template is created. Edit this field to change the automatic processing to begin at a specified date and time.

Tip: To automatically process the export template, the template must be set to either email or send the exported file through FTP. If Download CSV is selected as the only option in the T emplate Actions section, the exported file will not be delivered. 

Add Fields

The Add Fields section is the main part of the export template. This is where each of the columns (or fields) of the template will be set up, determining what information from the orders will be exported in the file. 

To add a field to the export template, click on the field over on the right side of the page under Available Fields:

Then drag and drop the fields to rearrange them into the order you want the exported file to display the information:

Rename any titles necessary. For instance, if you need the Code field to say "SKU" or the Item Name to say "PRODUCT" on the exported file, you'll need to edit the Order Desk name for each:

The value field can typically be left alone except when combining data or customizing metadata, variations or checkout data information. As an example, if you need the Shipping First Name and Shipping Last Name to be in the same column, you can change {shipping_first_name} to {shipping_first_name shipping_last_name} and rename the title to "Shipping Name":

If you want to add metadata or variation fields to the template, select the appropriate field from the Available Fields, rename the title and adjust the value to match your variation or metadata. For example, you might have two variations, Size and Color, displayed like this on your product:

Choose Single Variation from the Available Fields for as many variations as you want to export, in this case, one for Size and one for Color. The title will be "Single Variation" and the value {variation_list|?}

Rename "Single Variation" to match your variations: "Size" and "Color".

Then adjust the "?" in the value field to match your variation exactly; this is how Order Desk knows which variation to include in the export template. Since the Size variation is "Size (Inch)", replace the ? with "Size (Inch)": {variation_list|Size (Inch)} (just adding "Size" won't pull in the variation data since the name is actually "Size (Inch)"), and for Color it will be {variation_list|Color}:

This is similar for Metadata and Checkout Data fields. The name or title of the field can be whatever you want it to be, but the value needs to match your exact data, for example: {metadata|shopify_vendor}, {checkout_data|gift_message} or {checkout_data|Gift Message}, depending on how the field is written out in the order itself.

Product Fields

The  Product Fields section under Available Fields is for including the specific details about any items in the order. If any of these fields are added to your export template, you must have your template set to be One Line Per Item. Because these details are about the item(s) in the order, when an order has more than one item in it, there will need to be multiple lines in the exported file to display these fields for each item.

Field Filters

For an overview of and instructions on how to work with the field filters in an export template, please refer to the  Export Template Field Filters guide.

Importing Templates from Other Stores

For instructions on how to copy export templates between stores, please refer to this guide.

Exporting Data from Order Desk

To use an export template for exporting data from Order Desk, you have a few options. Refer back to the Template Actions section of this guide for directions on how to set up your template to export as a download, sent to an email address and/or sent through an FTP connection. This determines the way the template will be delivered to you or to a third party when processed.

There are three main ways to export data from Order Desk. 

1
First, you can directly select the orders you need to export and click on Export Checked. From the dropdown list, choose the export template you created to process the export for those orders.

2

You can also export an entire folder by opening the folder and clicking directly on Export All Pages and choosing the export template you created.

3
Last, you can set up the template to be automatically processed. For instructions on how to do this, refer back to the Automatic Processing section of this guide.
Tip: If an export includes more than 2,000 records, it will be queued and completed by background services to prevent a timeout that would keep you waiting. When the full export is complete, the file will be processed as normal, unless set to download, in which case it will be emailed to the Order Desk Store Admin email on file. (This email address can be changed on your Store Settings Email page.) Additionally, if the export has more than 2,000 records, export rules will not be performed on the orders in the export. If you don't receive your file via email, please contact Order Desk support.

Still need help? Contact Us Contact Us