Today8 stories · 1 brief

The Daily Org

Spring '27Sandboxes 6 Feb 2027

Curated by Abhinav (opens in a new tab)

Vol. I · No. 41The independent daily for Salesforce admins, developers and architects8 stories · 1 brief

Must-readApex and platform

Bulkifying an Opportunity trigger to avoid the 101 SOQL limit error (opens in a new tab)

You will learn why a per-record SOQL query inside a trigger loop fails on bulk loads, and how to refactor it to one query and one DML statement using a map keyed by Account ID.

Why read this

You will also see the trade-offs between triggers, Flows and Queueable Apex.

Per-record (fails)

  • Query Account inside the loop
  • Update Account inside the loop
  • Fails on record 101

Bulk-safe (map)

  • Collect deltas in a map by AccountId
  • One SOQL query with IN
  • One DML update for the list
The failing per-record pattern set against the bulk-safe pattern

A trigger that passes a single-record test can fail a 200-row bulk import with a Too many SOQL queries error. This happens with Data Loader, Bulk API and scheduled integrations, and it usually shows up first in production, because sandbox test data rarely reaches 200 rows per batch. The article argues that the fix is to change how the trigger reads and writes data, not to retry or buy more licences.

The author uses an after update trigger on Opportunity that adds the Amount of newly closed-won deals to a Total_Won__c field on the parent Account. The original version queries and updates the Account once per record, which breaks on record 101 under the 100 SOQL limit and would also run into the 150 DML statement cap. The article uses this failing version to show the cause of the error.

The refactor has three steps. First, audit every query and DML statement that sits inside a loop over Trigger.new. Second, collect the qualifying deals into a map keyed by AccountId, filtering on the stage change so later edits do not double count, then run a single query with IN and a single update. The map also merges several deals for the same Account. Third, weigh the options: a handler class gives testability and bulk control, Record-Triggered Flow is quicker for simple logic but shares the same caps, and Queueable Apex allows more queries and CPU time at the cost of eventual consistency.

The article closes with a short FAQ. It notes that a LimitException cannot be caught with try-catch, that Limits.getQueries() can be used to check usage, and that Queueable suits follow-up work while Batch Apex suits large record sets. It recommends testing with 200 records in a single call so that the test matches the real chunk size.

Read the original at dev.to (opens in a new tab)

Worth reading?

Must-readFlow and admin

Reconciling record counts and parent relationships after a Salesforce load (opens in a new tab)

You will learn how to reconcile source and target row counts for each object using Data Loader's success and error files, and how to find children with blank parent lookups or missing children per parent using SOQL.

Why read this

The examples are illustrative and were tested in LibreOffice Calc.

  1. Count success and error rows
  2. Compare with source and target COUNT()
  3. Count children with blank parent
  4. Compare children per parent
Reconciliation sequence for a finished load, from object counts to per-parent checks

After a Data Loader or Bulk API job finishes, a load can be short on rows or leave parent lookups blank even when every child is accepted. The article suggests reconciling counts per object using the job’s success and error files, along with the JobInfo fields numberRecordsProcessed and numberRecordsFailed when the Bulk API is used. It then compares those numbers with a SOQL COUNT() on the target object, and shows spreadsheet formulas to check that success plus error matches the source and that the target matches the success file.

The second step checks whether parents resolved. A SOQL COUNT() with a WHERE clause on a blank lookup field shows how many children have no parent, and a relationship query reads the parent name to inspect those rows. The author notes that a blank lookup may be legitimate on an optional field, so these rows should be treated as a review list rather than a failure.

The third step compares child counts per parent between source and target, using GROUP BY with COUNT on a shared external key, since record Ids usually change between orgs. A parent can look correct overall yet be short because some of its children were rejected. The example shows one parent with two children in the source and none in the target, flagged for review.

The article closes by noting that matching counts do not prove each child is attached to the intended parent, and that SOQL can only count records the user can see. It also advises removing personal fields before sharing exports. The piece ends with a promotion for a paid export review service, which is not part of the technique.

Read the original at dev.to (opens in a new tab)

Worth reading?

RecommendedArchitecture

Write a metric contract before giving an AI agent access to CRM and ERP data (opens in a new tab)

You will learn why the same business metric can differ across Salesforce and an ERP, and how a versioned metric contract naming one source of truth and owner per number prepares data for an AI agent.

Won opportunities

  • Sums Amount on Opportunity
  • Filters on IsWon and CloseDate
  • Measures closed deals this month

Activated orders

  • Sums TotalAmount on Order
  • Filters on Status and EffectiveDate
  • Measures orders effective this month
Two valid queries for the same business question can return different totals

A sales manager asking for one figure often gets three answers: the CRM, the ERP and a spreadsheet each record a different moment of the same sale. The author says this is common in mid-sized companies running Salesforce beside a separate ERP, and that an AI agent given access without resolving it will simply pick one number.

The piece illustrates the problem with two valid SOQL queries for sales this month: one summing won Opportunities by close date, the other summing activated Orders by effective date. Both are correct and can return different totals on the same day, while invoicing in the ERP follows its own date logic.

The proposed fix is a metric contract, a short versioned YAML file. For each metric it names the question, the definition, the source of truth, the object and filter, the amount field, an owner, what the metric is not, and any metrics it reconciles with along with the expected gap. The example pairs a sales_this_month metric on the Order object with an invoiced_this_month metric held in the ERP.

The author’s practical rules are to give the agent the contract as context rather than only database access, to flag metrics that depend on spreadsheets as candidates for removal, and to review the contract when processes change, as one would review code. The article also notes that a single data source avoids much reconciliation work, and it promotes the author’s own ERP product built natively on Salesforce.

Read the original at dev.to (opens in a new tab)

Worth reading?

RecommendedAgentforce and AI

Salesforce Koa, a reasoning model trained on CRM work, is in pilot (opens in a new tab)

You will learn what Koa is, the role a reasoning model plays inside an Agentforce agent, and how Salesforce's own benchmark results compare it with GPT-4.1 and GPT-5.5.

Why read this

You will also see why those results need independent confirmation before you rely on them.

  • 87%: Koa multi-step CRM tasks completed
  • 82%: GPT-4.1 multi-step CRM tasks completed
  • 91%: GPT-5.5 multi-step CRM tasks completed
Koa's results on Salesforce's own internal CRM benchmark, reported in the paper

Salesforce announced Koa at Dreamforce 2026 as its first AI reasoning model built specifically for CRM work. Inside an agent, the reasoning model decides which steps to take, in what order, and which tools to use, while the rest of the agent carries them out. Koa runs behind the scenes, and admins choose it for an agent the same way they choose any other model.

Salesforce argues that general-purpose models reason from scratch on every task and may not behave the same way twice, whereas CRM work is largely repetitive and rule-based. It claims a model trained on that work will be steadier, and that it should be better at recognising its own limits and saying when it cannot do a job. The article notes that Salesforce claims three times fewer errors on CRM tasks, but does not say which models it was compared against, and the paper does not contain that figure.

The paper’s own numbers are more mixed. On multi-step CRM tasks Koa completed 87%, against 82% for GPT-4.1 and 91% for GPT-5.5. On a single-step CRM score it reached 0.87, against 0.81 and 0.90. Koa beats GPT-4.1 but trails GPT-5.5 slightly, and all results come from Salesforce testing its own model, with no independent evaluation yet.

Salesforce says Koa was trained on simulated and public data only, and it does not replace other models, which stay available for each agent. Koa is still in pilot, so most orgs cannot switch to it yet. The article suggests building a small test set of real agent tasks with known-good outcomes now, so Koa can be compared fairly when it arrives, and it stresses that clean data matters more than the model.

Read the original at dev.to (opens in a new tab)

Worth reading?

Agentforce and AI

AI Skills let Agentforce Coworker run repeatable team tasks (opens in a new tab)

You will learn what AI Skills in Agentforce Coworker are, how they differ from Prompt Builder templates, and how sharing and permissions are meant to control them.

Why read this

The author notes that admin-level maintenance guidance is still missing.

AI Skills are reusable sets of instructions that tell Agentforce Coworker how to complete a repeatable task. The author compares them to skills in Claude: the task is defined once, and anyone with access can run it the same way each time. Salesforce says Coworker is the first Agentforce agent to include them. They were announced in pilot in September, with general availability planned for October, as part of a wider Coworker expansion covering Microsoft Teams, mobile and desktop apps, and an MCP server.

The article separates AI Skills from Prompt Builder. A Prompt Template gives a repeatable way to prompt an LLM for text output, such as a sales email or record summary. A skill describes a whole task so an agent can work through each step and take action, which the author says makes skills the more powerful of the two. Salesforce’s examples include account research, meeting prep, case classification, flagging renewal risk and case summaries, all work people repeat and often do slightly differently each time.

On governance, skills are private until the creator shares them, and sharing is controlled by the creator. A skill runs as the person using it, and Coworker respects existing permissions, so users should only see records and objects they already have access to. Coworker also pauses for approval before it creates or updates a record. The author argues this is powerful enough that admins need clearer guidance on maintaining skills across a team, and promises a deeper walkthrough later.

Read the original at Salesforce Ben (opens in a new tab)

Worth reading?

Flow and admin

Routing every Salesforce Lead to the right rep with Assignment Rules (opens in a new tab)

You will know how Salesforce Lead Assignment Rules evaluate entries, why a catch-all Queue matters, and the main ways to get round-robin distribution.

Why read this

You will also have a short checklist for testing before activation.

  1. Lead is created with assignment flag set
  2. Entries checked top to bottom
  3. First matching entry sets the owner
  4. No match: lead goes to catch-all queue
How a new lead is routed through assignment rule entries

Lead Assignment Rules route each new Lead to an owner as soon as it is created, which removes the slow and inconsistent manual triage that many teams rely on. The rule is a list of entries evaluated top to bottom, each with criteria and an owner that is a User or a Queue. The first entry whose criteria match wins, so the most specific entries must sit above the broader ones or they will never fire.

The article points out a common trap: rules only run when the record is created with the “Assign using active assignment rule” flag. The web-to-lead form, the API and Data Loader set this by default, but a manual record created in the UI does not unless the user ticks the box. It recommends structuring entries by territory first, then Lead Source, then score or company size, rather than writing one large entry per rep.

Every rule should end with a catch-all entry that sends unmatched Leads to a Queue rather than a named person, since a Queue is visible to the whole team and keeps working when someone is away. A growing catch-all Queue is a sign that criteria are missing a segment. Standard Lead Assignment Rules do not provide round-robin, so the options are a Queue that team members pull from, an autolaunched Flow that stamps a rotating owner using a counter field, or a third-party tool. The author suggests a Queue for most small teams because it is easier to audit, and notes that a Flow assigning owners should run in system context so creating-user permissions do not block it.

Before activating, create a test Lead for each entry and one that matches nothing, confirm each lands with the right owner, and check the web-to-lead path specifically. The article advises trialling the rule in a Sandbox against a week of real traffic before changing production.

Read the original at dev.to (opens in a new tab)

Worth reading?

Integration

Salesforce disables two Connected Apps over suspicious access token use (opens in a new tab)

You will learn that Salesforce disabled the Talent Rover and GoFundMe Pro Connected Apps and managed packages over suspicious access token use, and what the company said about their status.

Why read this

Read it if your orgs use either integration.

Salesforce disabled integrations with two Connected Apps in the week of November 10, 2025, after identifying suspicious use of access tokens linked to the third-party providers. The first advisory, posted on November 10, covered Talent Rover, a product owned by Bullhorn. Salesforce disabled its Connected Apps and managed packages as a precaution and said the issue did not stem from a vulnerability in the Salesforce platform.

The same day, Salesforce re-enabled the Talent Rover Connected Apps and managed packages after Bullhorn completed security remediation. The second advisory, issued November 11, applied the same measures to the GoFundMe Pro Connected App and its associated managed packages. Salesforce again said the core platform was not at fault.

Salesforce and GoFundMe are investigating the activity together. The GoFundMe Pro integrations will stay unavailable until remediation is complete and GoFundMe has shown they can be restored safely. Salesforce said it will notify affected customers without undue delay if it finds unauthorized access to their data. At the time of writing, GoFundMe Pro remained disabled, and the article notes the earlier Connected App problems of 2025, which led Salesforce to harden Connected App security.

Read the original at Salesforce Ben (opens in a new tab)

Worth reading?

Apex and platform

Using Apex savepoints to roll back a failed multi-step transaction (opens in a new tab)

You will learn how Database.setSavepoint() and Database.rollback() undo DML made after a savepoint, and where that protection stops, such as external callouts and emails.

Why read this

The article includes a short worked example.

  1. Call Database.setSavepoint()
  2. Insert the Account
  3. Insert the related Contact
  4. Contact insert fails: catch the exception
  5. Call Database.rollback(sp) to undo the Account
How a savepoint lets a failed Apex transaction undo its earlier database changes

The article describes a common problem: an Apex method performs several database operations, and a later one fails, leaving earlier changes saved. Savepoints address this by marking a point in the current transaction that can later be restored.

It presents two methods. Database.setSavepoint() creates the marker, and Database.rollback() reverses database changes made after it. The worked example creates an Account and a related Contact inside a try block, and on exception rolls back to the savepoint so the Account insert is undone.

The author notes that rollback does not undo every side effect. External API calls and emails already sent are outside the database transaction and are not reversed. The article also contrasts savepoints with partial-success DML using Database.insert(records, false), which is a different approach from a full rollback.

The limitations listed include that savepoints apply only within the current transaction, that Salesforce caps the number of savepoints, that certain transaction-control operations can invalidate them, and that DML and other transaction limits still apply. Best practices suggest creating savepoints only before operations that may need reversing, using clear exception handling, and testing both success and failure paths.

Read the original at dev.to (opens in a new tab)

Worth reading?

In brief