Skip to main content
skill CX Codex

service-omni-supervisor-permset-assign — Claude Code skill

service-omni-supervisor-permset-assign — a skill for Claude Code that automates assigning the ContactCenterSupervisor permission set to users. Runs a verification and assignment script for Salesforce supervisor provisioning.

Apache-2.0 102 installs ★ 1,183 updated 2026-10-23

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add forcedotcom/sf-skills --skill service-omni-supervisor-permset-assign -a claude-code
Open on GitHub

What service-omni-supervisor-permset-assign does

The skill assigns the ContactCenterSupervisor permission set to users via PermissionSetAssignment in Salesforce. It performs an idempotency check to detect existing user-permission pairs and prevent duplicates, ensuring a safe execution flow.

It identifies active supervisors and applies permissions based on the available licenses. It requires sf CLI version 2.139.6 or higher and jq version 1.6 to operate. Execution is blocked on production organizations for safety, and the executor must hold administrator permissions in the target org.

What it helps with

  • assign supervisor permissions to users
  • verify existing PermissionSet assignments
  • automate access provisioning for Service Cloud

Example prompts for the agent

  • Assign ContactCenterSupervisor to 3 users in dev-org
  • Run scripts/verify-and-assign.sh to update permissions in the target organization

How to install service-omni-supervisor-permset-assign

1Skills CLI (Vercel)

npx skills add forcedotcom/sf-skills --skill service-omni-supervisor-permset-assign -a claude-code

2Manually: put the files in place

~/.claude/skills/service-omni-supervisor-permset-assign/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/service-omni-supervisor-permset-assign/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about service-omni-supervisor-permset-assign

How to install service-omni-supervisor-permset-assign in Claude Code?

Run npx skills add forcedotcom/sf-skills --skill service-omni-supervisor-permset-assign -a claude-code in your project terminal.

What does service-omni-supervisor-permset-assign do?

It automates assigning the standard ContactCenterSupervisor permission set to Salesforce users via DML, while using SOQL to prevent duplicate assignments.

What is required to run service-omni-supervisor-permset-assign?

You need sf CLI (v2.139.6+) and jq (v1.6+), plus active users with Service Cloud licenses and administrator access in your Salesforce org.

Source text

SKILL.md · Apache-2.0
---
name: service-omni-supervisor-permset-assign
description: "Use to assign the Salesforce-shipped standard ContactCenterSupervisor PermissionSet (default) to N existing supervisor users via PermissionSetAssignment DML. Idempotent — SOQL detects existing (user, perm-set) pairs before POST, and DUPLICATE_VALUE is treated as reused. The standard set carries its own permission-set license and assigns cleanly on Service-Cloud-enabled orgs; a user whose license lacks the entitlement surfaces FIELD_INTEGRITY_EXCEPTION so the operator can fix the profile/license. Triggers: assign the supervisor permset, grant supervisor perms, complete supervisor provisioning. Do not use on production orgs or to assign agent permsets."
allowed-tools: Bash Read Write Edit Glob Grep
metadata:
  version: "1.0"
  domains: ["Service"]
  minApiVersion: "66.0"
  relatedSkills:
    - "service-omni-supervisor-config-deploy"
  accessCheck: "OrgPermissions.LightningService"
  cliTools:
    - tool: ["jq"]
      semver: ">=1.6"
    - tool: ["sf"]
      semver: ">=2.139.6"
---

# service-omni-supervisor-permset-assign

Assign the Salesforce-shipped standard `ContactCenterSupervisor` PermissionSet to existing supervisor users via `PermissionSetAssignment`. The classic Omni-Channel Supervisor UI (Command Center) requires supervisors to hold contact-center supervisor permissions before `service-omni-supervisor-config-deploy` can bind them. The skill uses detect-before-POST idempotency and treats `DUPLICATE_VALUE` as an already-satisfied assignment.

**Licensing.** The supervisor system permissions (`IsContactCenterSupervisor`, `OmniSupervisorManageQueue`, `ViewOmnichnlAnlytDshbrd`) are gated by a permission-set license. The standard `ContactCenterSupervisor` set carries its own license linkage and assigns cleanly on a Service-Cloud-enabled org, so it is the default and supported path — a hand-rolled custom set that re-declares these permissions fails with `FIELD_INTEGRITY_EXCEPTION`. If a specific user's license lacks the underlying entitlement, the assignment surfaces that same exception so the operator can move the user to a profile/license that carries it.

That custom-permission-set warning does **not** mean assigning the existing Salesforce-shipped `ContactCenterSupervisor` set removes access or rewrites the set. This skill only creates a missing `PermissionSetAssignment`; it never creates, edits, or replaces the permission set itself.

## Inputs

```bash
bash scripts/verify-and-assign.sh <org-alias> [count=1] [permission-set-names-csv=ContactCenterSupervisor]
```

- `org-alias` (required).
- `count` (optional, default `1`, range `1..5`) — must match the supervisor user count.
- `permission-set-names-csv` (optional, default `ContactCenterSupervisor`) — comma-separated for multiple. Every supervisor gets every listed set (cross-product).

## Preconditions and safety

- Target org authenticated via `sf` CLI, Service Cloud license, `sf` CLI ≥ 2.139.6.
- The supervisor users exist and are active; fewer than `count` active users blocks with a remediation message.
- The `ContactCenterSupervisor` set is Salesforce-shipped and present on any Service-Cloud-enabled org; a custom name that is missing blocks with a Setup click-path.
- The executing user has `PermissionsAssignPermissionSets` (standard on System Administrator) — required even for org admins.
- The three-way `safe_to_write` production guard applies — assigning permission sets on a production org can escalate a real user's privileges, so it blocks with no override.

## Run

`verify-and-assign.sh` performs the whole cycle:

1. Compute `safe_to_write`; derive the 8-char org suffix.
2. Validate every supplied permission-set name as a well-formed DeveloperName (SOQL-injection guard) before any `sf` call.
3. Resolve the `supervisor{1..N}.<suffix>@example.com` users, filtered to `IsActive=true`; block if fewer than `count` are active (an inactive occupant does not satisfy the count).
4. Resolve each `PermissionSet` by name; block naming which is missing.
5. Query existing `PermissionSetAssignment` for the (user × set) cross-product; compute the missing pairs.
6. POST one assignment per missing pair (individual POSTs, no `allOrNone`); treat `DUPLICATE_VALUE` as reused.
7. Re-query to confirm final state and emit the report.

## Behavior

**Cross-product.** Every supervisor gets every listed set; a partial assignment is a failure, not a feature.

**Idempotency.** `PermissionSetAssignment` has a uniqueness constraint on (AssigneeId, PermissionSetId), so a re-POST raises `DUPLICATE_VALUE`; the skill detects existing pairs first and treats that as reused for concurrent-run safety. POSTs are individual so one error never rolls back its siblings, and it re-queries after all POSTs — a 201 only means the write was accepted; a SOQL confirms it is active.

**Non-destructive.** Create-only; it never deletes existing assignments (supervisors may hold out-of-band permissions) and derives users from the supervisor pattern rather than an explicit id list.

## Output contract

A single JSON object with `status` ∈ `assigned` | `reused` | `partial` | `blocked`, the resolved `permission_sets`, `org_suffix`, `requested_count`, `expected_assignment_count` (= `requested_count × len(permission_sets)`), a `before` snapshot, `assigned_this_run`/`assigned_count`, `reused_count`, an `after` snapshot, `manual_actions`, and `blocking_issue`.

- `assigned` — at least one new assignment created; all expected pairs exist after.
- `reused` — all expected pairs already existed; nothing POSTed.
- `partial` — some POSTs failed; final count is below expected.
- `blocked` — precondition failed (production org, missing set, missing/inactive users, or a license that does not allow the permission).

`assigned_count + reused_count == expected_assignment_count` unless `partial`; `blocking_issue` is non-null only for `blocked`/`partial`.

## Limitations

- Provisioning the user license that the supervisor permset requires is the users-create skill's responsibility, not this one.
- Assigns individual PermissionSets only — a `PermissionSetGroup` is a different sObject and is out of scope.
- Create-only; it does not remove assignments.

## References

| File | When to read |
|---|---|
| `references/api-notes.md` | Before the POST loop — PermissionSetAssignment schema, `DUPLICATE_VALUE` semantics, and why users are derived from the supervisor pattern rather than an explicit id list |

© forcedotcom · Apache-2.0 · forcedotcom/sf-skills

Similar skills

All skills for Automation and no-code: n8n, Zapier, Make →
salesforce-automation davepoon The salesforce-automation skill automates Salesforce operations: create and search leads, contacts, accounts, opportunities, and run SOQL queries through Composio. CX Codex +1 128installs salesforce-flow-design official github salesforce-flow-design reviews Salesforce Flow architecture, type selection, bulk safety, and fault handling. Use it before designing, reviewing, or activating a Flow. CX Codex +1 839installs Salesforce Apex & Triggers Development official github Salesforce Apex & Triggers Development builds bulk-safe, production-ready Salesforce Apex classes and triggers. It inspects existing repo architecture, enforces security rules, and prevents governor limit errors. CX Codex +1 ★ 41,430repo stars enterprise-integration-architect Alysson Franklin enterprise-integration-architect architects enterprise B2B integrations with systems like Salesforce, SAP, and Microsoft 365. Handles API orchestration, authentication, and sync pipelines. CX Codex ★ 1,013repo stars enterprise-integrator-architect Alysson Franklin enterprise-integrator-architect is a Claude Code plugin for designing and building integrations between B2B apps and external enterprise systems. Call it for API orchestration, data sync, or third-party webhooks. ★ 1,013repo stars crm-integration-wasp-drone Legion Code Inc. crm-integration-wasp-drone architects CRM pipelines, maps entity schemas, and designs sync logic. Connects your product to HubSpot, Salesforce, Attio, or Pipedrive without data loss. CX Codex ★ 96repo stars

From the same set232

The whole set →
service-omni-presence-status-deploy The service-omni-presence-status-deploy Claude Code skill deploys Omni-Channel presence statuses. It runs for requests to create an Available status for Case, Incident, Messaging, or Voice, or to add the standard Busy status. CX Codex +1 103installs service-omni-base-settings-configure service-omni-base-settings-configure — a skill for Claude Code that configures Salesforce Omni-Channel base settings via the Metadata API. Deploys the five primary routing booleans required before setting up queues. CX Codex +1 103installs service-omni-supervisor-surface-deploy service-omni-supervisor-surface-deploy — a skill for Claude Code populates the Omni-Channel Supervisor action and tab surface in Salesforce via the Data API. Runs when configuring supervisor panels. CX Codex +1 102installs service-omni-supervisor-users-create The service-omni-supervisor-users-create Claude Code skill creates Omni-Channel supervisor users in a Salesforce org. It activates on requests to create or provision supervisor accounts. CX Codex +1 102installs service-omni-presence-user-config-deploy The service-omni-presence-user-config-deploy Claude Code skill deploys an Omni presence configuration for agents. It sets decline handling and an ACW timer, then assigns the configuration to users. CX Codex +1 102installs service-omni-agent-users-create service-omni-agent-users-create — a skill for Claude Code creates Salesforce agent users for Omni-Channel setup and routing checks. It responds to requests for new, seeded, or missing demo agents. CX Codex +1 101installs education-cloud-domain-configure education-cloud-domain-configure is a Claude Code skill for setting up Salesforce Education Cloud domains. It activates when a user asks to enable or configure domain features. CX Codex +1 100installs service-agentforce-contact-center-coordinate The service-agentforce-contact-center-coordinate skill for Claude Code automates setup of an Agentforce Contact Center voice channel. It runs when you request channel configuration. CX Codex +1 100installs

Project sponsors

Companies that keep this analytics open