Prefetch returned 0 records

Prefetch returned 0 records

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.

What It Means

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.

How to Identify the Cause of the Error

Step 1: Locate the rejection message

To confirm that the reason for the failure is a prefetch error, find the rejection message by following these steps:
  1. Navigate to the Analytics dashboard.

  2. Select Tracking Statistics.

  3. Locate and open the campaign.

  4. Scroll to the Analytics section.

  5. Click View Rejection Messages.

  6. Search for the affected contact.

  7. Confirm the rejection message includes:

Error prefetching recipient: PreFetch returned 0 records

Step 2: Identify which custom tables the mailing references

You can identify the referenced tables directly from the report without needing to find and edit the campaign itslelf.

  1. In the same Tracking Statistics report, locate the Source section.

  2. Open the Body content.

  3. Use your browser search (Ctrl + F).

  4. 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.

Step 3: Check the contact’s custom table records

Next, verify that the contact has records in the referenced tables.

  1. Locate the contact record in Delivra.

  2. Review the custom tables referenced in the mailing.

  3. 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.

Resolution

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.

Best Practices and Tips

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.

Need Help?

If you have questions or would like help diagnosing a mailing error, our Support team is happy to assist.


    • Related Articles

    • Why does the preview page show all rows in my repeater group?

      To properly test repeater groups, you should set up a campaign with the appropriate segment and use the Test function in the campaign process. Using the Preview step on a template or in a campaign will not provide accurate results. The preview page ...
    • What does it mean when the sent log says "Message will be cross-post merged against these message IDs"?

      A campaign can be set up to send to more than one segment or category. It is possible for the same contact to be a member of one or all of those segments or categories. When the campaign is sent the system will dedupe contacts that appear in multiple ...
    • Will deleting segments affect my ability to view past campaigns?

      Deleting segments (and tags) will not prevent you from viewing sent campaign reports. In the event that you delete a segment/tag, you are deleting the grouping of contacts, you are not deleting contact records or campaigns sent to the deleted segment ...
    • How do I find past sent campaigns?

      Finding Sent Campaigns Beyond the 120-Day Default By default, your Campaigns Dashboard in Delivra only displays campaigns sent in the last 120 days. But what if you need to locate something older—perhaps to view past results or clone a successful ...
    • Suppressing Contacts from Mailings

      In Delivra, there are several ways to suppress contacts—either manually or automatically—from receiving your mailings. These options help you manage communication frequency, maintain compliance, and protect your sender reputation, all while ...