Overview

Each import or export operation is defined by an descriptor, which specifies which data is targeted by the operation and which service must be used to execute the operation.

Descriptors are grouped into groups for convenience. For example import group may allow use of zip archive containing multiple files each of which can use a different descriptor in order to perform the import action.

You can perform import and export from the operations sections of Admin.

ImpEx operations

Import

Import process has the following steps:

  • Create new import task using import group of choice
  • Upload data file (or archive with data files), alternatively you can use a pre-uploaded file as well (use filter input or refresh button to see these files)
  • Click "Run"

During the operation execution detailed logging is provided in log window. At the end of the run the status of the import will be displayed.

  If uploaded file does not appear in the file list click refresh button to display latest list of files

  Successfully imported files automatically get moved to archive and will not appear in this list

yc-3.7.0-impex-manual-import.png

Export

Export process has the following steps:

  • Create new export task using export group of choice
  • Choose export file filename
  • Click run 

During the operation execution detailed logging is provided in log window. At the end of the run the status of the export will be displayed and a download button will appear to download the generated data export file.

  If exported file does not appear in the file list click refresh button to display latest list of files

  You can delete unwanted files by selecting them and click delete button in the file selection window

yc-3.7.0-impex-manual-export.png

Data groups

  Configuring data groups is a technical task, which will be performed by system administrator. Business user will only need to select appropriate data groups once they have been configured.

Configuration of data groups can be done from the System > Data Groups section of Admin app.

Data descriptors (System > Data Descriptors section) describe what data needs to be imported/exported and which service to use.

Descriptor typeDeclaration formatData formatPurposeVersion
WEBINF_XML/CSV (WEBINF_XML)XMLCSVGeneric descriptor defined in an XML file located in WebInf of Admin app (i.e. bundled with app and not editable) 
RAW_XML/CSV (RAWINF_XML)XMLCSVGeneric descriptor defined in an XML format directly in value field3.5.0+
WEBINF_XML/XMLXMLXMLGeneric descriptor defined in an XML file located in WebInf of Admin app (i.e. bundled with app and not editable)3.5.0+
RAW_XML/XMLXMLXMLGeneric descriptor defined in an XML format directly in value field3.5.0+

Data group (System > Data Groups section) group data descriptor(s). It is possible to limit access to specific data groups by using qualifier field. If set to shop code the group will be visible only to those admin users that have access to this shop. Therefore different setup can be applied depending the shop needs.

Data groups appear in the data group selector of either import or export wizard depending on configurations set in data group.

yc-3.7.0-impex-groups.png

Default ImpEx Configurations

Supported import groups

Group Descriptor Security Shop access required for Notes 
YC DEMO: Initial Data shopcurrencies-demo.xml, countrynames-demo.xml, statenames-demo.xml, carriernames.xml, carriershopnames-demo.xml, carrierslanames.xml, promotionnames.xml, promotioncouponnames.xml ROLE_SMADMIN  This is for data in env/sampledata/demo-data/yc/import/import.zip that contains basic countries and carries information so that we can complete checkout in demo store. 
YC DEMO: IceCat Catalog brandnames.xml, attributenames.xml, attributegroupnames.xml, producttypenames.xml, categorynames-demo.xml, shopcategory-demo.xml, productypeattributeviewgroupnames.xml, producttypeattrnames.xml, productnames-demo.xml, productsku-demo.xml, productsattributes-demo.xml, productskuattributes-demo.xml, skuinventory.xml, skuprices.xml, productcategorynames.xml ROLE_SMADMIN  This is a sample data kindly provided by IceCat (http://icecat.biz) and is located in env/sampledata/demo-data/icecat/import/import-EN,RU.zip with images for products in env/sampledata/demo-data/icecat/import/import-EN,RU-img.zip that contains an example catalog with product SKUs and attributes and also some made up inventory and price data. The shop categories are specifically set for SHOP10. This group also has some 'unsafe' fast insert descriptors (marked '-demo') that should not be used in production unless this is the first time data load and the data is clean. 
YC DEMO: Product images (IceCat) productimages.xml ROLE_SMADMIN  This is the same as regular product and SKU image import but separate directory starting with YC DEMO makes it explicit to "new" users. 
Catalog import (Categories and attribute definitions) brandnames.xml, attributenames.xml, attributegroupnames.xml, producttypenames.xml, categorynames.xml, shopcategory.xml, productypeattributeviewgroupnames.xml, producttypeattrnames.xml ROLE_SMSHOPADMIN, ROLE_SMMARKETINGADMIN or ROLE_SMADMIN  ROLE_SMSHOPADMIN, ROLE_SMMARKETINGADMIN Standard catalog definitions import group. If importing more than just categories then have to have ROLE_SMADMIN 
Product import (Products, SKUs and attributes) productandcategorynames.xml, productnames.xml, productcategorynames.delete.xml, productcategorynames.xml, productsku.xml, productsattributes.delete.all.xml, productsattributes.delete.xml, productsattributes.xml, productskuattributes.delete.all.xml, productskuattributes.delete.xml, productskuattributes.xml, productaccessories.delete.xml, productaccessories.xml ROLE_SMSHOPADMIN, ROLE_SMWAREHOUSEADMIN or ROLE_SMADMIN  ROLE_SMSHOPADMIN, ROLE_SMWAREHOUSEADMIN Product data only. If importing products without categories (productnames.csv, productsattributes.delete.all.csv or productskuattributes.delete.all.csv) need have to have ROLE_SMADMIN 
Inventory import skuinventory.xml ROLE_SMSHOPADMIN, ROLE_SMWAREHOUSEADMIN or ROLE_SMADMIN ROLE_SMSHOPADMIN, ROLE_SMWAREHOUSEADMIN Inventory only 
Prices and Promotions import skuprices.xml, promotionnames.xml, promotioncouponnames.xml ROLE_SMSHOPADMIN, ROLE_SMMARKETINGADMIN or ROLE_SMADMIN ROLE_SMSHOPADMIN, ROLE_SMMARKETINGADMIN Standard group for pricing 
Content import contentnames.xml ROLE_SMSHOPADMIN, ROLE_SMCONTENTADMIN or ROLE_SMADMIN ROLE_SMSHOPADMIN, ROLE_SMCONTENTADMIN Content only 
Shops and Warehouses shop.xml, warehouse.xml ROLE_SMADMIN  Shops and warehouses 
Images: Products and SKU productimages.xml ROLE_SMSHOPADMIN, ROLE_SMMARKETINGADMIN or ROLE_SMADMIN ROLE_SMSHOPADMIN, ROLE_SMMARKETINGADMIN Product and SKU images import 
Images: Category and Content categoryimages.xml ROLE_SMSHOPADMIN, ROLE_SMMARKETINGADMIN, ROLE_SMCONTENTADMIN or ROLE_SMADMIN ROLE_SMSHOPADMIN, ROLE_SMMARKETINGADMIN, ROLE_SMCONTENTADMIN Category and Content images import 
Images: Brands brandimages.xml ROLE_SMADMIN  Brand images import 
Images: Shop shopimages.xml ROLE_SMSHOPADMIN or ROLE_SMADMIN ROLE_SMSHOPADMIN Shop images 

  DEMO OOTB descriptors should not be used in production. They are blueprints for developers.

  This group break down shows different processes of business. So, for example "YC DEMO" groups represent initial data setup, Product import - recurring product updates, inventory and price feeds etc. All of these usually have different cycle periods and this layout is just our recommendation.

Images import

Images import are now triggered by import descriptors.

Main point on image import descriptors:

  • entity-type must be IMAGE
  • select-sql must be uri for image resolution (e.g. for Category it is /imgvault/category/)
  • file-name-mask must contain file mask for images

Example:

<import-descriptor xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:noNamespaceSchemaLocation="http://www.yes-cart.org/xstream/import-descriptor-1.0.0.xsd">

   <entity-type>IMAGE</entity-type>

   <import-file-descriptor>
       <file-encoding>UTF-8</file-encoding>
       <file-name-mask>^(.*)_([.[^_]]*)_[a-z](_[a-z]{2})?\.(jpe?g|png)$</file-name-mask>
       <ignore-first-line>false</ignore-first-line>
       <column-delimiter>;</column-delimiter>
       <text-qualifier>&quot;</text-qualifier>
   </import-file-descriptor>

   <select-sql>/imgvault/category/</select-sql>

   <import-columns>

       <column-descriptor>
           <column-index>0</column-index>
           <field-type>FIELD</field-type>
           <data-type>STRING</data-type>
           <name>description</name>
           <value-constant>This is a category/content image import</value-constant>
       </column-descriptor>

   </import-columns>

</import-descriptor>

Import file templates

  Columns E (everyday), S (system) and D (development) give a hint as to purpose for given descriptor

  • everyday descriptor are used for running your web shop (these are designed for business users)
  • system descriptor are used for configuring the system (these are designed for system administrators)
  • development descriptors are used for software development to ease process of creation of initial data for the system (these are designed for developers)
Import Descriptor Template Notes 
   Attribute group (e.g. SHOP, PRODUCT) attributegroupnames.xml attributegroupnames.csv 
   Attribute definitionsattributenames.xml attributenames.csvAttribute definitions are shared globally by all stores and hence are responsibility of system administrator 
   Product typeproducttypenames.xml producttypenames.csvProduct types are shared globally by all stores and hence are responsibility of system administrator 
   Product type attributes link producttypeattrnames.xml producttypeattrnames.csvProduct types are shared globally by all stores and hence are responsibility of system administrator 
   Product type attributes view groups productypeattributeviewgroupnames.xml productypeattributeviewgroupnames.csvProduct types are shared globally by all stores and hence are responsibility of system administrator 
   Brands images brandimages.xml   see table below Brands are shared globally by all stores and hence are responsibility of system administrator 
   Brandsbrandnames.xml brandnames.csvBrands are shared globally by all stores and hence are responsibility of system administrator 
   Category and Content images categoryimages.xml   see table below Categories import can be managed by business users if this category is linked to shop they have access to, otherwise managed by system administrator 
   Categorycategorynames.xml categorynames.csvCategories import can be managed by business users if this category is linked to shop they have access to, otherwise managed by system administrator 
   Contentcontentnames.xml contentnames.csvAll content is managed by business users 
   Product with category assignment productandcategorynames.xml productandcategorynames.csvCatalog management for business users 
   Product without category assignment productnames.xml productnames.csvProduct import can be managed by business users if this product category is linked to shop they have access to, otherwise managed by system administrator 
   Only Product category assignments productcategorynames.xml productcategorynames.csvCatalog management for system administrators 
   Delete Product category assignments productcategorynames.delete.xml    delete.productcategorynames.csv Use same template as for productcategorynames.csv but starting with delete. to remove category assignments 
   Product images productimages.xml   see table below Product import can be managed by business users if this product category is linked to shop they have access to, otherwise managed by system administrator 
   Product attribute values productsattributes.xml productsattributes.csvCatalog management for business users 
   Delete Product attribute values productsattributes.delete.xml    delete.productsattributes.csv Use same template as for productsattributes.csv but starting with delete. to remove individual product attribute 
   Delete ALL Product attribute values productsattributes.delete.all.xml    delete.all.productsattributes.csv Use same template as for productsattributes.csv but only need to specify product code once (only first column needed) 
   Product SKU productsku.xml productskunames.csvCatalog management for business users 
   Product SKU attribute values productskuattributes.xml productskuattributes.csvCatalog management for business users 
   Delete Product SKU attribute values productskuattributes.delete.xml    delete.productskuattributes.csv Use same template as for productskuattributes.csv but starting with delete. to remove individual product SKU attribute 
   Delete ALL Product SKU attribute values productskuattributes.delete.all.xml    delete.all.productskuattributes.csv Use same template as for productsattributes.csv but only need to specify product code once (only first column needed) 
   Product associations productaccessories.xml productaccessories.csvCatalog management for business users 
   Delete Product associations product accessories.delete.xml    delete.productaccessories.csv Use same template as for productaccessories.csv but starting with delete. to remove individual product associations 
   Product inventoryskuinventory.xml skuinventory.csvInventory management for business users 
   Product pricesskuprices.xml skuprices.csvPrice management for business users 
   Promotionpromotionnames.xml promotionnames.csvPromotions import for business users 
   Promotion coupons promotioncouponnames.xml promotioncouponnames.csvPromotions import for business users 
   Tax definition taxnames.xml taxnames.csvTax management for business users 
   Tax configuration taxconfignames.xml taxconfignames.csvTax management for business users 
   Shop instance shop.xml shopnames.csv 
   Shop category assignments shopcategory.xml shopcategorynames.csvCategory assignments can only be managed by system administrator 
   Shop images shopimages.xml   see table below  
   Shipping carriers carriernames.xml carriernames.csvNew carriers have no assignment to shop and hence can only be managed by system administrator, modifications however can be done by the business users 
   Shipping carrier to shop assignments carriershopnames.xml carriershopnames.csvThis is the linking of carriers and shops can only be updated by system administrator 
   Shipping configuration carrierslanames.xml carrierslanames.csvCarrier service layer agreement is the shipping method definition stating terms and conditions of the service as well as price 
   Countriescountrynames.xml countrynames.csvCountries information is shared globally by all stores and hence are responsibility of system administrator 
   Country statesstatenames.xml statenames.csvState information is shared globally by all stores and hence are responsibility of system administrator 
   Warehouse instance warehouse.xml warehousenames.csv 

Image import uses name patterns in order to resolve shop, category, content, brands, products or SKU they belong to

Entity Filename pattern Examples 
Shop [PREFIX]_[SHOP_CODE]_[a-z](_LOCALE).[jpe?g|png] If shop code is SHOP10 examples are:
myshopimage_SHOP10_a.jpg,
myshopimage_SHOP10_a.jpeg,
myshopimage_SHOP10_a.png,
myshopimage_SHOP10_a_en.jpg 
Category and Content [PREFIX]_[URI|GUID]_[a-z](_LOCALE).[jpe?g|png] If category/content URI is 'myuri' and guid 'ABC123' examples are:
myimage_myuri_a.png,
myimage_myuri_b_en.png,
myimage_ABC123_c_uk.png 
Brand [PREFIX]_[NAME|GUID]_[a-z](_LOCALE).[jpe?g|png] If brand name is 'Toshiba' and guid 'ABC123' examples are:
myimage_Toshiba_a.png,
myimage_Toshiba_b_en.png,
myimage_ABC123_c_uk.png 
Product or SKU [PREFIX]_[PRODUCTCODE|SKUCODE]_[a-z](_LOCALE).[jpe?g|png] If code is 'ABC123' examples are:
myimage_ABC123_a_uk.png,
myimage_ABC123_a_en.png,
myimage_ABC123_a_ru.png 

 

Tags:
Created by Denis Pavlov on 2019/11/09 12:43
    
YesCart.org © 2009 - 2020
v.1.0.0