A product with this SKU already exists
This article explains the DUPLICATE_VALUE error on the StockKeepingUnit field and how to resolve it.
Error message#
You may see this error in your execution logs or notification details:
Upsert failed. First exception on row 0 with id XXX; first error: DUPLICATE_VALUE,
A Product with this SKU already exists.: [StockKeepingUnit]
For help finding and reading errors, see Reading and understanding error messages.
What causes this error#
The StockKeepingUnit field on the Salesforce Product2 object has a built-in unique constraint. No two Product2 records can share the same SKU value.
In MoveData Commerce Extensions before version 1.114 (August 2023), MoveData automatically set the StockKeepingUnit to match the product code from your fundraising platform. If you had a common product code — such as "Adult" for event tickets — across multiple campaigns, the second product would fail because the SKU already existed.
Success
This error is most common with ticket-based events where generic product codes like "Adult", "Child", or "Early Bird" appear in many campaigns.
How to fix it#
Upgrade to version 1.114 or later#
From version 1.114 onwards, MoveData no longer sets the StockKeepingUnit by default. This prevents the duplicate SKU conflict entirely.
To upgrade, install the latest version of the MoveData Commerce Extension in your Salesforce org. See Upgrading MoveData for instructions.
Warning
After upgrading, new products will not have a SKU value unless you configure one. If your organisation relies on SKUs, see the optional configuration below.
Optional: re-enable SKU assignment#
If you need MoveData to set the StockKeepingUnit on new products, you can re-enable this behaviour after upgrading.
Set Config_CatalogSetProductCode to true in your configuration flow.
Note
Re-enabling SKU assignment means you may encounter this error again if your product codes are not unique across campaigns. Only enable this setting if your product codes are globally unique.
After fixing the issue#
Reprocess any failed notifications after upgrading. See How to reprocess failed notifications.