PranavNagrecha/AwesomeSalesforceSkills / skills/admin/case-management-setup
case-management-setup
VerifiedConfiguring Salesforce case management: case queues, assignment rules, escalation rules, auto-response rules, Email-to-Case, Web-to-Case, case teams, entitlements, and milestones. Use when setting up or troubleshooting the Service Cloud case handling layer. Trigger keywords: email-to-case, web-to-case, escalation rules, case teams, entitlements, milestones, auto-response, case queue. NOT for Standard vs On-Demand Email-to-Case and routing-address setup — use admin/email-to-case-configuration. NOT for routing case work items to agents — use admin/omni-channel-routing-setup.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 29.7 KB |
| references/examples.md | markdown | 7.3 KB |
| references/gotchas.md | markdown | 22.5 KB |
| references/llm-anti-patterns.md | markdown | 13.7 KB |
| references/metadata-examples.md | markdown | 35.7 KB |
| references/well-architected.md | markdown | 8.4 KB |
| references/worked-example-case-intake.md | markdown | 14.3 KB |
| scripts/check_case_management_setup.pyexecutable | script | 40.9 KB |
| templates/case-management-setup-template.md | markdown | 2.9 KB |
references/llm-anti-patterns.md
View on GitHub# LLM Anti-Patterns — Case Management Setup
Common mistakes AI coding assistants make when generating or advising on Case Management Setup.
These patterns help the consuming agent self-check its own output.
## Anti-Pattern 1: Treating Auto-Response Rules as Independent of Assignment Rules
**What the LLM generates:** Instructions to configure an auto-response rule as a standalone mechanism — "create an auto-response rule, set the email template, activate it" — without mentioning the assignment rule dependency.
**Why it happens:** The auto-response rule has its own Setup page, its own activation checkbox, and its own criteria fields. It looks like an independent feature. LLMs trained on general Salesforce documentation surface the configuration steps without capturing the runtime dependency on assignment rule execution.
**Correct pattern:**
```
Correct sequence:
1. Confirm the active case assignment rule exists and fires for the relevant case creation events.
2. Verify at least one rule entry matches (or add a catch-all).
3. Only then configure the auto-response rule.
4. Test by checking Case History for "Rule Assignment" entry — if absent, auto-response will not fire.
```
**Detection hint:** Any response that tells you to configure or debug an auto-response rule without first verifying the assignment rule layer is incomplete. Flag: "auto-response rule" mentioned without "assignment rule" in the same procedure.
---
## Anti-Pattern 2: Claiming Escalation Rules Fire in Real Time
**What the LLM generates:** Advice that escalation rules will "immediately" escalate a case when the threshold is reached, or that SLAs of 30 minutes or less are achievable with native escalation rules.
**Why it happens:** LLMs infer real-time behavior from the word "rule" — rules sound like reactive triggers. The hourly cadence of the escalation engine is a platform-specific operational detail that does not appear in general automation reasoning.
**Correct pattern:**
```
Escalation rules run on an hourly engine cadence.
A case that crosses the threshold at 9:05 AM will not be escalated
until the engine next runs — potentially at 10:00 AM.
For sub-hour SLAs, use Flow time-based actions or Apex scheduled jobs.
```
**Detection hint:** Any statement like "escalate immediately when the threshold is reached" or "escalation fires in real time" is incorrect for native escalation rules. Flag: "immediately" or "real-time" in escalation context.
---
## Anti-Pattern 3: Omitting Business Hours from Escalation Rule Entries
**What the LLM generates:** Escalation rule configuration steps that set the time threshold and action but do not mention attaching a business hours record to the rule entry.
**Why it happens:** Business hours is a separate Salesforce object that must be pre-configured and then referenced in the escalation rule entry. LLMs often describe the escalation rule entry fields that are most prominent in the documentation (time trigger, action type, assigned-to user) without noting that the business hours field defaults to blank — meaning 24/7 clock measurement.
**Correct pattern:**
```
Setup → Business Hours → New → configure operating schedule and timezone.
Setup → Escalation Rules → [rule] → Rule Entries → [entry] → Business Hours: [select the record]
Without this attachment, elapsed time is measured in calendar hours (24/7),
not business hours, causing after-hours and weekend escalations.
```
**Detection hint:** Any escalation rule entry configuration that does not include the business hours field assignment. Flag: "escalation rule entry" without "business hours" mentioned.
---
## Anti-Pattern 4: Assuming Web-to-Case Has Native Field Validation
**What the LLM generates:** Advice to use required fields or picklist constraints in the Web-to-Case setup to enforce data quality on form submissions.
**Why it happens:** Other form builders (Experience Cloud, Flow screens, third-party tools) have native validation. LLMs generalize this capability to Web-to-Case without recognizing that the generated HTML is a plain form snippet with no built-in validation — Salesforce does not reject malformed submissions.
**Correct pattern:**
```
Web-to-Case has no native field validation.
The generated HTML form contains no JavaScript validation.
All validation must be implemented as:
- Client-side JavaScript in the HTML form (not generated by Salesforce)
- Post-creation validation via Flow triggered on case creation
- Apex before-insert trigger on Case
Without custom validation, any value (including empty strings, malformed
email addresses, and spam content) will create a case in Salesforce.
```
**Detection hint:** Any response suggesting Web-to-Case has required-field enforcement or built-in validation on the Salesforce side. Flag: "required" or "validation" in Web-to-Case context without noting it must be custom-implemented.
---
## Anti-Pattern 5: Suggesting Entitlement Templates on Products Are Available in Lightning
**What the LLM generates:** Instructions to add entitlement templates to product records via the product detail page in Lightning Experience, so that cases created for products auto-receive an entitlement.
**Why it happens:** The Salesforce documentation describes entitlement templates on products as a supported feature. LLMs do not reliably surface the caveat that this configuration UI is only accessible in Salesforce Classic. The feature exists, but the configuration path is Classic-only.
**Correct pattern:**
```
Adding entitlement templates to products is a Classic-only configuration.
In Lightning Experience, there is no equivalent UI on the product record.
To auto-apply entitlements in Lightning:
- Use a Flow triggered on Case creation that queries the appropriate
entitlement for the Account/Contact and assigns it to the Case.
- Use an Apex trigger on Case insert with similar logic.
The entitlement process itself is configurable in Lightning; only the
template-on-product UI path is Classic-only.
```
**Detection hint:** Any response describing a product record entitlement template configuration in Lightning UI. Flag: "entitlement template" + "product" + "Lightning" without the Classic caveat.
---
## Anti-Pattern 6: Ignoring the Email-to-Case Body Truncation Limit
**What the LLM generates:** Email-to-Case setup instructions that describe the feature without mentioning the 32,000-character body truncation limit.
**Why it happens:** The 35 MB message size limit is more visible in the documentation than the body character limit. LLMs surface the headline limit but miss the body truncation, which silently drops content from long technical support emails.
**Correct pattern:**
```
Email-to-Case truncates the email body at 32,000 characters
(figure from the Email-to-Case Limits Help page; marked UNVERIFIED
in SKILL.md until re-checked). Content beyond this limit is not in
the case body and no error is surfaced.
For technical support orgs receiving long log files or detailed
error traces, communicate this limit to the support team. For
content beyond 32,000 characters, agents should request the
information as an attachment rather than inline text.
```
**Detection hint:** Email-to-Case setup instructions that describe body handling without mentioning the 32,000-character truncation limit. Flag: "email body" in Email-to-Case context without the character limit.
---
## Anti-Pattern: Naming SOSL as a Record-Creation Path
**What the LLM generates:** "For volumes above the Web-to-Case limit, replace
the built-in endpoint with a custom form that creates cases via SOSL/REST."
**Why it happens:** SOQL and SOSL are learned as a pair and are almost always
mentioned together, so they acquire near-identical embeddings and get emitted
as an interchangeable slash-pair — "SOQL/SOSL", "SOSL/REST". The sentence is
also structurally correct: an API-based intake form genuinely is the right
answer, and REST genuinely is one of the right technologies. Only the second
token in the pair is wrong, which makes it easy to read past. Note this is not
even a SOQL/SOSL confusion in the usual direction: *neither* language creates
records. SOQL queries, SOSL searches; DML and the REST/SOAP APIs write.
**Correct pattern:**
```
Creating Cases from an external form:
- REST API — POST /services/data/vXX.0/sobjects/Case
- SOAP API — create() call
- Experience Cloud form backed by a Flow or Apex controller
- Web-to-Case (the built-in endpoint, subject to the 24-hour
submission limit and the shared 50,000 pending request queue)
NOT a creation path:
- SOSL — text search across objects. No create/update/delete.
- SOQL — record query. No create/update/delete.
```
**Detection hint:** `grep -in "SOSL" ` over any output that also contains
`create`, `insert`, `update`, `upsert`, `delete`, or `write`. SOSL appearing in
the same sentence as any write verb is always an error. The same grep catches
the compressed form: any occurrence of the literal string `SOSL/REST` or
`SOQL/SOSL` used to name an *integration* mechanism rather than a query one.
---
## Anti-Pattern: Asserting a Platform Has No Native Signal, Then Designing Around the Absence
**What the LLM generates:** "New Web-to-Case submissions are silently dropped
once the pending request queue reaches 50,000 entries. No error is logged in
Salesforce and no alert is sent to admins by default." — followed by a
recommendation to build a scheduled Flow or external monitor.
**Why it happens:** "Salesforce doesn't tell you about this" is a
high-frequency, high-plausibility filler clause in admin writing, and it is
unfalsifiable-sounding enough to survive review. It also *feels* right: the
submitter genuinely sees no error, so the model generalises the silence to the
admin side. Salesforce does notify — it emails the administrator about the
first five rejected submissions — but that notification is rarely mentioned in
secondary sources because it is nearly useless in practice, which keeps it out
of the training distribution.
The damage is subtle. The advice that follows is not wrong (external monitoring
is still worth having), but the design is anchored on a false premise, so the
one cheap fix that actually exists — making sure the notification address is a
monitored mailbox — never gets recommended.
**Correct pattern:**
```
Web-to-Case overflow, in order:
1. 24-hour submission limit reached.
2. Further requests go to a PENDING queue shared with Web-to-Lead,
capped at 50,000 combined requests. (Support can raise this.)
3. Pending queue full -> requests rejected, not queued.
4. Salesforce emails the administrator for the FIRST FIVE rejected
submissions. Then nothing, however long the outage runs.
5. The submitter sees the form's success page throughout.
So: route those five emails somewhere monitored, AND add volume
monitoring for everything after them.
```
**Detection hint:** Treat "no alert is sent", "Salesforce provides no native
notification", and "there is no way to detect this" as claims requiring a
citation, not as background. Grep drafts for `no alert`, `no error is logged`,
`silently` and `no native` — each one is a place where a real platform signal
may have been asserted out of existence. Also check the ordering: any
description of a Web-to-Case limit that reaches 50,000 without first passing
through the 24-hour submission limit has skipped a step.
---
## Anti-Pattern: Writing a Spaced Display Name into `<fullName>` on a Decomposed Metadata File
**What the LLM generates:** a source-format tree in which the business process reads well and does
not deploy —
```
objects/Case/businessProcesses/Support_Process.businessProcess-meta.xml
<fullName>Support Process</fullName>
objects/Case/recordTypes/Support.recordType-meta.xml
<businessProcess>Support Process</businessProcess>
```
**Why it happens:** `fullName` looks like a label, and for `BusinessProcess` the Metadata API guide
does nothing to dispel that — its worked example is `Opportunity.Bulk Orders`, spaces included, and
it states no character restriction on the field (api_meta L42993–L43007). The model then writes the
prettiest legal string. The rule it is missing is not in the guide at all: in a DX project the CLI
names the package member from the **file stem**, and a filesystem stem cannot carry the space the
`fullName` does. Models also generalise from `<label>` and `<description>`, where prose is correct,
and from the nested `<CustomObject>` form, where a spaced process name genuinely does deploy.
**Correct pattern:**
```
Stem == fullName, everywhere in source format:
objects/Case/businessProcesses/Support_Process.businessProcess-meta.xml
<fullName>Support_Process</fullName>
<description>Status ladder for support cases from support@ and the web form.</description>
objects/Case/recordTypes/Support.recordType-meta.xml
<businessProcess>Support_Process</businessProcess> <- bare, matching the stem
Human wording lives in <description> (and <label> on the record type).
RecordType.fullName may not contain a space at all (api_meta L45022-L45024);
give BusinessProcess the same discipline and both derivations agree.
```
**Detection hint:** grep any generated tree for `<fullName>[^<]* ` inside `*.businessProcess-meta.xml`
and `*.recordType-meta.xml` — a space in a decomposed `fullName` is the whole defect. Then diff each
`fullName` against its file stem and each record type's `<businessProcess>` against the stems that
exist. Both are rules **CMS-STEM-01** and **CMS-STEM-02** in
`scripts/check_case_management_setup.py`. In review output, treat "the deploy says the component is
not in the zipped directory, so a file is missing" as the same defect wearing a different hat — the
file is present and named something else. Verified by `sf project deploy start --dry-run` against a
Summer '26 developer org on 2026-09-05
(`examples/builds/case-onboarding/reports/MOCK-DEPLOY-M1.md`).
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |