The case kept the wrong owner. Either the rule never ran, or something ran after it.

When a Salesforce case assignment rule seems not to work, the most likely cause is that nothing asked for it. A case saved from Apex, from an integration that turned the rule off, or from a form where the “Assign using active assignment rule” box was clear keeps the owner it was created with. The second most likely cause is a flow that runs after the rule and sets the owner again.

The two minute check narrows it down. Open one wrong case, read its Case History from the bottom up, and compare the owner with the rule entry that case should match. An owner change under the default case user is the rule’s own change. No owner change at all means the rule never ran, or that something replaced its result inside the same save; one test case in a sandbox tells you which.

If someone else runs your Salesforce, send them this page and ask for the result of the two minute check on three wrong cases.

Apex Developer Guide, Apex Reference Guide, REST API Developer Guide, Object Reference, Metadata API Developer Guide, Data Loader Guide and Trailhead, read on 3 December 2026. Reviewed 3 December 2026.

Why is my Salesforce case assignment rule not working?

Because the rule either never ran, ran and matched a different entry, or ran and was overwritten. Salesforce runs a case assignment rule only when the save asks for it, evaluates the entries of the one active rule top down and stops at the first match, and then lets after save flows change the owner again. Each failure leaves a different trace in the case history, so read the trace before you edit the rule.

Run the check on one wrong case. In the Developer Console query editor, replace the Id with your case:

SOQL
SELECT CreatedDate, CreatedBy.Name, Field, OldValue, NewValue
FROM CaseHistory
WHERE CaseId = '500XXXXXXXXXXXX'
ORDER BY CreatedDate ASC

The Object Reference lists three special values in the Field column: ownerAssignment when the owner was changed, ownerAccepted when a user took the case from a queue, and ownerEscalated when an escalation rule moved it. Salesforce records changes made by assignment rules under the default case user set in Support Settings, so a rule change carries that user’s name, not a person’s.

#What the history showsMost likely causeWhere to look
1No owner change after creationThe save did not ask for the ruleHow the case was created: form, Apex, flow, integration, import
2Owner differs from the entry the case matches, and a flow on Case sets OwnerAn after save flow or other automation overwrote the ruleRecord triggered flows on Case that set Owner; reproduce once in a sandbox
3Owner set by the rule, but to the wrong queueAn earlier entry matched firstSort order of the rule entries
4Owner set to the default case ownerNo entry matchedThe criteria, and what was empty at save time
5Owner never changes on any caseThe rule you edited is not the active oneSetup, Case Assignment Rules, Active column
6Owner right, record type changedThe assignee’s default record type was appliedSupport Settings, record type on assignment
7Owner changed on edit, months after creationSomeone saved with the rule box tickedPage layout default for the assignment checkbox
One case save, in the order Salesforce runs itBefore save flows and beforetriggersOwner set here:overwritten by the ruleAfter triggersAssignment rule, step 9Owner set by the ruleDoes the save ask forthe rule?Form: the checkboxAPI: a headerApex: DMLOptionsAfter save flows, step 14Owner set here: alwayswinsThe case is savedDuring a recursive save, Salesforce skips steps 9 to 17.One case save, in orderBefore save flows and beforetriggersOwner set here: overwritten bythe ruleAfter triggersAssignment rule, step 9Owner set by the ruleDoes the save ask for therule?Form: the checkboxAPI: a headerApex: DMLOptionsAfter save flows, step 14Owner set here: always winsThe case is savedDuring a recursive save, Salesforceskips steps 9 to 17.
The rule decides the owner at step 9 when an entry matches. An owner set before it is overwritten; an owner set after it wins.

The checks below run in the order that costs least to confirm. I have not counted causes across many orgs, so the order is about effort, not proven frequency.

Was the case created by a path that asks for the rule?

Check this first. A case created in the user interface runs the rule only when the assignment checkbox is ticked. A case created by Apex runs it only when the code sets an assignment rule header. A REST API call runs it unless the caller sends a header that turns it off. Each path has its own switch, and the wrong one is set more often than the rule is wrong.

How the case was createdDoes the active rule run?How to ask for it
New Case in the user interfaceOnly if “Assign using active assignment rule” is tickedPage layout properties: show the checkbox and tick it by default
REST APIYes, unless the call sends Sforce-Auto-Assign: FALSELeave the header out, or send TRUE or a rule Id
SOAP API, Bulk APIOnly with an AssignmentRuleHeader, or a rule Id on the bulk jobSet useDefaultRule to true, or pass assignmentRuleId
Apex DMLOnly with Database.DMLOptions set on the recordSet useDefaultRule to true on assignmentRuleHeader
Data LoaderOnly if Settings, Assignment rule holds a rule IdEnter the Id; it overrides the Owner column in your file
Email-to-CaseThe routing address owner is used when the rules find no ownerCheck both the rule and the routing address
A flow’s Create Records elementNo setting for the rule is documented in the guides I readTest it, or create the case through invocable Apex

The Metadata API guide describes the two layout properties behind the checkbox: one shows it on the page, the other sets its default. If the checkbox is shown but not ticked by default, every agent who forgets it creates a case that stays with them.

For Apex, the Apex Developer Guide is plain that DMLOptions “take effect only for record operations performed using Apex DML and not through the Salesforce user interface”. Code that inserts a case without them leaves the owner as the running user. The fix is three lines:

Apex
Database.DMLOptions dmo = new Database.DMLOptions();
dmo.assignmentRuleHeader.useDefaultRule = true;
newCase.setOptions(dmo);
insert newCase;

For flows, test before you trust. Create one case from the flow in a sandbox and run the history query. If the owner is the flow’s running user, move the create into a small invocable Apex action that sets the header as above.

Did a flow change the owner after the rule ran?

Probably, if a record triggered flow on Case sets Owner and the case ends with an owner its matching entry does not name. Salesforce saves a case in a fixed order: before save flows, before triggers, after triggers, then assignment rules at step 9, then after save flows at step 14. A before save flow that sets the owner is overwritten by the rule. An after save flow that sets it overwrites the rule.

Before you rely on the history as proof, reproduce it once in a sandbox: create a case that the rule assigns, let a test flow change the owner after save, and read the history. If you see only one owner change, compare the owner with the rule entry instead.

The Apex Developer Guide lists the full order under Triggers and Order of Execution. Three consequences follow for case owners:

  1. An owner set in a before save flow or a before trigger never survives an active rule that matches. Move that logic into a rule entry.
  2. An owner set in an after save flow always wins. If the flow is meant to fill a field the rule reads, it fills it too late, see the next check but one.
  3. During a recursive save, Salesforce skips steps 9 to 17, so an update made by automation inside the same save does not run the assignment rule again.

To find the flow, open Setup, Flows, filter on Case as the triggering object, and search each flow for an assignment to Owner. One owner decision in one place is the rule worth keeping.

Does an earlier rule entry catch the case first?

Very often, when the case lands in a queue, just the wrong one. Salesforce processes the entries of the active rule by Sort Order, and Trailhead says that when a case matches an entry “it’s assigned without proceeding to other entries”. A broad entry high in the list, such as Origin equals Email, swallows every narrower entry below it.

Open Setup, Case Assignment Rules, the active rule, and read the entries top down with one wrong case in front of you. The first entry whose criteria that case meets is the one that ran. Then reorder: narrow entries first, broad entries last, and one final entry with no criteria that sends everything else to a triage queue.

Without that last entry, a case that matches nothing goes to the default case owner. The Metadata API guide defines that setting as “the default owner of a case when assignment rules fail to locate an owner”. If your wrong cases all sit with one person or one queue, check whether that is your default owner in Support Settings.

Is the rule you edited the one that is active?

Check the Active column before anything else in the rule. Salesforce allows one active case assignment rule at a time. Trailhead warns that activating a rule “disables any other assignment rules in your organization”. Teams often build a new rule beside the old one, test it, and never activate it, or activate it and lose the entries the old one held.

The same answer comes from a query, which helps when several rules have similar names:

SOQL
SELECT Name, Active, CreatedDate, LastModifiedDate
FROM AssignmentRule
WHERE SobjectType = 'Case'

The Object Reference says this object is read only: rules are built in Setup, not loaded. To compare entries between sandbox and production, retrieve the AssignmentRules metadata type for Case, which holds every rule and its entries in one file.

Do the criteria read a field that is empty when the case is saved?

This is the usual cause when every wrong case goes to the default owner. The rule reads the case at step 9 of the save. Any field that an after save flow fills, such as a product, a region or a priority worked out later, is still empty when the rule looks at it. The entry does not match, and nothing says why.

Trailhead points out that entries can use fields from related records, such as the account, the contact, the asset or the user. That helps, and it adds a second way to be empty: a case saved without an account has no account fields for the rule to read.

To confirm, pick a wrong case, read the values the entry tests, and ask when each one was filled. Field history on those fields, or the CreatedDate and LastModifiedDate of the case, show whether the value arrived after creation. The fix is to fill the field before save, in a before save flow, or to have the flow that fills it also reassign the case.

Why did the record type change after the case was assigned?

Because of a support setting, not the rule. The Metadata API guide describes keepRecordTypeOnAssignmentRule: when rules assign a manually created case, Salesforce either keeps the existing record type or replaces it with the assignee’s default record type. Set to replace, a correct assignment can move the case to a page layout and status set your agents do not expect.

Find it in Setup, Support Settings, as the option about keeping the existing record type on assignment. Turn it on if your record types follow the kind of request and not the team that owns it.

When is it not your configuration?

Some of it is the platform working as written, not a fault in your setup. Code and integrations decide for themselves whether to ask for the rule, an import can apply it when you did not want it, and code that asks for it with no rule defined leaves the case unassigned. Rule out these four before you rebuild anything.

What you seeWhy, per Salesforce documentation
A case created from Apex stays with the running userDMLOptions apply only to Apex DML that sets them
An integration’s cases are never assignedThe REST call sends Sforce-Auto-Assign: FALSE, or a SOAP or bulk call sends no header
An imported batch of old cases all moved to new ownersData Loader’s assignment rule setting overrides the Owner column, and REST applies active rules by default
A rule run from code with no rules defined leaves the case unassignedFrom API version 30.0, with useDefaultRule and no rules, the case is not given to the default owner

The import row matters during migrations. Loading historical cases with an active rule and the REST default reassigns closed work to today’s queues. Turn the header off for the load, as described in moving from Zendesk to Salesforce.

Should cases be assigned to people or to a queue?

To a queue, in most small service teams, with one person claiming each case. Assigning straight to a named agent fails quietly when that agent is away: the case waits and nobody sees it. A team queue keeps every case visible, and the rule only has to decide which team, which is easier to keep right.

That was the design on the insurance agency service desk I built in Service Cloud, now in production. Each service address feeds a team queue, an agent claims a case with a Take it action before replying, and the kind of request is set from keyword records the agency’s administrator maintains. Work is claimed rather than handed out on arrival, because a request routed to someone on holiday just sits there.

Claiming brings its own problem: owning a case does not stop a colleague from answering it. How to make the owner the only one who replies is on case ownership rules. Why the same customer email can open two cases in the first place is on Email to Case duplicate cases, and how the routing address and its default owner are set is on Email-to-Case setup.

What do admins ask about case assignment rules?

  • QCan a case assignment rule assign to an inactive or frozen user?

    The Salesforce documentation I read today does not say. Do not rely on it: point every entry at a queue and keep people in queues. A queue survives staff changes; an entry pointing at a person breaks the day they leave.

  • QDo assignment rules run when a case is updated?

    Only when the update asks for them, as on create: the checkbox on the edit page, a header in the API call, or DMLOptions in Apex. A plain edit does not reassign the case.

  • QWhy do cases from email go to one person?

    Because the routing address owner is the default case owner, used when the rule finds no owner. Either an entry for email cases does not match, or the rule is not running. Run the history query on one email case.

  • QShould I use Omni-Channel instead?

    Not to fix this. Omni-Channel routes work onward to agents, and an Email-to-Case routing address can name an Omni-Channel flow plus a fallback queue. A rule that never runs is still a rule that never runs, and a small team often needs only the rule and a claim action.

  • QHow do I stop the SLA clock starting before a case is assigned?

    That is entitlement and milestone setup, not the rule. It is covered on business hours and SLA in Service Cloud.

Found the cause, or still stuck?

Three ways forward. Write three lines on the contact page with what the history query showed, and you get a written answer within one working day. If routing faults keep coming back, monthly support is €680 a month for 8 hours, three months minimum. If you suspect more than one rule is quietly wrong, run the twelve read only checks on the Service Cloud audit; they cost nothing and show which rules to send me. A single fault fixed against a written scope is a repair from €3,400.

Serhii Skrypnyk, Senior Salesforce Administrator, Salesforce certified, on the platform since 2018. Reviewed 3 December 2026. The service desk mentioned above is in the insurance agency case.