Difference between revisions of "DataPort Utility"

From AbleCommerce Wiki
Jump to: navigation, search
(Downloading (Exporting) Data With DataPort)
Line 24: Line 24:
 
You can download (export) data from your store in CSV and XML formats. You can even download your complete store data in xml format
 
You can download (export) data from your store in CSV and XML formats. You can even download your complete store data in xml format
  
 +
=== Downloading in CSV format ===
  
 +
You can download your store data for Categories, Products, Orders and Users in CSV format. You can filter out and customize the data you want to export. Here is how you can export your data in CSV format:
 +
 +
# Select the link under “Customized Download” section for which you want to download your data. For Users, Products, and Orders the first screen is the customization options to filter out the data you want to export. Choose the options appropriate as either you want to download all data or selected data. The categories download have no such customization options available and each time all categories data will be downloaded (exported). Click “Next” after deciding which data you are downloading…
 +
# On the 2 nd screen for products, user and orders (first screen for categories download) you can select the export format. For Categories, Products and Users the options are CSV and XML. While for Orders export the options include “XML”, “CSV”, “UPS World Ship [only the orders shipped by UPS]”, “Quick Books 2002” and “Quick Books 2003 and up”. Choose the export format as you desire and select the output file and path where the exported data will be saved. After selection the export format and output file click next to next step.
 +
# If you have selected export format as CSV then the next step is to “Select or customize the export (download) template”. This step is a little bit tricky and complex and while using appropriate options you can end with a variety of results. You can select here the options regarding CSV export including i. what “Text Delimiter” and “Text Qualifier” will be used. Here you can map your data to your custom CSV headers and create Templates for your customization. For more details regarding the custom mapping and using templates see the next section “Custom Mapping and Templates”.
 +
 +
 +
===== Custom Mapping and Templates =====
 +
 +
When exporting data to CSV format or importing from CSV format you can map your CSV data headers to respective AbleCommerce object fields. This feature is specially useful when importing/exporting data for third party applications or from some other sources. You can also export data and then edit and re-import back and thus can batch edit your data. I explain this by the following example:
 +
 +
Lets suppose we want to export the CSV data for categories in following format for some custom feed etc.
 +
 +
—————————-
 +
 +
‘Category ID’, ‘Category Name’,’Category Parent Id’,’Summary’,’Details’,’Search Keywords’,’Visible’
 +
 +
‘1’,’Computers and Electronics’,’0’,’’,’Products related to computers and electronics’,’Computers and Electronics’,’1’
 +
 +
‘2’,’Modems’,’Different Modems’,’0’,’Best modems at cheap prices’,’Modems’,’0’
 +
 +
—————————-
 +
 +
The first line contains the CSV header fields while the rest contains the data. As we can see that the comma (,) is used as text delimiter and single quote (‘) character is used as text qualifier. Now click the "Categories" link under the "Customized Download" section. This will open Customized Categories Download screen. Select export format as CSV and choose the output destination file. Click next to go to next step for "Select and customize the export (download) template". Now on this screen select the "Manual Mapping" option. This will make the template editable. Change the "Text Qualifier" from double quote (") to single quote (‘). Now we just want to download information for only 6 fields i.e. Name, ParentId, Summary, Description, HtmlHead, and VisibilityId. and also we need this information under different CSV headers. i.e The Name field header should be output as ‘Category Name’, ParentId header should be like ‘Category Parent Id’ and so on…
 +
 +
There are a number of columns/fields in the template for which the information is not required. For example the and StoreId, ThumbnailUrl and some other fields are not required to be exported. The template grid is used to map the AbleCommerce fields to the columns in your CSV export sheet. To omit that un-necessary information from output double click the "StoreId" field under the "Your Export Sheet" column. This will select the text, press delete to remove and clear the text against the AbleCommerce Field "StoreId". Same way clear text for all of the un-necessary fields like ThumbnailUrl, ThumbnailAltText, DisplayPage etc. Data will not be exported for the AbleCommerce fields which will be un-mapped.
 +
 +
Now the next issue is that we need the "CategoryId" field exported as "Category ID", "Name" field exported "Category Name" and so on. We can change the CSV headers in same way above. To change "CategoryId" to "Category ID" double click the cell in "Your Export Sheet" against the AbleCommerce field "CategoryId" in templaate grid. The cell text will be selected, now type "Category ID" and replace the old text "CategoryId". Same way change the Your Export Sheet columns texts from "Name" to "Category Name", From "ParentId" to "Category Parent Id", From "Description" to "Details" and so on. The CSV headers will be exported as given in the Template Mapping grid.
 +
 +
Another important point is that the CSV columns will be exported in the order shown in template grid, i.e. the columns which appears first in the template grid will be exported first in the output file. According to our scenario the "Category Name" should be exported in 2nd column i.e. prior to the "Category Parent Id", while in the template grid it is currently shown after the "Category Parent Id". We can use the UP and DOWN arrows to move the columns up and down. To do this select the row for Parent Id field in template grid and click the DOWN arrow. This will move the ParentId column down and the Name column is shifted above.
 +
 +
All the customization is done. You can safely click the "Next" button to next screen and download your data in the required format. But it is better to save your customization for CSV template so that it can be used in future. To do this check the checkbox for "Save your mapping as a new template" option. This will enable file selection and saving options. Select the output file for template and click "Save" button. This will save all your customized mapping to an xml file. Next time whenever you need the same mapping use the "Use Custom Template" option instead "Use Manual Mapping" and your saved template will be loaded for you.
 +
 +
The same process of CSV export customization or saved Template can be used for CSV data import.
 +
 +
=== Downloading in XML format ===
 +
 +
You can download complete AC7 store data in xml format or can download data for any of store objects in xml format. You can also customize and filter the data for Products, Orders, Users and Categories while exporting (downloading). To export complete store in XML format click "Store Download AC7" under "Store Data" section. Select the "Complete Store" option and choose output file. Click "Download" link to start download. To download data for some particular objects choose "Selected Data" option instead and only check the checkboxes for objects you want to export (download).
 +
 +
To download customized data for Products, Users, Orders or Categories click the respective link under "Customized Download" section. For Users, Products, and Orders the first screen is the customization options to filter out the data you want to export. Choose the options appropriate as either you want to download all data or selected data. The categories download have no such customization options available and each time all categories data will be downloaded (exported). Click “Next” after deciding which data you are downloading…
 +
 +
On the 2 nd screen for products, user and orders (first screen for categories download) you can select the export format. For Categories, Products and Users the options are CSV and XML. While for Orders export the options include “XML”, “CSV”, “UPS World Ship [only the orders shipped by UPS]”, “Quick Books 2002” and “Quick Books 2003 and up”. Choose the XML export format and select the output file and path where the exported data will be saved. After selection the export format and output file click next to next step. Review the changes you have made on the next screen and click the "Download" button to start download. Upon successful completion the data will be saved in the selected output file
  
 
== Uploading (Importing) Data With DataPort ==
 
== Uploading (Importing) Data With DataPort ==

Revision as of 17:25, 19 June 2008

Installing DataPort

Download the latest version of DataPort. You can find the latest version at [TODO: Data_port_download_url]. After downloading unzip/extract the files. There will be two files:

  • The DataPort Installer (DataPort.msi)
  • The ClientApi dll file (CommerceBuilder.DataClient.Api.dll)

Run the installer to get DataPort installed on your system. The ClientApi DLL file should be deployed to /Bin folder of your AC7 store website. You can replace the existing file if it exists.


Connecting DataPort to AC7 Store(s)

To connect the DataPort to your store Run the DataPort and a “Store Administrator Login” dialog screen will be displayed. Click the “New Store” button to create a new connection setting. Now fill in the information as follows:

  • In the store name field enter any user friendly name for your store.
  • In the ”Service URL” field type the ClientAPI service url running on your website. The service Url may be something like: http://www.mywebsite.com/ClientApi/ClientApiService.ashx
  • Enter the user name and password for your store admin.

Click the “Connect” button to connect the DataPort to your store. A progress bar will be shown and after a successfully connection to store the login dialog will disappear. Now you can perform the various tasks related to data import and export.

If you feel any problems while connecting to store, please visit the forums for frequently asked questions and their answers. But before doing this first verify that your provided information in the login dialog is correct.

In case of multiple stores you can define settings for each store and this way you can switch stores easily.


Downloading (Exporting) Data With DataPort

You can download (export) data from your store in CSV and XML formats. You can even download your complete store data in xml format

Downloading in CSV format

You can download your store data for Categories, Products, Orders and Users in CSV format. You can filter out and customize the data you want to export. Here is how you can export your data in CSV format:

  1. Select the link under “Customized Download” section for which you want to download your data. For Users, Products, and Orders the first screen is the customization options to filter out the data you want to export. Choose the options appropriate as either you want to download all data or selected data. The categories download have no such customization options available and each time all categories data will be downloaded (exported). Click “Next” after deciding which data you are downloading…
  2. On the 2 nd screen for products, user and orders (first screen for categories download) you can select the export format. For Categories, Products and Users the options are CSV and XML. While for Orders export the options include “XML”, “CSV”, “UPS World Ship [only the orders shipped by UPS]”, “Quick Books 2002” and “Quick Books 2003 and up”. Choose the export format as you desire and select the output file and path where the exported data will be saved. After selection the export format and output file click next to next step.
  3. If you have selected export format as CSV then the next step is to “Select or customize the export (download) template”. This step is a little bit tricky and complex and while using appropriate options you can end with a variety of results. You can select here the options regarding CSV export including i. what “Text Delimiter” and “Text Qualifier” will be used. Here you can map your data to your custom CSV headers and create Templates for your customization. For more details regarding the custom mapping and using templates see the next section “Custom Mapping and Templates”.


Custom Mapping and Templates

When exporting data to CSV format or importing from CSV format you can map your CSV data headers to respective AbleCommerce object fields. This feature is specially useful when importing/exporting data for third party applications or from some other sources. You can also export data and then edit and re-import back and thus can batch edit your data. I explain this by the following example:

Lets suppose we want to export the CSV data for categories in following format for some custom feed etc.

—————————-

‘Category ID’, ‘Category Name’,’Category Parent Id’,’Summary’,’Details’,’Search Keywords’,’Visible’

‘1’,’Computers and Electronics’,’0’,’’,’Products related to computers and electronics’,’Computers and Electronics’,’1’

‘2’,’Modems’,’Different Modems’,’0’,’Best modems at cheap prices’,’Modems’,’0’

—————————-

The first line contains the CSV header fields while the rest contains the data. As we can see that the comma (,) is used as text delimiter and single quote (‘) character is used as text qualifier. Now click the "Categories" link under the "Customized Download" section. This will open Customized Categories Download screen. Select export format as CSV and choose the output destination file. Click next to go to next step for "Select and customize the export (download) template". Now on this screen select the "Manual Mapping" option. This will make the template editable. Change the "Text Qualifier" from double quote (") to single quote (‘). Now we just want to download information for only 6 fields i.e. Name, ParentId, Summary, Description, HtmlHead, and VisibilityId. and also we need this information under different CSV headers. i.e The Name field header should be output as ‘Category Name’, ParentId header should be like ‘Category Parent Id’ and so on…

There are a number of columns/fields in the template for which the information is not required. For example the and StoreId, ThumbnailUrl and some other fields are not required to be exported. The template grid is used to map the AbleCommerce fields to the columns in your CSV export sheet. To omit that un-necessary information from output double click the "StoreId" field under the "Your Export Sheet" column. This will select the text, press delete to remove and clear the text against the AbleCommerce Field "StoreId". Same way clear text for all of the un-necessary fields like ThumbnailUrl, ThumbnailAltText, DisplayPage etc. Data will not be exported for the AbleCommerce fields which will be un-mapped.

Now the next issue is that we need the "CategoryId" field exported as "Category ID", "Name" field exported "Category Name" and so on. We can change the CSV headers in same way above. To change "CategoryId" to "Category ID" double click the cell in "Your Export Sheet" against the AbleCommerce field "CategoryId" in templaate grid. The cell text will be selected, now type "Category ID" and replace the old text "CategoryId". Same way change the Your Export Sheet columns texts from "Name" to "Category Name", From "ParentId" to "Category Parent Id", From "Description" to "Details" and so on. The CSV headers will be exported as given in the Template Mapping grid.

Another important point is that the CSV columns will be exported in the order shown in template grid, i.e. the columns which appears first in the template grid will be exported first in the output file. According to our scenario the "Category Name" should be exported in 2nd column i.e. prior to the "Category Parent Id", while in the template grid it is currently shown after the "Category Parent Id". We can use the UP and DOWN arrows to move the columns up and down. To do this select the row for Parent Id field in template grid and click the DOWN arrow. This will move the ParentId column down and the Name column is shifted above.

All the customization is done. You can safely click the "Next" button to next screen and download your data in the required format. But it is better to save your customization for CSV template so that it can be used in future. To do this check the checkbox for "Save your mapping as a new template" option. This will enable file selection and saving options. Select the output file for template and click "Save" button. This will save all your customized mapping to an xml file. Next time whenever you need the same mapping use the "Use Custom Template" option instead "Use Manual Mapping" and your saved template will be loaded for you.

The same process of CSV export customization or saved Template can be used for CSV data import.

Downloading in XML format

You can download complete AC7 store data in xml format or can download data for any of store objects in xml format. You can also customize and filter the data for Products, Orders, Users and Categories while exporting (downloading). To export complete store in XML format click "Store Download AC7" under "Store Data" section. Select the "Complete Store" option and choose output file. Click "Download" link to start download. To download data for some particular objects choose "Selected Data" option instead and only check the checkboxes for objects you want to export (download).

To download customized data for Products, Users, Orders or Categories click the respective link under "Customized Download" section. For Users, Products, and Orders the first screen is the customization options to filter out the data you want to export. Choose the options appropriate as either you want to download all data or selected data. The categories download have no such customization options available and each time all categories data will be downloaded (exported). Click “Next” after deciding which data you are downloading…

On the 2 nd screen for products, user and orders (first screen for categories download) you can select the export format. For Categories, Products and Users the options are CSV and XML. While for Orders export the options include “XML”, “CSV”, “UPS World Ship [only the orders shipped by UPS]”, “Quick Books 2002” and “Quick Books 2003 and up”. Choose the XML export format and select the output file and path where the exported data will be saved. After selection the export format and output file click next to next step. Review the changes you have made on the next screen and click the "Download" button to start download. Upon successful completion the data will be saved in the selected output file

Uploading (Importing) Data With DataPort

DataPort Advanced Configuration