If a mailing fails with the error “Error prefetching recipient: PreFetch returned 0 records,” it typically indicates that the email is attempting to pull data from a custom table, but the contact receiving the message does not have a corresponding record in that table.
Because the message itself is fairly generic, some investigation is usually required to determine which custom table is missing data. This article walks through how to locate the error, identify the referenced custom tables, and confirm whether the contact has the necessary records.
When emails use custom table merge fields, Delivra retrieves data tied to the contact at the time the message is generated. If the email references a custom table but no matching record exists for the recipient, the platform cannot retrieve the requested data.
When this happens, the mailing may fail for that contact and display the rejection message:
Error prefetching recipient: PreFetch returned 0 records
The key to resolving the issue is determining which custom table the email references and verifying that the affected contact has a corresponding record in that table.
Navigate to the Analytics dashboard.
Select Tracking Statistics.
Locate and open the campaign.
Scroll to the Analytics section.
Click View Rejection Messages.
Search for the affected contact.
Confirm the rejection message includes:
Error prefetching recipient: PreFetch returned 0 records
You can identify the referenced tables directly from the report without needing to find and edit the campaign itslelf.
In the same Tracking Statistics report, locate the Source section.
Open the Body content.
Use your browser search (Ctrl + F).
Search for: "merge custom"
This will highlight all custom table references used in the email. All custom merge tags will follow the same naming convention of "merge custom_AccountName_TableName". These references indicate which tables the email expects data from.
Next, verify that the contact has records in the referenced tables.
Locate the contact record in Delivra.
Review the custom tables referenced in the mailing.
Confirm that the contact has a corresponding record in each table.
If a table does not contain a record for that contact, the mailing cannot retrieve the required data and the error will occur.
Once the missing table is identified, you can resolve the issue by adding the required record for the contact in the missing custom table.
After the data issue has been corrected, the mailing can be resent successfully.
To reduce the likelihood of this error occurring in future mailings:
Ensure contacts expected to receive emails referencing custom tables always have corresponding records.
Use conditional logic in email content when referencing optional custom table data.
Review merge references during testing to confirm all required data sources exist.
Taking these precautions can help prevent mailing failures and keep automation workflows running smoothly.
If you have questions or would like help diagnosing a mailing error, our Support team is happy to assist.