Greencity Wholefoods — Magento 2
Magento 2 and Sage ERP for a UK worker co-operative
Greencity Wholefoods is a Glasgow-based worker co-operative and one of the UK's leading organic and natural food distributors. Operating since 1977, Greencity supplies hundreds of independent retailers, food co-ops, and wholefood shops across Scotland and the north of England with a catalogue of over 4,000 organic, fair trade, and natural products. open-ecommerce.org was engaged to replace their existing ecommerce platform with Magento 2, integrating directly with their Sage ERP system to automate the product catalogue, customer accounts, order processing, and stock management that drives their wholesale operation.
The Challenge
Greencity's business is B2B wholesale. Registered trade customers order in bulk at pricing tiers that vary by customer group and minimum order quantity. Their existing platform had become a bottleneck — difficult and costly to maintain, and unable to keep pace with the operational complexity of the business.
The deeper challenge was the ERP dependency. Greencity manages their entire product catalogue, customer accounts, stock levels, pricing, and order fulfilment through Sage ERP. Any new ecommerce platform had to integrate directly with Sage — not just for the initial data import, but for ongoing automated synchronisation. Products added or updated in Sage needed to appear on the website. Orders placed on the website needed to flow into Sage. Inventory levels in Sage needed to govern what customers could order online. Building Magento 2 without a live Sage integration would have meant double-keying data across two systems indefinitely.
Data Migration at Scale
Before a line of custom code was written, we needed to move Greencity's entire business data from Sage and their existing ecommerce platform into Magento 2. The migration scope included:
- 4,000+ products imported from Sage, with up to three product images per SKU
- 30 product categories mapped from Sage's taxonomy into Magento's category tree
- 2,500 trade customer accounts migrated from Sage, preserving account details, customer group assignments, and pricing tier eligibility
- 2,000 additional customer accounts migrated from the existing ecommerce platform
- Sales history and favourite products imported per customer, enabling the reorder-from-history functionality
- 20 staff accounts and roles configured for the Greencity team to manage the platform
Every import was validated against the source data before the platform went live. We did not cut over until both sides had confirmed the data was complete and correct.
Sage ERP Integration
The centrepiece of the project was a custom bidirectional sync module connecting Magento 2 to the Sage API. The integration covers every operational touchpoint between the two systems:
- Products and inventory — products created or updated in Sage sync to Magento automatically. Stock levels in Sage govern availability on the website. Magento is configured to accept orders even when stock shows as zero, enabling fulfilment from stock not yet reflected in the sync cycle.
- Customer accounts — new trade accounts registered in Sage are provisioned in Magento with the correct customer group and pricing tier applied automatically.
- Orders — orders placed in Magento flow into Sage for fulfilment processing. Magento sends the order confirmation email to the customer; Sage generates and sends the invoice. The payment step is removed from Magento's checkout for trade accounts — Greencity invoices on account terms, not at point of order.
- Shipping and fulfilment status — despatch and shipping updates from Sage feed back into Magento, keeping customer order history accurate.
Custom Modules Built
Beyond the ERP integration, we built three additional custom modules to match Magento's behaviour to how Greencity's business actually operates:
Fixed delivery scheduling. Greencity operates fixed delivery routes with set days per region. Standard Magento shipping options do not accommodate this model. We built a custom shipping module that presents customers with their available delivery slots based on their delivery region, replacing generic shipping methods with a schedule that matches Greencity's logistics operation.
Bulk reorder and favourites. Trade customers placing regular wholesale orders need to reorder efficiently — not browse a catalogue from scratch each time. We extended Magento's native reorder functionality to support bulk ordering from a customer's order history, and built a "favourites" product list populated from the sales history imported from Sage. Customers can reorder their most-purchased products in a few clicks.
Account-based checkout. Greencity's trade customers do not pay at checkout — they order on account and receive invoices from Sage. We customised the Magento checkout flow to remove the payment step for registered trade accounts, replace it with an order confirmation, and trigger the appropriate notification to the Sage workflow for invoice generation.
The Outcome
The new Magento 2 platform replaced a system that had become a bottleneck for Greencity's wholesale operation. Trade customers gained a faster, mobile-accessible ordering experience with pricing applied automatically to their account. The bulk reorder and favourites features reduced the time customers spend placing regular orders. The account-based checkout and Sage invoicing integration preserved the credit terms that Greencity's trade relationships depend on.
The Greencity team gained direct control over their catalogue — products, prices, and promotions managed in Sage sync to the website automatically, without raising a developer ticket for every update. Because the platform is built entirely on open-source software, Greencity owns the codebase outright. There are no monthly platform fees, no transaction charges, and no proprietary dependency on any vendor.
Frequently Asked Questions
- Can Magento 2 integrate with Sage ERP?
Yes. We built a custom bidirectional sync module connecting Magento 2 to the Sage API for Greencity — covering products, inventory, customer accounts, orders, shipping status, and invoice generation. Changes in Sage sync to Magento automatically; orders placed on Magento flow into Sage for fulfilment.
- How does Magento 2 handle B2B wholesale pricing for trade accounts?
Magento 2's customer group system supports tiered pricing applied automatically per account. For Greencity, trade customers are assigned to customer groups that reflect their pricing tier — pricing is applied at login without manual intervention, and the checkout removes the payment step for account-based ordering.
- Does Magento 2 support custom delivery scheduling for fixed routes?
Not out of the box — but we built a custom shipping module for Greencity that presents customers with their available delivery slots based on their delivery region, replacing generic shipping methods with a schedule that matches Greencity's actual logistics routes.
About This Project
| Client | Greencity Wholefoods, Glasgow |
| Sector | Organic and natural food wholesale — worker co-operative |
| Platform | Magento 2 (Adobe Commerce Open Source) |
| Integration | Sage ERP — bidirectional API sync (products, inventory, customers, orders, shipping, invoicing) |
| Catalogue | 4,000+ products across 30 categories; 4,500+ customer accounts migrated |
| Custom modules | Sage API sync, fixed delivery scheduling, bulk reorder, account-based checkout |
| Delivered by | open-ecommerce.org — a London worker co-operative |
We specialise in ecommerce for co-operatives and purpose-led businesses. If your co-operative needs a Magento 2 platform with ERP integration, read more about our ecommerce for co-operatives service or get in touch.
- Client: Greencity Wholefoods (greencity.coop)
- Category: Magento 2, B2B wholesale ecommerce
- Sector: Organic food wholesale — worker co-operative
- Delivered: 2020
- Magento 2 Platform
- Sage ERP Integration
- Bidirectional API Sync
- B2B Wholesale Pricing
- Fixed Delivery Scheduling
- Bulk Reorder
- Account-Based Checkout
- 4,000+ Products Migrated
- 4,500+ Accounts Migrated
