Address Data Normalization

How to unify different address formats between Shopify and POS to maintain data quality

address normalizationprefectureconversiondata quality
4 min read

About This Article

Since Shopify and POS use different address formats, storing them as-is causes issues with search and display. Japanese addresses in particular have prefecture names in different formats between English and Japanese. This article explains address data normalization.

Why Normalization is Needed

Address Format Differences Between Shopify and POS

Problem: Storing as-is results in mixed "Tokyo" and "東京都"

Problems Without Normalization

Normalization Approach

Prefecture Conversion

(All 47 prefectures defined)

Conversion rules:

  • Exact match conversion
  • Case insensitive
  • Keep original value if not found

Conversion Process Flow

Get Shopify Address

Retrieve customer address information from Shopify

Convert Prefecture

Convert English notation to Japanese notation

Combine Address

Combine prefecture, city, and street address

Save to POS

Save normalized address to POS

Conversion Details

Full Address Normalization

Address Normalization Example
Input (Shopify Format)

Province: Tokyo, City: Shibuya, Address1: 1-2-3 Dogenzaka, Address2: ABC Building 5F

Conversion Process

Province: Tokyo → 東京都, City: As-is, Address: Keep original value

Output (POS Format)

Address: 東京都 Shibuya 1-2-3 Dogenzaka ABC Building 5F

Note: Perfect Japanese conversion is difficult, so prioritize prefecture conversion and keep other values as input

Conversion Table Example

Implementation Considerations

Handling Unconvertible Cases

Bidirectional Considerations

Considerations:

  • Conversion is not reversible ("渋谷区" → "Shibuya" is complex)
  • Store original data in separate field (original_address metafield, etc.)
  • Basically one-way from Shopify → POS

Maintaining Data Quality

Validation Rules

Logging and Monitoring

Monitoring alert: Notify when conversion failure rate exceeds threshold

Operational Notes

Customer Address Changes

Address Change Handling
Customer changes address

Customer updates address in Shopify My Page

Catch change event

Detect change via Webhook

Normalize new address

Apply English → Japanese conversion

Update POS address

Save normalized address to POS

Considerations:

  • Change timing (real-time or batch)
  • Conflict possibility (simultaneous change at store)
  • History retention (keep old address for delivery history)

Allowing Manual Corrections

Example of imperfect auto-conversion: "東京都 Shibuya 1-2-3"

Operational rules:

  • Manual correction OK for obvious errors
  • Keep record of corrections
  • Enable "Protect manual corrections" in sync settings

Benefits of This Normalization

Data Quality

  • Prefectures stored in unified format
  • Search and aggregation work accurately
  • Improved document output quality

Operational Efficiency

  • Reduced address-related inquiries
  • Prevention of delivery issues
  • Regional analysis becomes possible