Customer Sync Flow from Headless Site to POS

Architecture for automatic customer data synchronization between online store and POS system

POS integrationcustomer syncSmaregiautomation
3 min read

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.

Double registration
Impact on CustomerEnter same info twice
Impact on OperationsData duplication, complex management
Information inconsistency
Impact on CustomerDon't know which is latest
Impact on OperationsMistakes in customer support
Split points
Impact on CustomerPoints separated by channel
Impact on OperationsIncreased complaints
Manual work burden
Impact on CustomerTakes time to reflect
Impact on OperationsLabor 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

Customer Registration Sync Flow
1. Customer submits registration form

Enter required info and click submit button

2. Received by your server

Temporary processing only. Data validation and API calls

3. Create customer via Shopify Admin API

Save basic info + metafields

4. Sync to POS system (Smaregi)

Check existing customer by email -> Existing: Update member number / Not existing: Create new

5. Sync to CRM (HubSpot)

For sales/marketing purposes (optional)

6. Send confirmation email

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.

Behavior on Error
Shopify registration

Highest priority registration as customer master

Attempt POS sync

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.

-> Sync ON/OFF Control

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

Related Topics