
Troubleshooting: PromotionCodesFailedToImport error when activating imported promotion codes
If your CSV file contains duplicate values, or values that already exist with existing promotions, the promotion activation fails with no promotion codes in the CSV file populated into database.
The error is also written to the PROCESSINFO column of
the PROCESSFILE table in
the following format:
- If the CSV file contains duplicate codes, the error type is
0
and the duplicate codes appear within thecode
attribute.For example:<PromotionCodesFailedToImport> <errorType>0</errorType> <codes> <code>TEST-CODE-000000013</code> <code>TEST-CODE-000000002</code> </codes> </PromotionCodesFailedToImport>'
- If the duplicate code already exists in the database, the error
type is
1
and the duplicate codes appear within thecode
attribute.For example:<PromotionCodesFailedToImport> <errorType>1</errorType> <codes> <code>TEST-CODE-000000013</code> <code>TEST-CODE-000000002</code> </codes> </PromotionCodesFailedToImport>'
To avoid this issue, ensure that there are no duplicate
values in your CSV file when importing promotion codes:
- Open the current CSV file containing your promotion codes.
- Locate and remove any duplicate values, based on the PromotionCodesFailedToImport error output.
- Save your changes and close the file.
- Upload your new CSV file.