About This Topic
To manage customers uniformly across both online store and physical stores, we built a mechanism to automatically synchronize customer data between the headless site (Shopify) and POS system (Smaregi).
This enables customers who register online to earn points at stores immediately.
Why Automatic Sync is Needed
Problems with Manual Integration
When managing customers separately online and in-store, the following problems occur.
| Problem | Impact on Customer | Impact on Operations |
|---|---|---|
| Double registration | Enter same info twice | Data duplication, complex management |
| Information inconsistency | Don't know which is latest | Mistakes in customer support |
| Split points | Points separated by channel | Increased complaints |
| Manual work burden | Takes time to reflect | Labor cost and input errors |
What Automatic Sync Solves
- Recognized as member at store immediately upon online registration
- Information changes automatically reflected across all systems
- Points usable across channels
Overall Sync Architecture
Enter required info and click submit button
Temporary processing only. Data validation and API calls
Save basic info + metafields
Check existing customer by email -> Existing: Update member number / Not existing: Create new
For sales/marketing purposes (optional)
Send welcome email to complete registration
Design Points
Sync is Synchronous
This project adopted a design where sync to all systems completes at registration time.
Error Fallback
Design ensures main registration (Shopify) succeeds even if some syncs fail.
Highest priority registration as customer master
Success -> Registration complete / Failure -> Maintain Shopify registration, log error, notify admin, manual re-sync later
For Those Who Want to Learn More
This sync architecture is explained in detail in three articles.
1. Automatic Sync at Registration
Specific mechanism for automatically integrating data to multiple systems at member registration.
-> Automatic Sync at Registration
2. Duplicate Prevention Mechanism
How to prevent duplicates and correctly link when existing store members register online.
-> Duplicate Prevention Mechanism
3. Sync ON/OFF Control
Design that allows enabling/disabling sync via environment variables.
What This Sync Enables
For Customers
- Online registration alone enables immediate use as member at stores
- Information changes reflect to all channels at once
- Same points earned regardless of where you buy
For Operations
- No manual data entry required
- Reduced trouble from data inconsistency
- Unified customer data management achieved