Tecnolife: online store and ERP in sync
A custom link between a medical supplies company’s online store and its ERP.
Every night, 1,623 products stay in sync on their own: prices, discounts, images and data sheets.
- My role
- IT consultant and sole developer of the plugin
- Duration
- Since March 2024, ongoing
- Industry
- Medical and emergency supplies
One night of synchronization
- Step 1The ERP remains the single source of data
- Step 2The plugin reads items, price lists and categories
- Step 3It updates only what has changed
- Step 4It links images and data sheets
- Step 5If something stalls, it alerts right away
The context
Tecnolife is a company based in Casalecchio di Reno, near Bologna, supplying the healthcare and emergency sectors since 2003: medical and surgical supplies, medical devices, equipment and aids for healthcare professionals and first responders. It sells across Italy through a network of agents and dealers.
The company’s data lives in its ERP, while the online store runs on WooCommerce. It needed a reliable bridge between the two, so that catalog, prices and data sheets were always correct without copying anything by hand.
What I did
- A catalog that is always in sync. Every night the plugin imports categories, items and prices from the ERP, updates only the products that changed, calculates prices including VAT and applies discounts with their validity dates.
- Images and data sheets with no manual work. Photos and PDFs, in Italian and English, attach themselves to products through a file-naming rule.
- The website becomes a trade-fair sales point. A mode for agents and kiosks: the cart empties after a period of inactivity, orders are attributed to the agent, and Italian tax details for individuals and companies are validated at checkout.
- The dealer network on a map. Visitors search by address, postcode or location and find the nearest dealer.
The results
- 1,623products synced with the ERP every night
- 0manual steps to link images and data sheets to products
- 58versions released over more than 31 months, following the company’s needs
How I worked
I’ve been running the project since 2024, from analysis to maintenance in production, with small, documented releases. When something goes wrong I start from the logs and the real data, find the cause and fix it at the root: like nightly errors that reappeared when the clocks changed, or prices of 1,000 euros and above being saved incorrectly. The code is versioned on Git and development is AI-assisted.
Have a project with similar needs?
Technical details
How it works
The ERP remains the single source of data: the plugin reads it through an OAuth2-authenticated API, transforms it and publishes it to WooCommerce, never writing back to the company’s system.
- Targeted updates: data is downloaded in full, but only what changed is written, comparing the last-modified dates of item and price list.
- Separate queues for items, categories, subcategories, images and PDFs, on Action Scheduler, in batches of 1,000 items.
- No duplicates: products identified by SKU, categories by slug.
- Automatic recovery with dedicated retry rules; migrations update the schedules on the first run of each new version.
Problems solved in production
- Nightly errors returning with daylight saving time: jobs scheduled in UTC fell into the ERP’s maintenance windows. New times outside the critical window in every season.
- Discounts not being published: the check read only the item’s date, but the discount lives in the price list. It now compares the most recent date of the two.
- Prices of 1,000 euros and above saved incorrectly: the thousands separator was read as a decimal point. Explicit, locale-independent number formatting.
- Long runs being interrupted: WP-Cron depends on site traffic. Gradual move to Action Scheduler with batches, single actions and retries.
- Products removed because categories were temporarily missing: controlled skip, with logging and an orphan-category report.
- Stalls that were hard to notice: classified errors, rate-limited email alerts and an indicator that flags when the last successful download is more than 26 hours old.
By the numbers
1,623 products synced, 5 automated nightly tasks, 5 asynchronous queues, 4 integrated data endpoints. The code has more than doubled to 3,941 lines of PHP, across 58 documented versions and 65 commits. Dealer locator with distance calculated in SQL (Haversine formula) and Google Places for dealer records. Figures as of November 2026.
Technologies
- PHP 8
- WordPress
- WooCommerce
- Action Scheduler
- SQL
- JavaScript
- OAuth2
- Google Maps Platform