Setting up product import from WiseXML to WooCommerce

WooCommerce connector supports product export and import. This article explains how to import products from WiseXML to your store.

WiseXML configuration

After you have logged in to your https://app.wisexml.com/ account, navigate to "Export profiles". Create an export profile with the filters and repricing rules for the products that you want to push to your WooCommerce platform. Configure export profile fields according to the following example:

WooCommerce export profile settings

Important: "Unique Product ID" must be set as "SKU" and "Output format" must be as "CSV/TXT".

 

Then navigate to the "Template" tab and add the required elements (they will be columns in the CSV file). The following columns are required:

Column name Description
SKU Product SKU
name Product name
price Product regular price
qty Product stock quantity
category_id Category ID in WooCommerce (after you map your categories)
group_id

Product group id (required only for configurable products)

media_gallery/filename

Product images

Please note: SKU should be a unique Product ID.

You can also add more columns to the export template:

Column name Description
description Product description
short_description Product short description (excerpt)
special_price Sale price
weight Weight in kg (decimal)
length Length in cm (decimal)
width Width in cm (decimal)
height Height in cm (decimal)
purchase_note A note sent to the customer after purchase
comment_status Allow reviews for product (allowed values: yes/no)
sold_individually Enable this to only allow one of this item to be bought in a single order (allowed values: yes/no)
virtual Virtual product – not shipped (allowed values: yes/no)
downloadable Downloadable product (allowed values: yes/no)
Attributes/{attribute_label} Product attribute. Multiple values are semicolon-separated.
Taxonomies/{taxonomy_slug} Import this field as custom taxonomy, for example, Brand
tags Comma separated tags

Your export profile template could look similar to this:

export-profile.jpg

After you are done customizing your template, click Save and go back to the export profiles list. Click the "Queue" icon to generate the export file (CSV):

On demand export

Once the status turns back to "Completed" - the export file should be ready (check the Export results in your export profile and compare this sample CSV file).

Congrats, now you have prepared export profiles in the WiseXML account.

Connector configuration

The following options are to be done on the WooCoomerce side after you have installed WiseXML connector.

Always make a backup of your existing store before making product imports/exports on LIVE website. The best practice is to perform testing on STAGING version of your site and then apply them on LIVE.

Having configured profile on WiseXML it's tme to connect it with Woocommerce. Navigate to WiseXML -> Import Profiles and click "New import profile" button on top of the page. Fill in profile title and configuration fields. 

Import profile settings

wise-wc-import-profile.jpg

  • Enable profile - enable / disable
  • Run time - CRON expression describing when the import is run
  • API Base URL - Url to WiseXML API (default: https://app.wisexml.com/api)
  • API Access token - access token for WiseXML API. You can get it in WiseXML section "Access tokens"
  • Export Profile - a list of available export profiles in WiseXML will be available here after you have checked the Access token with "Check connection" button (must match with settings in WiseXML export profile).
  • Import batch size - Import batch size determines maximum amount of imported products during one heartbeat.
  • Import batch time out (seconds) - maximum execution duration for single batch. If execution of a batch requires more time, pending products in batch are passed over to next batch.
  • Import mode - choose one of the import modes depending on how importer should behave.
  • Create new attributes - allow creating new product attributes in shop which are present in WiseXML Export profile.
  • Create attributes as taxonomies - select which attributes present in the export profile should be created as taxonomies. Check your Export profile for available attributes. Format: comma separated list of attribute slugs or * wildcard character for all attributes. In order to import WiseXML field as custom taxonomy this field column name must match taxonomy slug and should be inside "Taxonomies" group.
  • Variation attributes - select which attributes will be used for product variations. Format: comma separated list of attribute slugs.
  • Skip products without images - if enabled, new products without images will not be created.
  • Disable old products - sets the private status for products not present in the last import.
  • Skip products without images - products without images will not be created.
  • Remove unavailable imported products after a period of time - removes products not present in import after a specified time period.
  • Remove unavailable imported images after a period of time - removes product images not present in import after a specified time period.

Once all fields are filled click "Publish" button on top right corner of the page to create profile.

     
    Import batch size and time out

    Module imports a limited amount of products (batches) per single heartbeat. Batch size determines maximum amount of products per batch and batch time out limits maximum execution duration of a batch. Both settings act as measures to avoid overloading and possibly crashing website.

    Regarding batch size setting, It should be set to average amount of products server is capable to update (not create) per heartbeat.

    Regarding batch time out setting, our recommendation is to set it slightly lower than heartbeat execution interval. For instance, if heartbeat is set to run every 5 minutes, set batch time out to 4 minutes (240 seconds). If configured correctly, this setting keeps server load to the minimum by preventing from multiple batches running concurrently and allows website (server) to rest before next heartbeat.

    It is important to understand that batch size and time out values must be fine tuned based on server capabilities. If batch size is set too small - heartbeat will finish too soon and remain in resting state until next heartbeat. For instance, server is capable to create 20 products per 2 minutes, CRON heartbeat is executed every 2 minutes, but time out is set 1 minute. Such configuration results in only 10 created products per heartbeat (2 minutes). To find out optimal  settings, perform product import in development mode and check how fast products are created/updated in your shop. For details, check import task message log (click on the import task in Task Manager). Here you can check how long batches take to execute and if time out occurs. Keeping in mind that timeout should never exceed heartbeat execution interval based on the outcome do the following:  If time out constantly occurs, lower time out or batch size setting. On the other hand, if batches execute too fast, increase time out or batch size setting. 

     

    Import modes

    "Create new and update existing products". This mode will create new products and update existing products. Any manual product modifications will be overwritten.

    "Only create new products". This mode will only create new products.

    "Only update existing products".  This mode will only update already existing products.

    "Create new products/update prices and stock". This mode will only change the price and stock of the products. It will not change the pictures that you uploaded or any translations that you have made in your description.

    "Update only selected fields". This mode allows to update only selected product fields and attributes. New products will not be created when using this mode.

    woo-update-fields.jpg

    When this mode is selected, following fields will be configurable:

    • "Fields to update". Select which product fields to update.
    • "Attributes to update". Specify which product attributes to update. Multiple values must be separated with comma. To select all attributes type * character. Example values:
      • warranty,ean,supplier
      • ean
      • *
     
    Other settings in WiseXML →WiseXML settings

     

    "Deferred image thumbnail generation" (on / off). If products have large number of images import will run slow. Enabling this setting will defer image thumbnail generation for later making import faster. NOTE: As a consequence images will start appearing later after product is imported.

    "Skip thumbnail generation". Select which intermediate image sizes (thumbnails) are not needed. Make sure to select sizes which are not used anywhere in website pages. Use this setting only if you know what you're doing.

     

    Import Tasks

    Located in WiseXML → Tasks.

    Tasks are key elements in the WiseXML plugin. Import and export processes are encapsulated in tasks. Tasks allow monitoring processes and logging error messages.

    Features:

    • Profile (either import or export)
    • Ability to schedule based on CRON expression

    • State message - a message describing task result

    • Messages - list of messages logged during the task process

    • State indicator (SUCCESS, ERROR, SCHEDULED, etc.)

    • Created at / Scheduled at / Executed at / finished at date indicators

    • Duration of process

    •