PFL is a Taiwanese gift and packaging supplier, offering sealing bags, gift boxes, packaging materials, decorations, holiday supplies, combo sets, and more, with nearly two thousand product listings.
The client's existing ERP system managed all product and customer data. They wanted to build an e-commerce platform that supports both B2B (distributors) and B2C (consumers), with bi-directional ERP synchronization to eliminate redundant manual data entry.
The entire system is built on Laravel + Filament, integrating ERP modules for products, inventory, customers, and orders, paired with ECPay payment services for online transactions, achieving a fully automated workflow from order placement to ERP accounting.
It used to work like this: the customer ordered on the website, an operator printed the order out and re-keyed the same data into the ERP. Nearly two thousand products and dozens of orders a day — one mistyped quantity is one shipping dispute. Now, the moment the customer checks out, that same order is already sitting in the ERP.
✓ Order placed
Order no. PFL-24090873
TotalNT$ 8,640
Credit card · paid
| Order | Customer | Amount | Status |
|---|---|---|---|
| 24090871 | Dealer A | 12,400 | Created |
| 24090872 | Dealer B | 3,280 | Created |
| 24090873 | Web order · B2C | 8,640 | Created |
+00:02 — created straight from the storefront, nobody typed it in
* Illustrative mock-up, not an actual screenshot
One order, two different screens, but the data is entered only once. All the operator has left to do is confirm the shipment — no more opening two systems and typing from one into the other.
Bi-directional sync with KTNET TMS ERP system, covering product data (pricing, inventory, descriptions), customer data (B2B/B2C), and orders (creation + status write-back), using HMAC-SHA512 signature authentication
A full-featured e-commerce admin panel built with Filament, managing products, orders, customers, sales reps, and more, with manual ERP sync interface and flowchart visualization
Integrated with ECPay payment services, supporting credit card, ATM transfer, convenience store payment, and more. B2B orders are pushed directly to ERP, while B2C orders sync automatically after payment
Five-tier pricing synced from ERP, automatically matching prices based on customer level. Inventory quantities are updated in real-time from ERP to ensure frontend display matches actual stock
Once a customer checks out on the storefront, the data has to walk itself into the ERP — that is the problem this build actually solves. The swimlane below opens up a single order: products coming down from the ERP, the customer browsing and ordering, ECPay taking payment, the order pushed back up to the ERP, and the ERP order number written back. Not one column requires an operator to re-key anything.
The only non-automated steps in the diagram are an operator ticking which products may sync, and re-sending a single record when a sync fails. Every other cross-system exchange is event-triggered and verified with an HMAC-SHA512 signature.
Products, stock and customer master data flow down from the ERP to the storefront, while orders and customers created on the storefront are pushed back up. With a one-way import, anything created on the e-commerce side would never reach the ERP, and the manual re-keying would still be there.
B2B orders are settled on account terms and are pushed to the ERP the moment they are created; B2C orders wait for ECPay to confirm payment. One order model, with events deciding when to push, so unpaid orders never reserve ERP stock.
Batch syncs across nearly two thousand products run in the background on Laravel Queue without blocking the storefront. The Filament admin shows live progress and a failure list, so a single record can be re-sent instead of replaying the whole batch.
Syncs product names, multi-tier pricing (five tiers), EAN barcodes, inventory quantities, listing status, and more via the ERP vendor API's /product/QueryList and /Stock/QueryList endpoints. Supports manual sync by specifying product codes, or one-click sync for all products marked as syncable.
Customer data supports bi-directional sync: pulling customer lists from ERP (automatically distinguishing B2B Client / B2C Customer by code prefix), and pushing locally created customers back to ERP. Synced data covers basic info, company details, invoice settings, shipping thresholds, bonus points, and more.
Orders use an event-driven architecture: B2B orders are pushed to ERP immediately upon creation, while B2C orders are automatically triggered after ECPay payment completion. Order pushes include master data (customer, address, invoice), line items (product SKU, quantity, unit price), and bonus point deductions. The order number and status returned by ERP are written back in real-time.
Bulk sync operations run in the background via Laravel Queue to prevent blocking frontend operations. The Filament admin panel provides real-time progress tracking, and CLI commands support scheduled automation and manual triggers.
PFL's existing ERP already managed nearly 2,000 products and all customer data. A one-way import alone would mean new customers or orders couldn't be written back to the ERP, leaving staff to manually re-enter data. So we designed bi-directional sync: products and inventory flow from ERP to the e-commerce platform, and orders flow back to ERP once created, with HMAC-SHA512 signatures ensuring the security and authenticity of data in both directions.
This project was completed in 2024, covering three sync modules — products, customers, and orders — plus ECPay payment integration and a Filament admin panel. A project of this scope typically takes 2–3 months, with the timeline varying based on how complete the ERP vendor's API is and the complexity of the data fields, such as PFL's five-tier pricing mechanism.
No — we used an event-driven architecture to keep the two flows independent: B2B (distributor) orders are pushed to ERP immediately upon creation, while B2C (consumer) orders sync automatically only after ECPay payment completes. Each path triggers independently and maps to its own pricing tier within the five-tier pricing structure, so neither interferes with the other.
CONTACT US
Whether it's an e-commerce platform, ERP integration, or payment processing, we can build a tailored solution for you.
Contact Us