Skip to content

forcedotcom/sf-skills / skills/sales-agentforce-pipeline-management-configure

sales-agentforce-pipeline-management-configure

Verified

Use 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).

FileKindSize
SKILL.mdskill md29.0 KB
assets/field-completion-template.genAiPromptTemplate-meta.xmlconfig8.6 KB
assets/pipeline_management_flow.flow-meta.xmlconfig22.9 KB
assets/sales_management_agent.agentother211.7 KB
assets/sales_management_agent.bundle-meta.xmlconfig163 B
assets/sfdx-project.jsonconfig254 B
assets/stage-descriptions/bant.txtmarkdown2.7 KB
assets/stage-descriptions/meddic.txtmarkdown2.9 KB
assets/stage-descriptions/spiced.txtmarkdown2.9 KB
examples/custom-prompt-instructions.mdmarkdown10.0 KB
references/admin-communication.mdmarkdown14.6 KB
references/agent-creation.mdmarkdown22.5 KB
references/auth-and-cli.mdmarkdown6.7 KB
references/automation-matrix.mdmarkdown2.2 KB
references/autonomous-updates.mdmarkdown8.4 KB
references/canonical-agent-path.mdmarkdown6.9 KB
references/data-sources.mdmarkdown6.6 KB
references/field-completion-prompt-template.mdmarkdown6.4 KB
references/field-completion-prompts.mdmarkdown10.4 KB
references/flags.mdmarkdown3.2 KB
references/flow-clone-from-template.mdmarkdown19.5 KB
references/metadata-inventory.mdmarkdown17.1 KB
references/opportunity-stages.mdmarkdown11.9 KB
references/repair-diagnostics.mdmarkdown14.1 KB
references/setup-order.mdmarkdown12.6 KB
references/soap-api-enablement.mdmarkdown21.7 KB
scripts/CHANGES.mdmarkdown5.6 KB
scripts/README.mdmarkdown3.1 KB
scripts/add-field-suggestion.shexecutablescript35.5 KB
scripts/create-agent.shexecutablescript13.2 KB
scripts/create-flow.shexecutablescript8.5 KB
scripts/define-agent-access.shexecutablescript21.2 KB
scripts/deploy-settings.shexecutablescript1.9 KB
scripts/enable-deal-agent.shexecutablescript10.0 KB
scripts/enable-prerequisites.shexecutablescript22.9 KB
scripts/flow-debug-and-verify.shexecutablescript18.4 KB
scripts/retrieve-settings.shexecutablescript5.7 KB
scripts/setup-all.shscript146.6 KB
scripts/shared/agent-bundle-publish.shscript6.7 KB
scripts/shared/agent-detection.shscript9.7 KB
scripts/shared/flow-builder.shscript9.5 KB
scripts/shared/psg.shscript1.9 KB
scripts/shared/soap.shscript5.6 KB
scripts/shared/stage-descriptions.shscript23.3 KB
scripts/shared/test-opp.shscript9.6 KB
scripts/verify-all.shexecutablescript26.0 KB
scripts/verify-prompt-generation.shexecutablescript13.8 KB

references/data-sources.md

View on GitHub
# Data Sources Decision Table

Pipeline Management uses data sources to generate field update suggestions. The quality and relevance of suggestions directly depends on which data sources are enabled and have recent activity.

---

## Data Source Matrix

| Data Source | What It Provides | Required Setting | Automation Level |
|-------------|------------------|------------------|-----------------|
| **Notes** (ContentNote) | Meeting notes, deal notes attached to opportunities | `EnhancedNotesSettings.enableEnhancedNotes` | ✅ SOAP API |
| **Enhanced Email** | Email body text indexing for deeper analysis | `EmailAdministrationSettings.enableEnhancedEmailEnabled` | ✅ SOAP API |
| **Einstein Activity Capture** (EAC) | Auto-captured emails + calendar events | Separate product provisioning | ❌ UI setup required |
| **Einstein Conversation Insights** (ECI) | Voice/video call transcripts | Separate product provisioning | ❌ UI setup required |

---

## Decision Flow

```text
Does the org have Notes (ContentNote) with recent activity?
├── Yes → Enable Enhanced Notes ✅ (baseline data source)
└── No → Create sample notes on open opportunities for testing

Does the org use email-to-opportunity logging?
├── Yes → Enable Enhanced Email ✅ (enables email body indexing)
│         → Check if Einstein Activity Capture is provisioned
│           ├── Yes → Verify EAC is capturing emails (Setup → EAC Configuration)
│           └── No → Email logging via manual BCC or Salesforce Inbox
└── No → Skip email data source

Does the org use call recording/transcription?
├── Yes → Check if Einstein Conversation Insights is provisioned
│         ├── Yes → Verify transcripts exist: SELECT COUNT() FROM VoiceCall
│         └── No → Cannot enable without ECI license
└── No → Skip call transcript data source
```

---

## Minimum Viable Data Sources

For Pipeline Management to produce useful suggestions, at minimum:

1. **Notes** — must be enabled (lowest barrier)
2. **Recent opportunity activity** — at least some open opportunities must have activity in the last 7 days

Without any data sources with recent content, the flow will run daily but produce no suggestions.

---

## Verifying Data Source Activity

```bash
ORG="pipeline-mgmt-org"

echo "=== Notes (primary data source) ==="
sf data query -q "SELECT COUNT() FROM ContentNote WHERE CreatedDate = LAST_N_DAYS:30" --target-org $ORG 2>/dev/null

echo "=== Emails (if Enhanced Email enabled) ==="
sf data query -q "SELECT COUNT() FROM EmailMessage WHERE CreatedDate = LAST_N_DAYS:30 AND RelatedToId != null" --target-org $ORG 2>/dev/null

echo "=== Recent opportunity activity ==="
sf data query -q "SELECT COUNT() FROM Opportunity WHERE LastActivityDate = LAST_N_DAYS:7 AND IsClosed = false" --target-org $ORG 2>/dev/null

echo "=== Voice calls (if ECI enabled) ==="
sf data query -q "SELECT COUNT() FROM VoiceCall WHERE CreatedDate = LAST_N_DAYS:30" --target-org $ORG 2>/dev/null
```

**Expected**: Total > 0 for at least Notes and recent opportunity activity.

---

## Enabling Data Sources via API

### Notes (SOAP API)

```bash
# See references/soap-api-enablement.md Section 3
curl -s "${INSTANCE_URL}/services/Soap/m/62.0" \
  -H "Content-Type: text/xml; charset=UTF-8" \
  -H "SOAPAction: update" \
  -d "<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:met='http://soap.sforce.com/2006/04/metadata'>
  <soapenv:Header><met:SessionHeader><met:sessionId>${ACCESS_TOKEN}</met:sessionId></met:SessionHeader></soapenv:Header>
  <soapenv:Body><met:updateMetadata>
    <met:metadata xsi:type='met:EnhancedNotesSettings' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
      <met:fullName>EnhancedNotes</met:fullName>
      <met:enableEnhancedNotes>true</met:enableEnhancedNotes>
    </met:metadata>
  </met:updateMetadata></soapenv:Body>
</soapenv:Envelope>" | xmllint --format - 2>/dev/null | grep -E "(success|message)" | head -5
```

### Enhanced Email (SOAP API)

```bash
# See references/soap-api-enablement.md Section 4
curl -s "${INSTANCE_URL}/services/Soap/m/62.0" \
  -H "Content-Type: text/xml; charset=UTF-8" \
  -H "SOAPAction: update" \
  -d "<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:met='http://soap.sforce.com/2006/04/metadata'>
  <soapenv:Header><met:SessionHeader><met:sessionId>${ACCESS_TOKEN}</met:sessionId></met:SessionHeader></soapenv:Header>
  <soapenv:Body><met:updateMetadata>
    <met:metadata xsi:type='met:EmailAdministrationSettings' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
      <met:fullName>EmailAdministration</met:fullName>
      <met:enableEnhancedEmailEnabled>true</met:enableEnhancedEmailEnabled>
    </met:metadata>
  </met:updateMetadata></soapenv:Body>
</soapenv:Envelope>" | xmllint --format - 2>/dev/null | grep -E "(success|message)" | head -5
```

### Einstein Activity Capture (UI-Only)

EAC requires separate product provisioning and cannot be fully automated:

1. Setup → Einstein Activity Capture → Settings
2. Enable for target users or profiles
3. Configure sync settings (which emails/events to capture)
4. Wait 24-48 hours for initial sync

### Einstein Conversation Insights (UI-Only)

ECI requires a separate license and provisioning:

1. Setup → Einstein Conversation Insights → Settings
2. Connect recording provider (Zoom, Teams, etc.)
3. Enable for target users
4. Wait for transcripts to populate

---

## Data Source Impact on Suggestions

| Data Source | Suggestion Quality Impact |
|-------------|--------------------------|
| Notes only | Basic — relies on manually written notes |
| Notes + Email | Better — captures communication context automatically |
| Notes + Email + EAC | Good — full email + calendar activity captured |
| Notes + Email + EAC + ECI | Best — includes call transcript insights |

**Recommendation**: Enable Notes + Enhanced Email as the baseline (both automatable). Add EAC and ECI if the org has those licenses.

---

## Troubleshooting

| Issue | Cause | Fix |
|-------|-------|-----|
| No suggestions generated despite active flow | No recent data in any source | Create notes on open opportunities, wait 24h |
| Suggestions low quality | Only notes enabled, notes are sparse | Enable Enhanced Email, add more detailed notes |
| "VoiceCall not supported" error | ECI not provisioned | Skip ECI-related queries if not licensed |
| Emails not appearing in suggestions | Enhanced Email not enabled | Enable via SOAP API (see above) |
| EAC enabled but no emails captured | Sync delay or configuration issue | Check EAC settings, wait 24-48h |
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: 472kUpdated Claude CodeCodexVerifiedInstall
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: 472kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall