Sub topic 1
The Salesforce automation toolbox at a glance
Prerequisites
This chapter assumes you know the basic Salesforce data model: objects, fields, records and relationships. You should also be able to find your way around Setup and the Object Manager. Reading simple Apex or SOQL is optional. The Apex snippets are short and explained in the text.
Why there are so many tools
Salesforce has built up several ways to automate work over the years. Some are newer, some are legacy, and some overlap. Picking one starts with knowing what each tool is for. This chapter gives you the map. Later chapters cover each tool in depth.
The main tools
Salesforce groups its automation into three families: declarative features, Flow, and Apex. Declarative means you configure the feature with clicks instead of writing code.
| Tool | Family | Typical use |
|---|---|---|
| Validation rule, formula field, roll-up summary field | Declarative | Block bad data, calculate a value, summarize child records |
| Record-triggered flow | Flow | Act when a record is created, updated or deleted |
| Screen flow | Flow | Guide a user through steps and collect input |
| Scheduled flow | Flow | Run batch work at a set time |
| Approval process | Declarative | Route a record for formal sign-off |
| Flow Orchestrator | Flow | Coordinate multi-step work across several users |
| Apex trigger | Code | Complex logic or high volume when record changes |
| Asynchronous Apex | Code | Slow or large jobs in their own transaction |
| Workflow Rule, Process Builder | Legacy | Existing automation that should move to Flow |
How the tools relate
The tools sit on a rough ladder of complexity. Simpler tools are cheaper to build, easier for admins to maintain, and less likely to hit platform limits. Code gives you the most control but costs more to test and support.
The same task in two tools
Many requirements can be met in more than one tool. Suppose an account with annual revenue of 1,000,000 or more should get the rating Hot. A before-save record-triggered flow can do this with no code. The same rule in Apex looks like this:
trigger AccountTrigger on Account (before insert, before update) {
for (Account acc : Trigger.new) {
if (acc.AnnualRevenue != null && acc.AnnualRevenue >= 1000000) {
acc.Rating = 'Hot';
}
}
}The trigger loops over every record in Trigger.new and sets a field. It uses no query and no DML statement, so it handles a bulk load of many records safely. Both versions give the same result here. The flow is easier for an admin to change later, which is why it is usually the first choice.
Common mistakes at this stage
- Treating the tools as interchangeable. They differ in limits, timing and who can maintain them.
- Building new automation in Workflow Rules or Process Builder. Both are legacy, so build new work in Flow.
- Using several tools on one object without a plan. Overlapping automations can conflict, and a later chapter covers this.
Exercise
A team wants a rule that stops users from saving an Opportunity with a negative Amount. Which tool family from this chapter fits best, and why?
Show answer
A declarative feature, specifically a validation rule. It blocks the save with a clear message, needs no code or flow, and is the simplest tool that solves the problem.