forcedotcom/sf-skills

service-omni-supervisor-permset-assign

Use to assign the Salesforce-shipped standard ContactCenterSupervisor PermissionSet (default) to N existing supervisor users via PermissionSetAssignment DML.

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/forcedotcom/sf-skills --skill service-omni-supervisor-permset-assign

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

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

FileWhen to read
references/api-notes.mdBefore the POST loop — PermissionSetAssignment schema, DUPLICATE_VALUE semantics, and why users are derived from the supervisor pattern rather than an explicit id list

관련 작업

같은 저장소의 Skills

더 많은 Skills

모든 Skills
forcedotcom
커뮤니티

design-systems-slds-apply

Apply SLDS-compliant UI using the correct blueprints, styling hooks, utility classes, and icons. Use when building any UI that needs SLDS, choosing between Lightning Base Components and SLDS Blueprints, applying styling hooks for theming, using utility classes for layout and spacing, or selecting icons. Triggers include \"build a modal\", \"create a form\", \"data table\", \"SLDS styling\", \"style with hooks\", \"add an icon\".

1시간 설치 수
1
GitHub Stars
1.2천
업데이트
11월 13일
forcedotcom
커뮤니티

dx-code-analyzer-run

Run Salesforce Code Analyzer to scan code for security, performance, best practice, and code style violations. Supports all engines (PMD, ESLint, CPD, RetireJS, Flow, SFGE, ApexGuru), targets (files, folders, git diff), categories, and severities. Also handles post-scan exploration: filtering results by engine/severity/category/file, and explaining what rules mean. TRIGGER when: user says 'scan my code', 'check security issues', 'run PMD/ESLint', 'find duplicates', 'analyze Flows', 'check vulner

1시간 설치 수
1
GitHub Stars
1.2천
업데이트
11월 13일
forcedotcom
커뮤니티

experience-lwc-accessibility-jest-run

Use ALWAYS when running Sa11y accessibility Jest tests for an LWC — locally before pushing, producing the command(s), running one file vs a suite, selecting tests by naming convention, saving Sa11y-rendered HTML, or reproducing a Sa11y/A11yBug failure. Covers core (Bazel; bazel test // : ) and standalone npx jest (.accessibility.test.js, @sa11y/jest). REQUIRED for a run-plan.md, a failing a11y test's exit code, or SA11Y/A11yBug/core-Bazel test paths. DO NOT TRIGGER for functional Jest tests, a11

1시간 설치 수
1
GitHub Stars
1.2천
업데이트
11월 13일
forcedotcom
커뮤니티

experience-lwc-generate

Lightning Web Components with PICKLES methodology and 165-point scoring. Use this skill when the user creates or edits LWC components, builds wire service patterns, or writes Jest tests for LWC. TRIGGER when: user creates/edits LWC components, touches lwc//.js, .html, .css, .js-meta.xml files, or asks about wire service, SLDS, or Jest LWC tests. DO NOT TRIGGER when: Apex classes (use platform-apex-generate), Aura components, or Visualforce.

1시간 설치 수
1
GitHub Stars
1.2천
업데이트
11월 13일