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.
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.
Data groups
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 type | Declaration format | Data format | Purpose | Version |
---|---|---|---|---|
WEBINF_XML/CSV (WEBINF_XML) | XML | CSV | Generic 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) | XML | CSV | Generic descriptor defined in an XML format directly in value field | 3.5.0+ |
WEBINF_XML/XML | XML | XML | Generic 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/XML | XML | XML | Generic descriptor defined in an XML format directly in value field | 3.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.
Default ImpEx Configurations
Note that import and export groups can be added manually from the Admin panel using data descriptors and data group definitions. In versions 4.1.0+ it is also possible to download templates directly from Admin for each data groups, which includes sample file, descriptor configuration and readme instructions for each import and export file.
Default 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 |
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>"</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
- 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)
E | S | D | Import | Descriptor | Template | Notes |
---|---|---|---|---|---|---|
Attribute group (e.g. SHOP, PRODUCT) | attributegroupnames.xml | |||||
Attribute definitions | attributenames.xml | Attribute definitions are shared globally by all stores and hence are responsibility of system administrator | ||||
Product type | producttypenames.xml | Product types are shared globally by all stores and hence are responsibility of system administrator | ||||
Product typeattributes link | producttypeattrnames.xml | Product types are shared globally by all stores and hence are responsibility of system administrator | ||||
Product typeattributes view groups | productypeattributeviewgroupnames.xml | Product 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 | |||
Brands | brandnames.xml | Brands 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 | |||
Category | categorynames.xml | Categories import can be managed by business users if this category is linked to shop they have access to, otherwise managed by system administrator | ||||
Content | contentnames.xml | All content is managed by business users | ||||
Product with category assignment | productandcategorynames.xml | Catalog management for business users | ||||
Product without category assignment | productnames.xml | 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 | ||||
Only Productcategory assignments | productcategorynames.xml | Catalog management for system administrators | ||||
Delete Productcategory assignments | productcategorynames.delete.xml | delete.productcategorynames.csv | Use same template as for | 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 | Catalog management for business users | ||||
Delete Productattribute values | productsattributes.delete.xml | delete.productsattributes.csv | Use same template as for | but starting with delete.to remove individual product attribute|||
Delete ALL Productattribute values | productsattributes.delete.all.xml | delete.all.productsattributes.csv | Use same template as for | but only need to specify product code once (only first column needed)|||
Product SKU | productsku.xml | Catalog management for business users | ||||
Product SKU attribute values | productskuattributes.xml | Catalog management for business users | ||||
Delete Product SKU attribute values | productskuattributes.delete.xml | delete.productskuattributes.csv | Use same template as for | but starting with delete. to remove individual product SKU attribute|||
Delete ALL ProductSKU attribute values | productskuattributes.delete.all.xml | delete.all.productskuattributes.csv | Use same template as for | but only need to specify product code once (only first column needed)|||
Product associations | productaccessories.xml | Catalog management for business users | ||||
Delete Productassociations | product accessories.delete.xml | delete.productaccessories.csv | Use same template as for | but starting with delete.to remove individual product associations|||
Product inventory | skuinventory.xml | Inventory management for business users | ||||
Product prices | skuprices.xml | Price management for business users | ||||
Promotion | promotionnames.xml | Promotions import for business users | ||||
Promotion coupons | promotioncouponnames.xml | Promotions import for business users | ||||
Tax definition | taxnames.xml | Tax management for business users | ||||
Tax configuration | taxconfignames.xml | Tax management for business users | ||||
Shop instance | shop.xml | |||||
Shop category assignments | shopcategory.xml | Category assignments can only be managed by system administrator | ||||
Shop images | shopimages.xml | see table below | ||||
Shipping carriers | carriernames.xml | New 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 | This is the linking of carriers and shops can only be updated by system administrator | ||||
Shippingconfiguration | carrierslanames.xml | Carrier service layer agreement is the shipping method definition stating terms and conditions of the service as well as price | ||||
Countries | countrynames.xml | Countries information is shared globally by all stores and hence are responsibility of system administrator | ||||
Country states | statenames.xml | State information is shared globally by all stores and hence are responsibility of system administrator | ||||
Warehouse instance | warehouse.xml |
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 |