Portfolio
FZ-030Script · 2023

CRM → WooCommerce connector

Brings Gica Elettronica's management-system catalogue to the WooCommerce shop every two hours. Role-based prices, stock, categories and images, with no manual entry.

CRM → WooCommerce connector – Illustration: a spreadsheet synced with an online shop catalogue

The shop's management system exports its catalogue as a CSV. Getting it onto the online shop used to mean updating products, prices and quantities by hand. The connector does it on its own, every two hours on working days.

How it works

  1. Checks and downloads the CSV uploaded by the management system, only if it is there and the network is up.
  2. Reads the catalogue: drops the categories the shop does not sell, reads the prices for consumers, resellers and distributors, and maps each management-system category to the right WooCommerce one (over 300 mapping rules).
  3. Compares each product with the one already online, by SKU, and updates only those whose price or stock changed.
  4. Creates new products that are in stock and automatically looks for their photo with the image search. Out-of-stock products go back to draft.
  5. Sends a summary over Telegram and email.

It also carries over the flag for products to sell on Amazon, which a plugin then publishes to the marketplace (see Gica Elettronica).

How it evolved

It started as a Python script in a Docker container on cron. To speed it up I wrote a small WordPress plugin with a dedicated endpoint, about 10 times faster than WooCommerce's standard REST API. Then I converted the whole pipeline into a WordPress plugin (ACS Sync), with the category rules editable from the dashboard instead of in code.

Download the CV

Enter your name and email to download the CV.

The data provided is processed solely to record the CV request and, where appropriate, to follow up. Full notice: Privacy.

PDF, in Italian