Orders Exports With Volusion API
Volusion’s API is a powerful tool that enables both Volusion users and developers to easily integrate Volusion with third-party web services and applications. Volusion already provides API integration with various providers, including Quickbooks, StoneEdge, and Endicia. On top of that, Volusion provides easy access for developers to create their own custom XML exports, allowing you to extend Volusion’s functionality and integrate it with other third-party software and services.
Accessing the Orders Export
To export the Volusion Orders table via XML, do the following:
- In your Admin Area, go to Inventory > Volusion API.
- To access the settings for an export, click Run next to the Generic\Products heading.
Generating the Export
There are a few things users must keep in mind when using Volusion’s Orders Export:
- When users run exports, the export will only output up to 100 records at one given time. The export will begin with the very first element in the database and export every element up to the 100th element (e.g. the Orders Export will export products from Order ID 1000 to 1099).
- Users with many elements in their database will be required to run multiple exports in order to export every element within the database (e.g. users will need to first generate an export for Order IDs 1000-1099 and will then need to generate a second export if they also require one for Order IDs 2000-2099).
- Once an export has been generated, Volusion assigns it a time-stamp. That export can only be generated once unless the user resets the export event. This process is described below.
The Generic Export pages consist of two main elements that users will interact with – the Export Tool Bar and the Export Table.
The Export Table consists of four columns described below:
- Column Name: The items listed in this column are the names of the database values that can be exported from the Volusion store database. They are referred to in the export by the names given for each field here.
- SqlDbType: These are the data types of entities found in Column Name.
- SELECT_Columns: Checking a box in this column will set the corresponding database field in Column Name to be exported.
- WHERE_Value: Users can set a value in this field to instruct the API to export only values for the corresponding Column Name. Note: If used, this field must have an explicit value (e.g. 123, ABC). Users cannot set value ranges or operators such as ‘<’ or ‘>’ in this field.
The Export Tool Bar consists of three elements:
- Select Date: This drop-down allows users to select which export they wish to reset. All exports are assigned a time stamp which lists the date and time the export was generated.
- IDs: Once a time stamp from the Select Date field is chosen, this drop-down will be populated. The IDs drop-down will contain ID numbers for each primary key element that was exported on the date that the user has chosen. For example, within the Orders export, these IDs will be the Order ID number for each order in the export. Users can select one ID to reset or the ALL IDs value to reset all IDs within the selected export.
- Reset Export: This button will execute the export reset.
Using the Export
Some users may wish to have a list of their store’s orders exported via XML – possibly to view what orders have been generated within a particular time frame or to enter their customer’s data into another database outside of Volusion’s. In this case, the user may wish to export their orders' ID numbers and their payment. The following instructions will explain how to do this:
- First, log into the Volusion Administration Page. Click on the Inventory tab and then click on the Import/Export link within in the green menu bar. Users should now be on the Data Import/Export Tools page.
- Click on the Volusion API link on that page. Within the main Volusion API page, click the Run button next to the Generic\Orders heading. Users should now see the Generic Orders Export table.
- In the select column, check the boxes relating to o.OrderID and o.PaymentAmount.
- Click the Run button just below the Export Tool Bar to run the export.
Once this process is complete, the API page will refresh. Below the Export Tool Bar, there now should be a link labeled, "Click Here to download the file". Clicking on this link will load the now-generated XML file into a new window or tab within the web browser. Alternately, below this link is a text field that contains the URL for the XML. Users can copy this URL and use it link to this XML export from within 3rd party services or programs.
Once users click the link to download the XML file, it invalidates the URL presented in the text box. Users who have already downloaded the XML file will need to reset and the regenerate the XML export to gain valid access to the URL.
For further information on how to implement exports using various types of web scripting languages, please review API Integration: Sample Code (Developer).
Fields Exported in the Generic Orders Export
The Generic Orders export within the Volusion API can export values from any field within the Volusion Orders and Order Details tables. These are the same values that can be imported/exported using other import/export method within Volusion. Note that the Orders and Order Details tables are joined together within the Volusion database and as such, values from both fields can be exported (delineated by “o.” for orders and “od.” for orders details). Fields that also correspond to the TrackingNumbers table are indicated by "tn". A list of these fields are as follows: