# Declarative limits, invocable Apex and custom components

*Platform App Builder Study Guide · Salesforce Fundamentals · Last updated October 25, 2026 · https://www.certifyforce.com/study-guide/platform-app-builder/salesforce-fundamentals/declarative-limits-invocable-apex-and-custom-components*

When configuration is enough and when code is justified: the declarative-first rule, the HTTP Callout action with named and external credentials, invocable Apex actions in flows, and when a custom Lightning web component is the answer.

- Certification: Salesforce Platform App Builder
- Exam section: Salesforce Fundamentals
- Study guide: https://www.certifyforce.com/study-guide/platform-app-builder

**Official exam objective:**

> Given a scenario, identify the boundaries of declarative customization and the use cases for programmatic customization.

## What the exam expects

- Apply the "declarative first" rule and name the signals that justify code: logic too complex for configuration, a custom user experience, or heavy record volume.
- Choose the Flow Builder HTTP Callout action for a REST integration and list the credential setup it needs (external credential, named credential, permission set access).
- Explain when a flow should call an invocable Apex action, why `@InvocableMethod` replaces `Process.Plugin`, and why a user can fail at that action.
- Recognize when a custom Lightning web component is the answer on a record page or a flow screen, and why LWC beats Aura for new work.
- Key terms: **declarative** (point-and-click configuration); **programmatic** (Apex, Lightning components, Visualforce); **HTTP Callout action** (a flow action that calls a REST API without code); **named credential** (endpoint URL plus a link to authentication); **external credential** (how Salesforce authenticates to the remote system); **invocable Apex action** (an Apex method a flow calls as an Action element).

## Key facts

| Fact | Detail | Source |
|---|---|---|
| Recommended order | Declarative first; add code for complex logic or a custom UX; fully programmatic last | [Explore Essential Tools](https://trailhead.salesforce.com/content/learn/modules/isv_plan/isv_plan_identify_salesforce_technologies) |
| Setup order | Permission set, auth provider (OAuth only), external credential, named credential, then User Credentials access | [HTTP Callout Authentication](https://help.salesforce.com/s/articleView?language=en_US&id=platform.flow_http_callout_guidelines_authenticating.htm&type=5) |
| Callout errors | Status 300 or greater is an error; handle it with a fault path | [HTTP Callout Limits](https://help.salesforce.com/s/articleView?id=platform.flow_http_callout_considerations.htm&type=5) |
| Callouts in record-triggered flows | Only on the asynchronous path, after the save commits | [Record-Triggered Flow Considerations](https://help.salesforce.com/s/articleView?language=en_US&id=sf.flow_considerations_trigger_record.htm&type=5) |
| Apex from a flow | Running user needs the Apex class in a profile or permission set | [Apex Actions](https://help.salesforce.com/s/articleView?id=platform.flow_build_extend_apex.htm&type=5) |
| `@InvocableMethod` data types | No generic Object, Sets, Maps or Enums | [Apex Actions](https://help.salesforce.com/s/articleView?id=platform.flow_build_extend_apex.htm&type=5) |
| LWC in a flow screen | `lightning__FlowScreen` target plus `targetConfig` properties | [Configure for Flow Screens](https://developer.salesforce.com/docs/platform/lwc/guide/use-config-for-flow-screens.html) |
| LWC and Aura nesting | Aura can wrap LWC; an LWC can't contain Aura | [LWC or Aura](https://developer.salesforce.com/docs/platform/lwc/guide/get-started-lwc-or-aura.html) |

## Check yourself

- Why does Salesforce recommend trying declarative tools before code?
- Why are the named credential and the external credential separate?
- Why must a record-triggered flow's callout go on an asynchronous path?
- Which two features does `@InvocableMethod` offer that `Process.Plugin` lacks for flow performance and setup?

## Sources

- [Explore Essential Tools for Building Salesforce Apps](https://trailhead.salesforce.com/content/learn/modules/isv_plan/isv_plan_identify_salesforce_technologies)
- [Let Flows Execute Apex Actions](https://help.salesforce.com/s/articleView?id=platform.flow_build_extend_apex.htm&type=5)
- [Connecting to an API Without a Connector Using HTTP Callout](https://help.salesforce.com/s/articleView?id=platform.flow_http_callout.htm&type=5)
- [Guidelines for Authenticating HTTP Callout Actions](https://help.salesforce.com/s/articleView?language=en_US&id=platform.flow_http_callout_guidelines_authenticating.htm&type=5)
- [HTTP Callout Considerations and Limits](https://help.salesforce.com/s/articleView?id=platform.flow_http_callout_considerations.htm&type=5)
- [Named Credentials Glossary](https://help.salesforce.com/s/articleView?id=xcloud.nc_named_credentials_glossary.htm&type=5)
- [Record-Triggered Flow Considerations](https://help.salesforce.com/s/articleView?language=en_US&id=sf.flow_considerations_trigger_record.htm&type=5)
- [Record-Triggered Automation Decision Guide](https://architect.salesforce.com/docs/architect/decision-guides/guide/record-triggered)
- [How to Choose Lightning Web Components or Aura](https://developer.salesforce.com/docs/platform/lwc/guide/get-started-lwc-or-aura.html)
- [Configure a Component for Flow Screens](https://developer.salesforce.com/docs/platform/lwc/guide/use-config-for-flow-screens.html)
- [Configure a Component for Lightning App Builder](https://developer.salesforce.com/docs/platform/lwc/guide/use-config-for-app-builder.html)
- [Discover Use Cases for the Platform](https://trailhead.salesforce.com/content/learn/modules/starting_force_com/starting_discovering)
- [Platform App Builder Exam Guide](https://help.salesforce.com/s/articleView?id=005298964&language=en_US&type=1)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit, its 10 linked practice questions, and unlimited timed mock exams are included with the Platform App Builder pack (USD $19): https://www.certifyforce.com/practice-exams
