forcedotcom/sf-skills / plugins/builder/service-engagement/skills/service-agentforce-human-escalation-configure
service-agentforce-human-escalation-configure
UnverifiedUse to configure and verify Agentforce agent-to-human escalation, including human handoff, a staffed fallback queue, and failure-threshold directives. Triggers: configure agent escalation, escalate to a human agent, agent handoff to a queue, configure a human escalation queue, set an Agentforce fallback handoff. Do not use to create an agent or configure inbound channel routing; use service-agentforce-channel-configure for inbound routing.
scripts/extract-outbound-route.mjs
View on GitHub#!/usr/bin/env node
// Extracts outbound-route wiring from a retrieved GenAiPlannerBundle, coupling routeName+routeType within one outboundRouteConfigs block → { name, type, surface, sameBlock, messagingSurface }; exit 2 on bad usage. Details: references/classifier-contracts.md.
import { readFileSync } from 'node:fs';
const [xmlPath, expectedFlow = ''] = process.argv.slice(2);
if (!xmlPath) {
process.stderr.write('usage: node extract-outbound-route.mjs <bundle-xml-file> <expected-flow-name>\n');
process.exit(2);
}
const empty = { name: '', type: '', surface: '', sameBlock: false, messagingSurface: false };
let xml = '';
try {
xml = readFileSync(xmlPath, 'utf8');
} catch {
process.stdout.write(JSON.stringify(empty) + '\n');
process.exit(0);
}
const MESSAGING_SURFACES = new Set(['Messaging', 'CustomerWebClient']);
const tag = (block, name) => {
const m = block.match(new RegExp(`<${name}>\\s*([^<]*?)\\s*</${name}>`, 's'));
return m ? m[1].trim() : '';
};
// Collect candidate blocks: prefer plannerSurfaces entries (so we know the surfaceType), and
// fall back to bare outboundRouteConfigs blocks if the bundle is flat/uncompiled.
const candidates = [];
for (const sm of xml.matchAll(/<plannerSurfaces>([\s\S]*?)<\/plannerSurfaces>/g)) {
const surfaceBlock = sm[1];
const surface = tag(surfaceBlock, 'surfaceType');
for (const cm of surfaceBlock.matchAll(/<outboundRouteConfigs>([\s\S]*?)<\/outboundRouteConfigs>/g)) {
candidates.push({ surface, block: cm[1] });
}
}
if (candidates.length === 0) {
for (const cm of xml.matchAll(/<outboundRouteConfigs>([\s\S]*?)<\/outboundRouteConfigs>/g)) {
candidates.push({ surface: '', block: cm[1] });
}
}
const describe = (c) => {
const name = tag(c.block, 'outboundRouteName');
const type = tag(c.block, 'outboundRouteType');
return {
name,
type,
surface: c.surface,
sameBlock: name !== '' && type !== '',
messagingSurface: MESSAGING_SURFACES.has(c.surface),
};
};
let chosen = null;
if (expectedFlow) {
chosen = candidates.map(describe).find((d) => d.name === expectedFlow) || null;
}
if (!chosen) {
chosen = candidates.length ? describe(candidates[0]) : null;
}
if (!chosen) {
chosen = empty;
}
process.stdout.write(JSON.stringify(chosen) + '\n');
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 |