Lesson 4 of 14 · All lessons

Section 2 · Developer Fundamentals · 27% of exam

2.3 Data Modeling, Relationships, External IDs, and Developer AI

3 min read Updated Nov 16, 2026

Exam objective

Choose objects, fields, relationships, and external IDs for a scenario, and explain appropriate uses and limitations of Agentforce for Developers.

Model the business entities

A Salesforce data model represents the entities an organization tracks and how they relate. Use a standard object when its built-in purpose fits the requirement; use a custom object when the business needs a distinct entity. Choose field types based on meaning and use: dates for dates, currency for amounts, picklists for controlled categories, and formula fields for calculated values. Field selection affects validation, reporting, storage, and how developers query the data. A lookup relationship associates records while preserving more independent ownership. A master-detail relationship establishes a tighter parent-child structure: the child depends on its parent for ownership and sharing behavior, and the relationship supports standard roll-up summary fields. A junction object with two master-detail relationships is a common way to model many-to-many associations, such as students enrolled in courses. Use a lookup when the child can exist independently or needs a different ownership model. Use master-detail when the child is truly subordinate and the parent-child behaviors are wanted. Relationship choice is difficult to reverse after data and automation depend on it, so scenario questions often test the consequences, not just the definition.

External IDs and integration-shaped records

An external ID stores a key assigned by another system. A unique external ID can help match incoming data to one Salesforce record, and an upsert can update the match or insert a record when no match exists. An external ID field does not itself create a lookup relationship; relationship fields and API operations represent the link between records. When an import references a parent by external key, confirm the key is unique, populated, and mapped to the correct object. Suppose an ERP sends invoice rows that can be retried. A stable external invoice number can make repeated upserts idempotent by targeting the same Salesforce record instead of inserting a duplicate. If the key is not unique, matching can be ambiguous or dependent on permissions and operation behavior. A robust design validates the source key, tracks errors, and handles parent references deliberately.

Agentforce for Developers: assistance with human review

The current objective refers to use cases and limitations of Agentforce for Developers. Salesforce now documents Agentforce Vibes as an AI-powered development tool that works with Salesforce projects and org context. It can help draft Apex, Lightning Web Components, tests, metadata, or explanations. These are suggestions that accelerate development; the developer remains responsible for verifying compilation, data access, governor behavior, tests, API compatibility, and intended requirements.

Use it for a bounded task, such as scaffolding a small component from a specification or explaining a handler's control flow. Give it non-sensitive context, inspect the diff, and run targeted tests. Do not accept generated code merely because it resembles a familiar pattern. AI can misunderstand schema details, invent fields, use an unsafe access mode, or omit bulk behavior. Features, editions, model access, permissions, and rates can change; check current Salesforce documentation and org availability before depending on a capability.

If the requirement centers on data identity, draw a small relationship map and mark the source of each key. Then determine whether a lookup, master-detail, junction object, or external ID provides the needed behavior.

Extra concept: cardinality and optional relationships

Ask whether a record must have zero, one, or many related records and whether the relationship is required. This simple cardinality check exposes common modeling errors: storing repeating child information in comma-separated text, using a master-detail link for an optional child, or choosing a single lookup when the business needs many associations.

Key takeaways

  • Data models express entity meaning, relationship strength, cardinality, ownership, and aggregation needs.
  • External IDs support matching and upsert when source keys are stable and appropriately unique; they do not replace relationship fields.
  • Agentforce Vibes can speed development, but generated artifacts require human review, security checks, tests, and version-aware validation.
  • Official references:
  • Salesforce Certified Platform Developer Exam Guide: https://help.salesforce.com/s/articleView?id=005298965&language=en_US&type=1
  • Salesforce Object Reference: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/
  • External ID upsert API: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_upsert.htm
  • Agentforce Vibes overview: https://developer.salesforce.com/docs/platform/agentforcevibes/guide/afv-overview.html
  • Agentforce Vibes supported use cases: https://developer.salesforce.com/docs/platform/agentforcevibes/guide/afv-use-afv.html
  • Agentforce Vibes safety and permissions: https://developer.salesforce.com/docs/platform/agentforcevibes/guide/afv-permissions-safety.html

Check your knowledge

Answer exam-style Developer Fundamentals questions with answers and explanations.

Practice Developer Fundamentals
Finished this lesson? Mark it complete to track your progress.

Ready for the real exam?

Take the timed Salesforce Platform Developer simulator: same number of questions, same time limit.

Get Complete Access