forcedotcom/sf-skills / skills/sales-agentforce-pipeline-management-configure
sales-agentforce-pipeline-management-configure
VerifiedUse to configure, set up, or repair the Sales Management agent and Agentforce Pipeline Management in a Salesforce org. Automates metadata creation for flows, prompt templates, permission sets, and data source configuration. TRIGGER when: user wants to enable Pipeline Management, configure Sales pipeline features, set up the Sales Management agent for opportunity field updates (including autonomous updates), connect enabled data sources like Einstein Conversation Insights or Einstein Activity Capture, customize opportunity stage descriptions, configure post-meeting suggestions, verify or audit configuration status, fix partially configured orgs, or troubleshoot Pipeline Management metadata issues. DO NOT TRIGGER when: user wants to build a custom agent (use agentforce-generate), configure general Agentforce tracing (use platform-tracing-agentforce-configure), work with non-Sales agents, or enable Einstein Conversation Insights or Einstein Activity Capture from scratch (provisioning is out of scope).
scripts/shared/psg.sh
View on GitHub#!/bin/bash
# shared/psg.sh — shared PermissionSetGroup recalculation helper.
#
# PermissionSetGroup.Status is a system-computed field (Updated / Updating /
# Outdated / Failed), NOT client-writable. A component change (inserting a
# PermissionSetGroupComponent) is what TRIGGERS the async recalculation — there
# is no CLI recalc verb and no client-writable nudge.
#
# Design choice (deliberate): setup does NOT block waiting for recalculation to
# finish. Firing the trigger is sufficient for the org to converge on its own.
# The recalc's completion only matters later, when a user tries to VIEW
# suggestions in the UI or the scheduled flow RUNS a generation — both of which
# happen well after setup exits. So callers only ever read Status once, for
# reporting, and never sleep-poll.
#
# This file only DEFINES a function; it makes no org calls when sourced.
# psg_status <org-alias> <psg-developer-name>
#
# Reads the named PSG's recalculation Status ONCE (no waiting). Prints one of:
# Updated | Updating | Outdated | Failed (the raw Status value), or
# not-found (PSG DeveloperName did not resolve), or
# unknown (query/parse failed)
# Always returns 0 — the caller inspects the printed value. Never sleeps.
psg_status() {
local org="$1" psg_name="$2"
local psg_id
psg_id=$(sf data query \
--query "SELECT Id FROM PermissionSetGroup WHERE DeveloperName = '${psg_name}'" \
--target-org "$org" \
--use-tooling-api \
--json 2>/dev/null | jq -r '.result.records[0].Id // empty' 2>/dev/null || echo "")
if [[ -z "$psg_id" ]]; then
printf 'not-found'
return 0
fi
local status
status=$(sf data query \
--query "SELECT Status FROM PermissionSetGroup WHERE Id = '${psg_id}'" \
--target-org "$org" \
--use-tooling-api \
--json 2>/dev/null | jq -r '.result.records[0].Status // empty' 2>/dev/null || echo "")
printf '%s' "${status:-unknown}"
return 0
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |