Script Overview
This screen finds customer accounts that share the same name or the same email address and shows one matching group at a time.
You choose the account to keep, and the system moves orders, addresses, and rewards onto that account before the duplicate accounts are removed.
Accounts you mark as do-not-merge stay separate and are skipped the next time this group would have appeared.
Operator Workflow
Step 1
Review the group
-
Compare the name, email, phone, and default address on each row.
-
Click a customer ID to open the full address list.
-
Continue only when the accounts belong to the same person.
Step 2
Choose who to keep
-
Select the round Keep button on one row.
-
The Merge box on that row turns off by itself.
-
Keep the account that already has the orders and price group you want.
Step 3
Mark what to combine
-
Check Merge on each duplicate that should move into the kept account.
-
Leave Merge unchecked when that account should stay as it is for now.
-
A dealer account and a retail account cannot be combined.
Step 4
Confirm the merge
-
Click Merge.
-
Read the confirmation panel, then click Yes, continue.
-
Wait for the green success message. The next group loads on its own.
Step 5
Leave them separate
-
Click Don't Merge All when none of these accounts should be combined.
-
Confirm the skip on the panel.
-
Those accounts stay in the system and are not offered together again.
Technical Reference & Safeguards
- Data Read:
oc_customer (including customer_group_id), oc_address, oc_order, oc_customer_activity, pd_customers_last_merge, and pd_customers_dont_merge.
- Database Writes: child rows are reassigned to the kept account, then the duplicate
oc_customer row is deleted. Each duplicate is one transaction that rolls back if a write fails.
- Safeguards & Notifications: submitted IDs must belong to the group on the page, price groups must match, do-not-merge uses an idempotent insert, and the address-book table check runs outside the transaction. The green or warning banner follows the result of each merge.