Skip to content

forcedotcom/sf-skills / plugins/builder/service-omni/skills/service-omni-queue-routing-config-deploy

service-omni-queue-routing-config-deploy

Verified

Use to create or update a QueueRoutingConfig record on a Salesforce org via the Data API (idempotent SOQL detect + REST upsert). Naming is target-derived: Case→Case_Routing_Config, VoiceCall→Voice_Routing_Config, Incident→Incident_Routing_Config, MessagingSession→Messaging_Routing_Config (via QRC_ROUTING_TARGET), or pass an explicit developer-name/label/capacity/priority. RoutingModel MostAvailable (default) or LeastActive. Triggers: create a Case or Voice routing config, deploy a QueueRoutingConfig, set up queue routing for Omni Cases/Voice, configure CapacityWeight per queue. Do not use for attribute-based routing (IsAttributeBased=true is out of scope) or routing models other than MostAvailable/LeastActive.

FileKindSize
SKILL.mdskill md8.4 KB
references/api-notes.mdmarkdown6.5 KB
scripts/tests/_bootstrap.pyscript4.1 KB
scripts/tests/test_queue_routing_config_contracts.pyexecutablescript2.9 KB
scripts/upsert-and-report.shexecutablescript25.0 KB

scripts/tests/test_queue_routing_config_contracts.py

View on GitHub
#!/usr/bin/env python3
import sys
import unittest
from pathlib import Path

sys.path.insert(0, str(Path(__file__).resolve().parent))
from _bootstrap import FakeSf, last_json, run  # noqa: E402


class InputTests(unittest.TestCase):
    def test_weight_and_percentage_are_mutually_exclusive(self):
        with FakeSf() as fake:
            rc, out = run(["org", "LeastActive", "Case_Routing_Config", "Case Routing Config", "7"],
                          path_prefix=fake, extra_env={"QRC_CAPACITY_PERCENTAGE": "100"})
        self.assertEqual(rc, 1, out)
        self.assertIn("mutually exclusive", out)

    def test_invalid_timeout_is_rejected(self):
        with FakeSf() as fake:
            rc, out = run(["org"], path_prefix=fake, extra_env={"QRC_PUSH_TIMEOUT": "99999"})
        self.assertEqual(rc, 1, out)
        self.assertIn("Invalid push-timeout", out)


class BehaviorTests(unittest.TestCase):
    def test_create_percentage_capacity_and_timeout(self):
        with FakeSf() as fake:
            rc, out = run(["org", "LeastActive"], path_prefix=fake,
                          extra_env={"QRC_CAPACITY_PERCENTAGE": "100", "QRC_PUSH_TIMEOUT": "30",
                                     "FAKE_FINAL_RM": "LeastActive", "FAKE_FINAL_CP": "100.0",
                                     "FAKE_FINAL_PT": "30", "FAKE_FINAL_CW": "null"})
        self.assertEqual(rc, 0, out)
        result = last_json(out)
        self.assertEqual(result["capacity_mode"], "percentage", out)
        self.assertEqual(result["capacity_percentage"], 100.0, out)
        self.assertEqual(result["push_timeout"], 30, out)

    def test_matching_existing_record_is_reused(self):
        with FakeSf() as fake:
            rc, out = run(["org"], path_prefix=fake, extra_env={"FAKE_EXISTING": "1"})
        self.assertEqual(rc, 0, out)
        self.assertEqual(last_json(out)["status"], "reused", out)

    def test_existing_custom_values_are_preserved_when_not_requested(self):
        custom = {
            "FAKE_EXISTING": "1",
            "FAKE_BEFORE_RM": "LeastActive",
            "FAKE_BEFORE_CW": "17",
            "FAKE_BEFORE_PT": "45",
            "FAKE_BEFORE_RP": "7",
            "FAKE_BEFORE_ML": "Existing Queue Policy",
            "FAKE_FINAL_RM": "LeastActive",
            "FAKE_FINAL_CW": "17",
            "FAKE_FINAL_PT": "45",
            "FAKE_FINAL_RP": "7",
            "FAKE_FINAL_ML": "Existing Queue Policy",
        }
        with FakeSf() as fake:
            rc, out = run(["org"], path_prefix=fake, extra_env=custom)
        self.assertEqual(rc, 0, out)
        result = last_json(out)
        self.assertEqual(result["status"], "reused", out)
        self.assertEqual(result["master_label"], "Existing Queue Policy", out)
        self.assertEqual(result["capacity_weight"], 17, out)
        self.assertEqual(result["routing_priority"], 7, out)
        self.assertEqual(result["push_timeout"], 45, out)


if __name__ == "__main__":
    unittest.main(verbosity=2)
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall