Introduced in Feature Pack 1

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 the code 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 the code 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:
  1. Open the current CSV file containing your promotion codes.
  2. Locate and remove any duplicate values, based on the PromotionCodesFailedToImport error output.
  3. Save your changes and close the file.
  4. Upload your new CSV file.