SAP Knowledge Base Article - Public

3157444 - You Cannot Import Leads with Status Declined or Accepted in Data Workbench - Messages "Status is not valid" or "Invalid code; maintain correct Status code" Appear


You are trying to import leads into C4C using Data Workbench and you see messages like 'Status is not valid' or 'Invalid code; maintain correct Status code'.


SAP Cloud for Customer

Reproducing the Issue

  1. Go to the Data Workbench Work center.
  2. Select the Import view.
  3. Select the Complete Business Object option.
  4. Select Insert.
  5. Select Standard object.
  6. Select Lead.
  7. Click in the Next button.
  8. Upload your file.
  9. Select option "Simulation mode".
  10. Click in the next button until the last step.
  11. You will see the warning: "Invalid code; maintain correct Status code."
  12. Click in the Simulate button.
  13. Go to the Monitor View.
  14. Find your newly created task.
  15. Check that all records raised errors.
  16. Open the error file.
  17. You will see the error "Status is not valid".



You cannot import leads with status Accepted or Declined directly.


You need to first import them as Qualified to then change them to Accept or Declined.

  1. Create the Leads via DWB with Status Qualified.
  2. Export the Leads via DWB to get the ID or UUID, e.g. select by Creation Date Time = Today.
  3. Create CSV File only sending Object ID & Status (e.g. 04 = Accepted) -->
  4. Import Leads via DWB Import, Individual Object, Lead Update (Blank Fields = Ignore: This is important).


Import ; Lead ; Leads ; Excel ; CSV ; Accepted ; Declined ; Status is not valid ; Invalid code; maintain correct Status code ; , KBA , LOD-CRM-LM , Lead Management , LOD-CRM-INT-DWB , Data Workbench , How To


SAP Cloud for Customer add-ins all versions