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

Country
Shopify (International Format)Japan
POS (Japanese Format)-
Prefecture
Shopify (International Format)Tokyo (English)
POS (Japanese Format)東京都 (Japanese)
City
Shopify (International Format)Shibuya
POS (Japanese Format)渋谷区
Address
Shopify (International Format)1-2-3 Dogenzaka
POS (Japanese Format)道玄坂1-2-3
Postal Code
Shopify (International Format)150-0001
POS (Japanese Format)150-0001

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

Problems Without Normalization

Search mismatch
ExampleSearching '東京都' doesn't find 'Tokyo'
ImpactCustomer search issues
Inconsistent documents
ExampleDM addresses mixed English/Japanese
ImpactBrand image degradation
Analysis difficulty
ExampleSame region counted separately in regional stats
ImpactImpaired business decisions
Delivery errors
ExampleAddress format inconsistencies cause delivery issues
ImpactReduced customer satisfaction

Normalization Approach

Prefecture Conversion

Tokyo
Japanese東京都
Osaka
Japanese大阪府
Hokkaido
Japanese北海道
Kyoto
Japanese京都府
Aichi
Japanese愛知県
Kanagawa
Japanese神奈川県
Saitama
Japanese埼玉県
Chiba
Japanese千葉県
Hyogo
Japanese兵庫県
Fukuoka
Japanese福岡県

(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

Tokyo
Japanese東京都
NoteMetropolis
Osaka
Japanese大阪府
NotePrefecture
Kyoto
Japanese京都府
NotePrefecture
Hokkaido
Japanese北海道
NoteTerritory
Aichi
Japanese愛知県
NotePrefecture
Fukuoka
Japanese福岡県
NotePrefecture
Okinawa
Japanese沖縄県
NotePrefecture

Implementation Considerations

Handling Unconvertible Cases

Province is empty
Input ExampleProvince = ""
HandlingSave as empty
ReasonMay not be a required field
Not in conversion table
Input ExampleProvince = "Toky" (typo)
HandlingSave original value
ReasonBetter to keep original than convert incorrectly
Non-Japan address
Input ExampleCountry = "United States"
HandlingSave without conversion
ReasonNo need to convert to Japanese format

Bidirectional Considerations

Shopify → POS
Conversion ContentConvert English → Japanese
POS → Shopify
Conversion ContentConvert Japanese → English (when needed)

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

Postal code
Rule7-digit number (remove hyphens)
Error HandlingWarning log, save value
Prefecture
RuleExists in conversion table
Error HandlingSave original if conversion fails
Full address
RuleNot empty
Error HandlingWarning log if empty

Logging and Monitoring

type
Normal Caseaddress_normalization
Conversion Failure Caseaddress_normalization
status
Normal Casesuccess
Conversion Failure Casepartial_failure
input.province
Normal CaseTokyo
Conversion Failure CaseToky
output.prefecture
Normal Case東京都
Conversion Failure CaseToky
warning
Normal Case-
Conversion Failure CaseProvince not found in conversion table

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"

Manual correction in POS admin
DetailsAdmin corrects to proper address
Prioritize manual value after correction
DetailsPrioritize manual correction over auto-sync
Prevent overwrite
DetailsConsider setting to not overwrite on next sync

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

Related Topics