# DB02001: Duplicate Record

## What This Means[​](#what-this-means "Direct link to What This Means")

The database tried to insert a record with an ID that already exists. Each record must have a unique identifier.

## Common Causes[​](#common-causes "Direct link to Common Causes")

* **Sync conflict** — Same data synced twice
* **Race condition** — Multiple operations creating same record
* **Data corruption** — IDs were corrupted or duplicated
* **Import issue** — Importing data that already exists

## How to Fix[​](#how-to-fix "Direct link to How to Fix")

### 1. Refresh Data[​](#1-refresh-data "Direct link to 1. Refresh Data")

Re-sync from the server:

* Pull latest data
* Let the sync process resolve conflicts
* The newer data should take precedence

### 2. Retry the Operation[​](#2-retry-the-operation "Direct link to 2. Retry the Operation")

If creating new records:

* The system may have already created it
* Check if the record exists
* Avoid clicking submit multiple times

### 3. Clear Local Cache[​](#3-clear-local-cache "Direct link to 3. Clear Local Cache")

Check for unsaved work first

Clearing local data or reinstalling the app deletes anything on this device that hasn't reached your store — including sales taken while offline, open carts, and edits that didn't save. Before you clear anything, open **Store health → Database** and check nothing is listed as held or as never having reached your server, then **Store health → Logs** for **0 stuck records** and **0 changes waiting to send**; then finish or note every open cart. If your WCPOS has no Store health page, update WCPOS first, then check. If anything is listed or waiting, or you can't check, don't clear — ask your store owner or contact support.

Only if steps 1, 2 and 4 didn't help, and only after the check above, reset local data:

1. Clear the local database/cache
2. Login again
3. Sync data fresh

### 4. Check for Duplicates in WooCommerce[​](#4-check-for-duplicates-in-woocommerce "Direct link to 4. Check for Duplicates in WooCommerce")

If the issue persists:

* Check WooCommerce for duplicate entries
* Look for products/orders with same IDs
* Clean up any duplicates in the admin

### 5. Report Persistent Issues[​](#5-report-persistent-issues "Direct link to 5. Report Persistent Issues")

If this happens frequently:

* Note what actions cause it
* Check for patterns
* Report to support with details

## Why This Matters[​](#why-this-matters "Direct link to Why This Matters")

Duplicate IDs would cause:

* Confusion about which record is correct
* Data overwrites
* Sync issues

The error prevents data corruption.

## Related Errors[​](#related-errors "Direct link to Related Errors")

* [DB02002](/error-codes/DB02002.md) — Record Not Found
* [DB02003](/error-codes/DB02003.md) — Constraint Violation
