OBLYTECH Logo
OBLYTECH Logo

Error File Handling for Salesforce Data Loads

An error file routine gives each rejected row in a Salesforce data load one named owner, a correction due date and a written resubmission rule. Without those fields, rejected rows tend to sit in a spreadsheet until the next load fails the same way. A load closes when each row is either loaded or formally retired.

Why each rejected row needs an owner first

A load that rejects rows is not finished when the error file arrives. Each rejected row is a decision waiting to be made. Someone has to correct the value, merge the row with an existing record, or drop it on purpose. Teams that skip the ownership step often fix the same kind of error in more than one place, because nobody can say which fix is the final one.

Treat the error file as a work queue. Each row moves through a short set of states, and each state has one person responsible for moving it on. The aim is a clear account of what went in, what was corrected, and what was left out deliberately.

Setting up the error file before the load runs

Much of the work happens before the first load starts. Decide what the error file must contain, who receives it and where it is stored. Settle the load tool early as well. The layout of rejected-row output can differ between tools, and a routine built around one layout will need rework if the team switches. If the tool is not chosen yet, compare loader options for migration before you fix the file layout.

Keep the full source row beside the failure message

The error file should carry the complete source row next to the failure message. A message that says a field failed validation tells a steward very little if that steward did not run the load. Include a unique key from the source system, the target object name, the values that were sent, and the message text exactly as the tool returned it. Keep the original wording. Rewriting the message by hand makes it harder to search for the same error across several loads.

Agree on error categories before the first run

Group rejected rows into a short list of categories before anyone starts correcting them. A migration load usually falls into a handful of groups: required values left blank, values that fail a format or list check, rows that match records already in the target, child rows whose parent record is missing, and rows the business has decided not to load. Give each category a default owner. Categories make the queue sortable, and they point to the upstream extract that needs fixing so the same rejections do not return on the next run.

Assigning owners, correction dates and resubmission rules

Three fields turn a list of errors into a queue that can close. Set them row by row, or category by category when a whole group shares the same answer.

  • Owner. The person who decides the correct value. For content errors this is usually the business record owner. For structural errors, such as a parent reference missing from the extract, it is usually the load owner.
  • Correction date. The date by which the owner commits to a fix. Tie it to the next scheduled load rather than the day the error was raised, so the date reflects the schedule that actually matters.
  • Resubmission rule. A written statement of how a corrected row returns to the load. For example, the row goes back in the next batch under its original source key, or it must pass a duplicate check first.

Record the owner’s name in the queue, not a team alias. An alias receives the notice but does not make the decision, and rows stall when each person assumes someone else is reading the mail. If an outside group runs the loads rather than the internal team, the same three fields still apply. Teams weighing that arrangement can look at the dedicated Salesforce delivery teams page.

Working the error file from triage to resubmission

Run the queue in a fixed order. Later steps depend on earlier ones. You cannot resubmit a row until its owner has decided the correct value, and the owner cannot decide well until the category is clear.

  1. Triage. Confirm the category for each row and remove exact duplicates of rows already in the queue. Do not change any values in this step.
  2. Decide. The owner records either the corrected value or a decision not to load the row, with a reason.
  3. Correct at the source. Fix the extract or the source record, not only the copy in the load file. A correction made only in the load file comes back on the next extract.
  4. Check for duplicates. Before a corrected row goes back in, search the target for a matching record. Use the steward duplicate review routine for this check.
  5. Resubmit. Load the corrected rows under the resubmission rule recorded for each one. Keep the original source key on each attempt.
  6. Reconcile. Compare the new error file with the previous one. A row that appears again needs a fresh decision, not another resubmission.

Resubmitting corrected rows without creating duplicates

Resubmission is where many teams create new problems. A row that failed on a missing value can partly load on an earlier attempt, and a second attempt can then create a second record. Treat the source key as the identity of the row across all attempts. Before each resubmission, confirm that no record carrying that key already exists in the target.

Set a ceiling on attempts. Two resubmissions is a reasonable starting limit. A row that fails a third time usually points to a data problem the owner has not addressed, or a mapping problem that belongs to the load owner. Escalate it rather than running it again. The number is a working judgment rather than a rule set by any tool, so adjust it to your team’s load cycle.

Checking the target after each attempt

Check the record in the target itself, not only the totals in the load summary. Totals show how many rows were accepted, not which values landed. Compare a sample of resubmitted rows against the corrected source values, and widen the sample if a field was changed in the extract. This catches mapping mistakes before they carry into the next cycle.

Closing out a load and recording what was left behind

A load is closed when each row in the error file has one of two end states. It is either loaded as a confirmed record, or retired with a recorded reason. Rows still open at the close date go into the handover note with their owner and next correction date, so the next load does not inherit an unexplained gap.

Keep the error file as a record. Store the first file, each resubmission file and the decision log together, under the load name and date. When someone later asks why a record is missing, the decision log answers the question without a search through email threads.

For help planning this work, see Salesforce implementation. The wider list of Salesforce service pages sits under Salesforce services.

Questions about error file ownership and resubmission

Should personal data stay in the error file?

Include only the fields a steward needs to recognize and correct the row. Mask identifiers that do not affect the decision, and keep the full row in the source system, where access is already controlled.

Who should approve retiring a row without loading it?

The business record owner should agree to the retirement, and the load owner should record it in the decision log. A retirement changes what the target holds, so the person who would notice a missing record needs to accept it in writing. The log should name both people against the row.

How do you confirm a resubmitted row is complete?

Match the row on its source key, then compare each corrected field with the value in the target. Use a sample for large loads and a full comparison for rows changed by hand. A row counts as confirmed when the target record matches the owner’s decision, not when the load tool reports it as accepted.

How long should the error file and decision log be kept?

Keep them until your records and audit rules say they can go. The retention period is a policy decision, not a technical one. Use the same period for each load so the history can be compared across cycles.

Can one error file layout serve two load tools?

It can, if you map each tool’s rejected-row output to one shared layout before triage begins. The conversion can be a mapping sheet or a short script. Test it on an earlier load first, because a mismatched key column can cause trouble when a team switches tools.