Matching Key Selection

Key selection and comparison for matching customers between two systems

matching keyemail addressphone numbermatching
4 min read

About This Article

To match customers between two systems, you need to find unique information that exists in both. This article explains which information to use as a matching key, comparing candidates and rationale for selection.

Matching Key Candidates

Candidate Information

Email address
UniquenessHigh
Ease of AcquisitionEasy
Change FrequencyLow
Format VariationsNone
Phone number
UniquenessModerate
Ease of AcquisitionEasy
Change FrequencyModerate
Format VariationsYes
Name
UniquenessLow
Ease of AcquisitionEasy
Change FrequencyLow
Format VariationsYes
Address
UniquenessModerate
Ease of AcquisitionEasy
Change FrequencyHigh
Format VariationsMany
Birth date
UniquenessLow
Ease of AcquisitionModerate
Change FrequencyNone
Format VariationsNone

Detailed Analysis of Each Candidate

Email Address

Adoption level: Most reliable -> Adopted as primary key

Phone Number

Adoption level: Moderate -> Consider as fallback when email doesn't match

Name

Adoption level: Low -> Use only as supplementary information

Address

Adoption level: Low -> Not used for matching, only normalized and stored

This Project's Selection Result

Primary Key: Email Address

High uniqueness
DetailsRare for same email to be used by multiple people
No format variations
Detailsyamada@example.com is always the same (only lowercase normalization)
Can be required in both systems
DetailsShopify: required field, POS: set as required
Suitable for automatic matching
DetailsCan determine by exact match

Fallback Strategy

Customer changed email
ResponseRegister as new customer. Manual merge if customer requests later
Using multiple emails
ResponseTreat as separate customers. Consolidate if customer reports
No email address
ResponseTreat as store-only member. Guide to email registration when using online

Matching Logic Design

Matching Flow

Get email address

Retrieve email address from registration form

Normalize

Convert to lowercase, trim leading/trailing spaces

Search POS

Search POS customers with normalized email

Determine result

If found -> existing customer, if not found -> new customer

Normalization During Matching

Email Address Normalization
Input

" Yamada@Example.COM "

Trim spaces

"Yamada@Example.COM"

Convert to lowercase

"yamada@example.com"

Match against POS/Shopify

Search with this value

Note: Simple normalization only. Gmail "+" notation is not considered (yamada+shop@gmail.com treated as different address)

Edge Cases to Consider

Case 1: Multiple POS Customers with Same Email

Cause: Past operational errors caused duplicate registrations with same email

Immediate response
DetailsLink to first found customer
Recording
DetailsLog warning, notify admin
Follow-up
DetailsManual merge later
Long-term
DetailsStrengthen email duplicate checking in POS

Case 2: Family Using Same Email

Situation: Husband and wife registered with same email address

Default behavior
DetailsTreated as same customer (by design)
Guidance
DetailsShow 'Already registered' at registration
Recommendation
DetailsEncourage registration with different email
Exception handling
DetailsConsult at store if they insist on same email

Policy: 1 email address = 1 customer

Benefits of This Design

Reliability

  • Match using reliable email address key
  • No concerns about format variations
  • Easy to automate

Simplicity

  • No complex matching logic required
  • Clear operational rules
  • Easy to identify causes when issues occur

Flexibility

  • Manual handling when automatic matching fails
  • Can add matching logic in the future
  • Minimal impact on existing operations

Related Topics