PranavNagrecha/AwesomeSalesforceSkills / skills/admin/assignment-rules
assignment-rules
VerifiedUse this skill when configuring or troubleshooting Lead or Case assignment rules in Salesforce: creating rule entries, setting filter criteria, assigning records to users or queues, understanding when rules run, and implementing round-robin patterns with Apex. Trigger keywords: lead assignment, case assignment, assignment rule, queue assignment, auto-assign. NOT for creating the queue or public group a rule routes into — use admin/queues-and-public-groups. NOT for Omni-Channel or skills-based routing — use admin/omni-channel-routing-setup. NOT for approval routing — use admin/approval-processes.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 21.6 KB |
| references/examples.md | markdown | 6.4 KB |
| references/gotchas.md | markdown | 10.5 KB |
| references/llm-anti-patterns.md | markdown | 5.9 KB |
| references/metadata-examples.md | markdown | 13.5 KB |
| references/migration-and-sandbox.md | markdown | 4.1 KB |
| references/routing-selector.md | markdown | 3.7 KB |
| references/testing.md | markdown | 4.4 KB |
| references/troubleshooting.md | markdown | 6.0 KB |
| references/well-architected.md | markdown | 4.9 KB |
| scripts/check_assignment_rules.pyexecutable | script | 13.0 KB |
| templates/assignment-rules-template.md | markdown | 2.9 KB |
templates/assignment-rules-template.md
View on GitHub# Assignment Rule Configuration — [Object: Lead / Case]
## Rule Summary
| Field | Value |
|-------|-------|
| Rule Name | [e.g., Global Lead Routing 2025] |
| Object | [Lead / Case] |
| Status | Active |
| Activated | [Date] |
| Owner | [Admin who configured this rule] |
---
## Rule Entries
List entries in evaluation order. First match wins.
| # | Criteria | Assign To | Notify? | Notes |
|---|----------|-----------|---------|-------|
| 1 | [Field] [Operator] [Value] | [User / Queue Name] | [Yes / No] | [Reason for this entry] |
| 2 | [Field] [Operator] [Value] | [User / Queue Name] | [Yes / No] | |
| 3 | (no criteria — catch-all) | [Default Queue] | [Yes / No] | Always last |
---
## Queue Inventory
| Queue Name | Members | Queue Email | Supported Objects |
|-----------|---------|-------------|-------------------|
| [Queue 1] | [User A, User B] | [email] | Lead |
| [Queue 2] | [User C, User D] | [email] | Case |
---
## API Integration Requirements
List every system that creates [Lead / Case] records and confirm the assignment header is configured:
| System | Method | Assignment Header / Setting | Verified? |
|--------|--------|----------------------------|-----------|
| [e.g., Marketo] | REST API | `Sforce-Auto-Assign: true` | [ ] |
| [e.g., Data Loader] | Bulk API | `sfdc.assignmentRule = [Rule ID]` | [ ] |
| [e.g., Internal Apex job] | Apex DMLOptions | `useDefaultRule = true` | [ ] |
---
## Round-Robin Configuration (if applicable)
| Setting | Value |
|---------|-------|
| Rotation method | [Apex trigger / Omni-Channel] |
| Rep list | [User A ID, User B ID, User C ID] |
| Counter storage | [Custom Setting name / field] |
| Concurrency risk mitigated? | [Yes / No — describe approach] |
---
## Test Results
| Test Scenario | Expected Owner/Queue | Actual Owner/Queue | Pass? |
|--------------|---------------------|-------------------|-------|
| Web-to-Lead or Web-to-Case submission | [Expected queue/user] | | [ ] |
| REST API insert with Sforce-Auto-Assign: true | [Expected queue/user] | | [ ] |
| REST API insert without header | Creating user (API account) | | [ ] |
| Manual UI creation with checkbox checked | [Expected queue/user] | | [ ] |
| Manual UI creation without checkbox | Creating user | | [ ] |
| Record matching catch-all entry | [Default queue/user] | | [ ] |
---
## Context Gathered
Record answers to the Before Starting questions from SKILL.md:
- Object type (Lead or Case):
- Is there already an active assignment rule?:
- How will records be created (Web form / API / UI / Apex)?:
- Is round-robin distribution required?:
- Are queues already created and populated?:
---
## Deviations from Standard Pattern
Note any decisions that differ from the guidance in SKILL.md and the reason:
- Deviation:
- Reason:
---
## Change Log
| Date | Changed By | Change Description |
|------|-----------|-------------------|
| [Date] | [Admin] | Initial rule creation |
| | | |
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: 322k | 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: 322k | 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: 322k | Updated | Claude CodeCodex | Verified | Install |