Automation

Pia Rossini - E-Commerce & ERP Automation (n8n, Shopify & Faire)

Automation Engineer / Multi-System Integration Architect

Business summary
B2B E-Commerce & Wholesale • Unify Shopify, Faire, Unleashed ERP, and Xero across UK/US entities
  • Synchronised catalogue and live stock across Shopify, Faire UK/US, and Unleashed ERP
  • Automated intercompany sales invoicing and purchase order mirroring between Xero entities
  • Resolved live-data pricing and MOQ overwrites on Faire without clobbering vendor-owned fields

What I built

Designed and deployed production n8n automations for Pia Rossini, integrating Shopify, Faire (UK/US), Unleashed ERP, and Xero across UK and US legal entities. Built bidirectional product and inventory syncs with Faire geo-constraint pricing and GraphQL contextual pricing, automated wholesale order intake into Shopify, engineered tiered intercompany trade accounting between Xero entities and Unleashed, and scheduled restock-date syncs to Shopify metafields. Diagnosed and fixed live production API bugs affecting order pricing and case quantities.

Tech stack

n8nShopify Admin APIFaire APIUnleashed ERPXero APIShopifyShopify GraphQLFaireUnleashedXeroB2B E-CommerceERP IntegrationInventory SyncOrder AutomationHMAC-SHA256MetafieldsWholesaleREST API
Deep Dive Case Study

Pia Rossini - E-commerce & ERP Automation (n8n)

Role: Automation Engineer (Freelance)
Client: Pia Rossini - UK/US B2B fashion-accessories wholesaler
Stack: n8n, Shopify Admin API (REST + GraphQL), Faire External API v2, Unleashed (ERP) API, Xero API
Scope: Multi-system integration across two legal entities (UK & US), two sales channels, and an ERP


Summary

Designed and built a suite of automation workflows connecting Pia Rossini's Shopify store, two Faire wholesale accounts (UK + US), their Unleashed ERP, and Xero accounting across two company entities. The work covered product and inventory synchronisation, wholesale order import, intercompany accounting automation, and a restock-date sync - plus production debugging of live integration bugs affecting real customer data.


Systems Integrated

System Role Notable technical detail
Shopify Source of truth for products/pricing REST + GraphQL; Markets contextual pricing (GBP/EUR/USD); product webhooks; metafields
Faire Wholesale sales channel (UK + US accounts) External API v2; per-region geo_constraint pricing; GTIN validation; case-size & MOQ model
Unleashed ERP / stock & order management HMAC-SHA256 request signing; Sales Orders, Shipments, Purchase Orders; tiered pricing
Xero Accounting (two orgs: Inc + Ltd) Multi-currency invoicing; intercompany invoice + purchase-order automation

What I Built

1. Shopify → Faire product sync (UK + US)

Automated product create, update and inventory sync from Shopify to two separate Faire brand accounts.

  • Built per-region pricing using Faire's geo_constraint model (GBR, EU, USA), reading live Shopify Markets prices via GraphQL contextualPricing.
  • Handled Faire's stricter validation: idempotency tokens, 75-char description cap, GTIN check-digit validation (omitting invalid barcodes), and the rule that variant option sets can't be changed on update.
  • Implemented pagination for the full catalogue using a created_at_max cursor loop, and rate-limit-safe batching.

2. Faire → Shopify wholesale order import

Faire wholesale orders imported into Shopify as draft orders.

  • Mapped a fixed wholesale customer per region, with the buyer's details carried into the shipping address.
  • Switched from REST to GraphQL draftOrderCreate to correctly set presentment currency (REST silently ignored it and defaulted to the shop currency).

3. Intercompany trade automation (Unleashed + Xero)

Automated the full trade-order flow across both entities: full-price Sales Order for the end customer in Xero (Pia Inc) → Tier-9 Sales Order in Unleashed → original order auto-deleted → Tier-9 intercompany invoice in Xero (Pia Ltd, billed to Inc) → mirrored Tier-9 purchase order in Xero (Inc, for Ltd).

  • Added error-branch recovery so a mid-run failure could recover an already-created order rather than duplicating it.

4. Restock-date sync (Unleashed → Shopify)

Built a scheduled workflow that reads the Delivery Date from open Unleashed purchase orders, takes the earliest upcoming date per product, and writes it to a Shopify custom.restock_date Date metafield - only for out-of-stock products - so the storefront can show an accurate "back in stock" date.

  • Chose a typed Date metafield over free text so the value sorts and filters correctly in exports and reporting.

5. Error alerting

Centralised failure alerting so any workflow error triggers an email notification, rather than needing an error node wired into every module.

6. Client documentation

Produced full handover documentation (workflow-by-workflow, with screenshots, operating notes, known issues and security guidance).


Production Debugging (live-data bugs)

Case-quantity & price reverting on Faire.
The client reported that manually-set case sizes and prices in Faire kept getting overwritten. I traced it to the Shopify→Faire product-update sync, which re-sent fields that don't exist in Shopify (unit_multiplier, minimum_order_quantity, and a computed retail price), clobbering the Faire-side values on every edit.
Fix: scoped the update payload down to only the fields that genuinely originate in Shopify (title, description, availability), leaving Faire-owned fields untouched. Worked through two follow-on API constraints in the process - Faire rejects a price object missing retail_price, and rejects image updates with more than one hero image - landing on an update that syncs cleanly without touching protected fields. Confirmed fixed by the client across widespread testing.


Engineering Approach

  • Surgical over rebuild: diagnosed root causes and made the lowest-risk change to live workflows rather than re-architecting working systems.
  • Idempotency & recovery: designed order flows to recover from partial failures instead of duplicating financial documents.
  • Correct API semantics: repeatedly chose the right API surface for the job (GraphQL vs REST for currency and metafields; the correct auth model per platform).
  • Data integrity first: validated every change against the real API response before deploying to production, given the workflows touch live orders, stock and accounting.

Outcome

All product, inventory, order and accounting flows running in production across two entities and two sales channels. Live integration bugs resolved and confirmed by the client. Engaged for ongoing automation work on an increased retainer following delivery.