Courseiva
Salesforce Data Management →mediumMultiple Choice

SF-Data-Arch Salesforce Data Management Practice Question

Cloud Kicks is ingesting 20 million Account records nightly from an external ERP into Salesforce using the Bulk API 2.0. The ERP also updates existing records. During testing, the data architect observes that some records are duplicated because the external system's unique identifier is not enforced in Salesforce. Which solution should the architect implement to prevent duplicates during the nightly load?

⚠ Common exam trap

The trap here is assuming that duplicate rules alone can prevent duplicates during bulk loads, but they are not designed for upsert matching and can cause failures instead of updates.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Create a unique External ID field on Account and use the upsert operation with that field as the external ID.

An External ID field with the unique attribute allows Salesforce to reliably match incoming records to existing ones during an upsert. This prevents duplicates by updating matched records and inserting only new ones. Bulk API 2.0 supports upsert with an external ID, making it the most efficient and scalable solution for nightly loads of millions of records while maintaining data integrity.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    Create a unique External ID field on Account and use the upsert operation with that field as the external ID.

    Why this is correct

    Using an External ID field marked as unique and performing an upsert allows Salesforce to match incoming records to existing ones based on the ERP's identifier. This prevents duplicates by updating existing records instead of inserting new ones when the external ID already exists. Bulk API 2.0 supports upsert with an external ID, making it the optimal solution for large-volume, recurring loads.

  • ✗

    Schedule a nightly batch Apex job that deletes duplicates after the load completes.

    Why it's wrong here

    Cleaning up duplicates after the fact is reactive and risks data loss or incorrect merges. Batch Apex can identify duplicates but merging records programmatically is complex and may not preserve all relationships. This approach also consumes additional API limits and does not prevent duplicates from being created in the first place, leading to temporary data quality issues.

  • ✗

    Enable duplicate rules with a matching rule on the ERP identifier field and set the action to Block.

    Why it's wrong here

    Duplicate rules can block or alert on duplicates, but they are evaluated during record creation and do not automatically merge or update existing records. With Bulk API, duplicate rules may cause partial failures rather than seamless updates. They also add processing overhead and are not designed to match on an external ID field that is not yet populated during upsert.

  • ✗

    Use a before-insert trigger to query for existing records and update them if found, otherwise insert.

    Why it's wrong here

    A trigger-based approach would require a SOQL query per record, which is inefficient and can hit governor limits with 20 million records. Triggers cannot easily perform upsert logic at scale, and they would not prevent duplicates if the external ID is not indexed or unique. This approach is error-prone and not recommended for high-volume integration.

About these practice questions

One of 222 original SF-Data-Arch practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Salesforce exam blueprint

This SF-Data-Arch practice question is part of Courseiva's free Salesforce certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SF-Data-Arch exam.