Standard Actions
Master CRUD Operations
Deep dive into all 6 Standard Actions your agent needs: Get Record, Query Records, Create Record, Update Record, Send Email, Create Task. Real XYZ Company examples, code patterns, error handling, interview Q&A. Your agent now performs rock-solid CRUD ops on Salesforce data!
Action 1: Get Record — Fetch Single Record
Look up a record by ID or field value. Returns all fields.
| Aspect | Details |
|---|---|
| What it does | Fetches one record by ID or field lookup (e.g., Account by Name, Contact by Email) |
| Input | Object (Account/Opportunity/Contact), Record ID or field/value pair |
| Output | All fields of that record (ID, Name, fields, etc.) |
| Speed | Instant (sub-100ms) |
| Common Use | User says “Tell me about ABC Pharma” — Get Record fetches Account with Name=ABC Pharma, returns all details |
Agent Action: Get Record (Account where Name = “ABC Pharma”)
Returns: Account ID, Name (ABC Pharma), Industry (Healthcare), Location (Mumbai), Phone, Revenue ($50M), Description, etc.
Next: Agent uses these details to find Contact with LastName=Rajesh at this Account, then responds with info
Action 2: Query Records — Get Multiple Records
Run SOQL queries. Return list of matching records.
| Aspect | Details |
|---|---|
| What it does | Runs SOQL query, returns matching records as list |
| Input | SOQL query string (SELECT ... FROM ... WHERE ...) |
| Output | List of records (0 to 10K records, respects limits) |
| Speed | Depends on data volume. Usually sub-500ms |
| Common Use | Agent: “Find all open Opportunities with amount > 1M” — Query returns list — Agent analyzes & prioritizes |
Query:
SELECT Id, Name, Account.Name, Amount, StageName, Probability
FROM Opportunity
WHERE StageName NOT IN (’Closed Won’, ’Closed Lost’)
AND Amount > 5000000
ORDER BY Amount DESC
LIMIT 10
Returns: List of 3-5 open Opps, all > ₹50L, sorted by size
Agent: Displays list & can summarize each with Prompt Builder
SELECT Id, Name, Industry, BillingCity, AnnualRevenue FROM Account WHERE Industry = ’Healthcare’ LIMIT 20
Find recent Cases for Accounts:
SELECT Id, CaseNumber, Account.Name, Status, Priority FROM Case WHERE Status != ’Closed’ ORDER BY CreatedDate DESC LIMIT 10
Action 3: Create Record — New Records
Create new Account, Opportunity, Case, Lead, Contact, etc.
| Aspect | Details |
|---|---|
| What it does | Creates 1 new record. Pass required & optional fields. |
| Input | Object (Account/Case/Lead), field values (required: Name, etc.) |
| Output | New Record ID (+ success message) |
| Speed | Instant |
| Common Use | User: “Create a support case for ABC Pharma about tubing defect” — Agent creates Case — returns Case # |
Agent Action: Create Record (Case)
Object: Case
Fields:
— Subject: “Quality Issue - Tubing Order (from Tubing Agent)”
— Description: “ABC Pharma reported defect in medical grade tubing...”
— Priority: High
— Status: New
— ContactId: [Rajesh at ABC Pharma]
— Origin: Chat
Returns: Case ID (5003x0000001xyz), Case Number (00001234)
Agent Response: “I’ve created Case #00001234 and assigned to Support team. They’ll contact you within 2 hours.”
Action 4: Update Record — Modify Existing
Change field values on existing records. No code.
| Aspect | Details |
|---|---|
| What it does | Modifies specific fields on existing record |
| Input | Record ID (required) + fields to update + new values |
| Output | Success (updated count) or Failure (error) |
| Speed | Instant |
| Common Use | Agent: “Move this Opp to Proposal stage” — Update Opportunity StageName — Done! |
Agent Action: Update Record (Opportunity)
Record ID: 0063x0000001abc (tubing opp for ABC Pharma)
Fields to Update:
— StageName: “Proposal/Price Quote” (from Qualification)
— NextStep: “Awaiting ABC Pharma feedback on pricing”
— ExpectedRevenue: 2500000 (₹25L)
Returns: Success
Agent: “Moved ABC Pharma tubing opportunity to Proposal stage. Expected revenue: ₹25L.”
Action 5: Send Email — Automated Emails
Send email from agent. No SMTP setup needed.
| Aspect | Details |
|---|---|
| What it does | Sends email. Tracked in Salesforce Activity (if Contact/Lead found) |
| Input | To (email), Subject, Body (HTML or text). Optional: CC, BCC |
| Output | Success (email sent) or Failure |
| Speed | Instant (email queued) |
| Common Use | Agent: Draft email with Prompt Builder — Send Email — Tracking logged |
Agent Action: Send Email
To: rajesh@abcpharma.com
Subject: “Following Up: XYZ Tubing Proposal (₹25L) — ABC Pharma”
Body: [Composed by Prompt Builder template]
“Hi Rajesh,
We sent the medical-grade tubing proposal (₹25L, 30-day turnaround) 5 days ago. Do you have any questions or feedback?
If you’d like to discuss pricing options or technical specs, I can set up a call.
Looking forward to your thoughts!
— XYZ Sales Team”
Returns: Email sent. Tracked in ABC Pharma Account activity!
Action 6: Create Task — Reminders & Follow-Ups
Create task assigned to user or team. Automatic reminders.
| Aspect | Details |
|---|---|
| What it does | Creates Task assigned to user, with due date & reminders |
| Input | Subject, Due Date, Assigned To (user ID), Priority, Description |
| Output | Task ID (+ success message) |
| Speed | Instant |
| Common Use | Agent: “Create follow-up task for Ankit: Follow up ABC Pharma in 3 days” |
Agent Action: Create Task
Subject: “FOLLOW UP: ABC Pharma Tubing Proposal (₹25L) — Awaiting Response”
Due Date: Today + 3 days
Assigned To: Ankit Nahar (sales rep)
Priority: High
Description: “Sent medical-grade tubing proposal on [date]. Check for feedback. If no response, call Rajesh at ABC Pharma. Target close: next 7 days.”
Related Record: Account (ABC Pharma)
Returns: Task created, assigned to Ankit
Result: Ankit gets notification, task in his list, Salesforce sends reminder at due date!
All 6 Standard Actions — Quick Comparison
Side-by-side reference
| Action | Purpose | Input | Output | Speed | Use Case |
|---|---|---|---|---|---|
| Get Record | Fetch single record | Object, Record ID | All fields of record | Instant | Account lookup |
| Query Records | Fetch multiple records | SOQL query | List of records | Sub-500ms | Find all open Opps |
| Create Record | Create new record | Object, field values | New Record ID | Instant | Create Case from request |
| Update Record | Modify existing record | Record ID, new field values | Success/Failure | Instant | Move Opp to next stage |
| Send Email | Send email | To, Subject, Body | Email sent confirmation | Instant (queued) | Follow-up email |
| Create Task | Create reminder | Subject, Due Date, Assigned To | Task ID | Instant | Follow-up task for rep |
Standard Actions — Interview Questions
Real interview patterns
| Question | Answer |
|---|---|
| What’s the difference between Get Record and Query Records? | Get Record: Fetch ONE record by ID (instant, simple). Query Records: Fetch MULTIPLE records matching SOQL criteria (more flexible, returns list). |
| When would you use Create Task instead of just sending email? | Email notifies immediately (one-time). Task creates accountability & appears in user’s task list with due date & reminders. For follow-ups requiring action, use Task! |
| You need to find top 10 accounts by revenue and display details. Which action? | Query Records with SOQL: SELECT Name, Revenue FROM Account WHERE Revenue > X ORDER BY Revenue DESC LIMIT 10 |
| Can you bulk-update 10K records with one Update Record action? | No! Update Record is for single updates. Bulk updates need Flow with loop or Apex batch. Use appropriate tool for scale! |
| Design a workflow: User reports issue — agent creates case — notifies support lead — assigns follow-up task. Which actions? | Create Record (Case), Send Email (to support lead), Create Task (assign to support team lead for follow-up). |
Module 7 Summary — Standard Actions Mastered
What you know now
- ✅Get Record: Fetch single record by ID. Instant. Simple lookups.
- ✅Query Records: Fetch multiple records with SOQL. Flexible filtering. Perfect for analysis.
- ✅Create Record: New records. No code. Pass object & fields.
- ✅Update Record: Modify existing record fields. Single updates (not bulk).
- ✅Send Email: Automated emails with Salesforce SMTP. Tracked. Safe (Trust Layer).
- ✅Create Task: Reminders for users. Due dates. Automatic nudges.
- ✅All 6 are no-code: Configure visually in Agent Builder. No Apex needed!
- ✅Interview Ready: All 5 common questions + answers memorized.
🚀 Ready for Module 8?
Next: Flow Actions — Visual Workflows for Agents You'll learn how to build Flows that agents invoke: loops, conditionals, multi-step processes. When Standard Actions aren’t enough!
Module 8: Flow Actions —
New interview questions every week
Follow for fresh Salesforce Q&A, free courses, and real interview experiences — straight from the trenches.
Follow Us ↗1,500+ free questions, kept free thanks to readers like you.
Help Us Keep This Free →