Import products automatically with import sets

Import sets search your shops by keyword and category, filter the results and import all matching products automatically – and keep them up to date.

An import set is a saved product search that runs by itself. You define the shops, categories and keywords – for example "espresso machine" in your AWIN feeds – and affiliate-toolkit imports every matching product in the background, assigns category and custom fields and removes products that are no longer available. Ideal for large niche sites with hundreds of products.

Prerequisites: affiliate-toolkit with the Import Sets module (included in the passes), at least one connected shop and a working cronjob (see Set up the cronjob for product updates).

1. Define the product source

Go to affiliate-toolkit → Importsets → Add New Importset and give it a title (only used internally). In the box Product source search:

  • Shop(s) – at least one shop is required; you can combine as many as you like. Shops with an API take longer than CSV or AWIN feeds.
  • Category(s) – optional: restrict the search to categories of the shop.
  • Keyword(s) – one keyword per line; each line becomes its own search request.
  • Maximum product count – optional upper limit of products from the source. Most APIs deliver 10 products per request.
An import set searching the AWIN feeds for three keywords with a maximum product count and the statistics per search request.
An import set searching the AWIN feeds for three keywords, with statistics per search request.

After saving, the table below shows one row per combination of shop, category and keyword: total products found, products already pre-imported, the speed in products per minute and a message. "stopped because maximum pages reached" means the search is complete or the shop's page limit was reached – Amazon, for example, delivers at most 10 pages of 10 products, so 100 products per search.

The products are first collected in a separate table ("pre-import"). They only become real affiliate-toolkit products when the import set is published.

2. Filter the results

In Filter products from product source you narrow down the pre-imported products with rules – for example title contains "Barista" AND brand equals "Kaffeewerk". Combine rules with AND/OR and group them as needed. Below the rules you see a preview of the matching rows.

The rule-based filter of the import set and a preview of the pre-imported products.
The rule-based filter with a preview of the pre-imported products.

The preview reflects a changed filter after you save the import set again.

3. Set the product properties

  • Product status – Draft, Publish or, with the WooCommerce Connector, WooCommerce product.
  • Move products which are not included in the current import set to the trash – keeps your catalogue clean when products disappear from the source.
  • After successful import the plugin is deleting the data from the importset table – empties the pre-import table afterwards; useful if your database is limited.
  • After successful import the plugin is moving the importset to trash – for one-off imports. Otherwise the import set runs again regularly.
  • If you select this option the import set (product import) will be add to the next queue – processes the import set with the next cronjob run instead of waiting for the cache to expire.

In Custom fields and taxonomies you set default values that every imported product receives. Fields that belong to a product category appear as soon as you select that category.

Default status for new products, clean-up options and default values for custom fields.
Product status, clean-up options and default values for custom fields.

4. Publish and monitor

Publish the import set. The cronjob first pre-imports the products, then creates them as affiliate-toolkit products. The overview under Importsets shows the status and the number of imported products of every import set.

The list of import sets with status and number of imported products.
The list of import sets with status and number of imported products.

If nothing happens, check the cronjob first – import sets are processed only by the cronjob.