@salesforce/afv-skills 1.31.0 → 1.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/skills/agentforce-bot-upgrade/SKILL.md +217 -0
- package/skills/agentforce-bot-upgrade/references/extraction-blueprint.md +242 -0
- package/skills/agentforce-bot-upgrade/references/generate-agent-spec.md +128 -0
- package/skills/agentforce-bot-upgrade/references/handoff-output-format.md +208 -0
- package/skills/agentforce-bot-upgrade/references/input-contract.md +101 -0
- package/skills/agentforce-bot-upgrade/references/mapping-rules.md +113 -0
- package/skills/agentforce-bot-upgrade/references/planner-workflow-reference.md +78 -0
- package/skills/agentforce-bot-upgrade/references/post-conversion-enhancements-reference.md +67 -0
- package/skills/agentforce-bot-upgrade/references/quality-checklist.md +33 -0
- package/skills/agentforce-bot-upgrade/references/sf-cli-bot-reference.md +116 -0
- package/skills/dx-devops-work-item-manage/SKILL.md +270 -0
- package/skills/dx-devops-work-item-manage/examples/common-workflows.md +479 -0
- package/skills/dx-devops-work-item-manage/references/cli-commands.md +476 -0
- package/skills/dx-org-manage/SKILL.md +8 -5
- package/skills/dx-org-trial-expiration-check/SKILL.md +239 -0
- package/skills/dx-org-trial-expiration-check/scripts/check_expiration.sh +588 -0
- package/skills/experience-ui-bundle-app-coordinate/SKILL.md +12 -9
- package/skills/experience-ui-bundle-custom-app-generate/SKILL.md +29 -5
- package/skills/experience-ui-bundle-custom-app-generate/references/configure-metadata-custom-application.md +1 -1
- package/skills/experience-ui-bundle-custom-app-generate/scripts/resolve-uibundle-path.sh +30 -0
- package/skills/experience-ui-bundle-features-generate/SKILL.md +86 -11
- package/skills/experience-ui-bundle-features-generate/references/conflict-resolution-schema.json +20 -0
- package/skills/experience-ui-bundle-features-generate/scripts/verify-react-bundle.sh +14 -0
- package/skills/experience-ui-bundle-frontend-generate/SKILL.md +6 -1
- package/skills/experience-ui-bundle-frontend-generate/references/component.md +34 -1
- package/skills/experience-ui-bundle-frontend-generate/references/page.md +1 -1
- package/skills/experience-ui-bundle-project-generate/SKILL.md +111 -0
- package/skills/experience-ui-bundle-project-generate/scripts/flatten-project.mjs +33 -0
- package/skills/platform-custom-lightning-type-generate/SKILL.md +9 -14
- package/skills/platform-custom-lightning-type-generate/references/widget-rendition.md +27 -111
- package/skills/platform-lightning-type-widget-coordinate/SKILL.md +214 -0
- package/skills/platform-lightning-type-widget-coordinate/examples/existing-lightning-type-with-widget-prompt.md +80 -0
- package/skills/platform-lightning-type-widget-coordinate/examples/new-lightning-type-with-widget-prompt.md +75 -0
- package/skills/platform-lightning-type-widget-coordinate/references/build-plan-format.md +67 -0
- package/skills/platform-lightning-type-widget-coordinate/references/lightning-type-discovery.md +124 -0
- package/skills/platform-lightning-type-widget-coordinate/references/validation-gates.md +130 -0
- package/skills/platform-sharing-owd-configure/SKILL.md +142 -0
- package/skills/platform-sharing-owd-configure/examples/get_owd_output.md +38 -0
- package/skills/platform-sharing-owd-configure/examples/update_owd_output.md +44 -0
- package/skills/platform-sharing-owd-configure/references/access_levels.md +49 -0
- package/skills/platform-sharing-owd-configure/references/metadata_api_approach.md +69 -0
- package/skills/platform-sharing-rules-generate/SKILL.md +89 -19
- package/skills/platform-sharing-rules-generate/examples/test-cases.md +381 -0
- package/skills/platform-widget-generate/SKILL.md +241 -0
- package/skills/platform-widget-generate/examples/conditional.json +73 -0
- package/skills/platform-widget-generate/examples/list-with-foreach.json +66 -0
- package/skills/platform-widget-generate/examples/single-object.json +64 -0
- package/skills/platform-widget-generate/references/schema-from-lightning-type.md +76 -0
- package/skills/platform-widget-generate/references/widget-bundle-layout.md +116 -0
- package/skills/platform-widget-generate/references/widget-meta-directives.md +130 -0
- package/skills/sales-agentforce-pipeline-management-configure/SKILL.md +268 -0
- package/skills/sales-agentforce-pipeline-management-configure/assets/field-completion-template.genAiPromptTemplate-meta.xml +141 -0
- package/skills/sales-agentforce-pipeline-management-configure/assets/pipeline_management_flow.flow-meta.xml +548 -0
- package/skills/sales-agentforce-pipeline-management-configure/assets/sales_management_agent.agent +2938 -0
- package/skills/sales-agentforce-pipeline-management-configure/assets/sales_management_agent.bundle-meta.xml +4 -0
- package/skills/sales-agentforce-pipeline-management-configure/assets/sfdx-project.json +12 -0
- package/skills/sales-agentforce-pipeline-management-configure/assets/stage-descriptions/bant.txt +11 -0
- package/skills/sales-agentforce-pipeline-management-configure/assets/stage-descriptions/meddic.txt +11 -0
- package/skills/sales-agentforce-pipeline-management-configure/assets/stage-descriptions/spiced.txt +11 -0
- package/skills/sales-agentforce-pipeline-management-configure/examples/custom-prompt-instructions.md +317 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/admin-communication.md +355 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/agent-creation.md +383 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/auth-and-cli.md +146 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/automation-matrix.md +23 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/autonomous-updates.md +215 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/canonical-agent-path.md +75 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/data-sources.md +155 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/field-completion-prompt-template.md +120 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/field-completion-prompts.md +149 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/flags.md +13 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/flow-clone-from-template.md +447 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/metadata-inventory.md +330 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/opportunity-stages.md +246 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/repair-diagnostics.md +265 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/setup-order.md +263 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/soap-api-enablement.md +528 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/CHANGES.md +180 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/README.md +56 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/add-field-suggestion.sh +679 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/create-agent.sh +302 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/create-flow.sh +250 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/define-agent-access.sh +430 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/deploy-settings.sh +77 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/enable-deal-agent.sh +241 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/enable-prerequisites.sh +538 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/flow-debug-and-verify.sh +385 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/retrieve-settings.sh +131 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/setup-all.sh +2791 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/agent-bundle-publish.sh +189 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/agent-detection.sh +239 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/flow-builder.sh +238 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/psg.sh +48 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/soap.sh +140 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/stage-descriptions.sh +448 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/test-opp.sh +166 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/verify-all.sh +636 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/verify-prompt-generation.sh +346 -0
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
# Changes to Force Sales Agent BotDefinition Creation
|
|
2
|
+
|
|
3
|
+
## Product Context
|
|
4
|
+
|
|
5
|
+
**Previous behavior**: Pipeline Management had two architectures — "Platform Copilot" (agent user only, backend suggestions work) and "Standalone Bot" (agent user + BotDefinition, interactive chat + backend suggestions). The scripts treated both as valid and would exit successfully with just the agent user.
|
|
6
|
+
|
|
7
|
+
**Product requirement change**: Users now **require** an interactive Sales Agent they can chat with, which requires the BotDefinition. While backend suggestion generation can technically work with just the agent user + PSG, the complete user experience demands the BotDefinition for conversation interface.
|
|
8
|
+
|
|
9
|
+
## Problem
|
|
10
|
+
The `create-agent.sh` script previously accepted a "Platform Copilot" architecture where no BotDefinition existed and only backend suggestion generation worked. However, **BotDefinition:SalesAgent is REQUIRED** for a complete Pipeline Management experience — users need an interactive Sales Agent they can chat with. The original script would exit successfully when it found the agent user, even if no BotDefinition existed, leaving users without the required interactive agent.
|
|
11
|
+
|
|
12
|
+
## Solution
|
|
13
|
+
Modified `create-agent.sh` to **always attempt to create the Sales Agent BotDefinition** when:
|
|
14
|
+
- Agent user exists ✓
|
|
15
|
+
- PSG is assigned ✓
|
|
16
|
+
- **BotDefinition does NOT exist** ❌
|
|
17
|
+
|
|
18
|
+
## Changes Made to `create-agent.sh`
|
|
19
|
+
|
|
20
|
+
### Before (Lines 80-93)
|
|
21
|
+
```bash
|
|
22
|
+
if [[ -n "$EXISTING_BOT" ]]; then
|
|
23
|
+
echo " Architecture: Standalone Bot (BotDefinition:SalesAgent found)"
|
|
24
|
+
else
|
|
25
|
+
echo " Architecture: Platform Copilot (no standalone BotDefinition — this is normal)"
|
|
26
|
+
echo " PM actions are wired into the platform-level Copilot agent."
|
|
27
|
+
fi
|
|
28
|
+
echo ""
|
|
29
|
+
echo "Agent setup is FUNCTIONAL."
|
|
30
|
+
# ... exits immediately
|
|
31
|
+
exit 0
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Issue**: Script exits without creating BotDefinition, leaving users with no interactive agent.
|
|
35
|
+
|
|
36
|
+
### After (Lines 80-165)
|
|
37
|
+
```bash
|
|
38
|
+
if [[ -n "$EXISTING_BOT" ]]; then
|
|
39
|
+
# BotDefinition exists - done
|
|
40
|
+
echo " Architecture: Standalone Bot (BotDefinition:SalesAgent found)"
|
|
41
|
+
exit 0
|
|
42
|
+
else
|
|
43
|
+
# BotDefinition missing - create it (REQUIRED)
|
|
44
|
+
echo " BotDefinition:SalesAgent not found"
|
|
45
|
+
echo " Attempting to create Sales Agent BotDefinition for user interaction..."
|
|
46
|
+
|
|
47
|
+
# Deploy via authoring bundle
|
|
48
|
+
if ! sf agent publish authoring-bundle --api-name SalesAgent; then
|
|
49
|
+
echo "ERROR: Failed to publish Sales Agent"
|
|
50
|
+
exit 1
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
# Activate latest version
|
|
54
|
+
if ! sf agent activate --api-name SalesAgent --version <latest>; then
|
|
55
|
+
echo "ERROR: Failed to activate Sales Agent"
|
|
56
|
+
exit 1
|
|
57
|
+
fi
|
|
58
|
+
|
|
59
|
+
# Success - BotDefinition created and activated
|
|
60
|
+
exit 0
|
|
61
|
+
fi
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Fix**: Script now:
|
|
65
|
+
1. Detects missing BotDefinition
|
|
66
|
+
2. Deploys Sales Agent via authoring bundle
|
|
67
|
+
3. Activates the agent automatically
|
|
68
|
+
4. **Exits 1 if creation fails** (BotDefinition is required, not optional)
|
|
69
|
+
5. Provides clear success/failure messaging
|
|
70
|
+
|
|
71
|
+
## New Behavior
|
|
72
|
+
|
|
73
|
+
### When agent user exists AND BotDefinition exists
|
|
74
|
+
|
|
75
|
+
```text
|
|
76
|
+
✓ Agent user found
|
|
77
|
+
✓ BotDefinition found
|
|
78
|
+
✓ Agent setup is FUNCTIONAL
|
|
79
|
+
✓ No further action needed
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### When agent user exists BUT BotDefinition missing
|
|
83
|
+
|
|
84
|
+
```text
|
|
85
|
+
✓ Agent user found
|
|
86
|
+
⚠ BotDefinition NOT found
|
|
87
|
+
→ Creating Sales Agent via authoring bundle...
|
|
88
|
+
→ Publishing Sales Agent...
|
|
89
|
+
→ Activating Sales Agent version <latest>...
|
|
90
|
+
✓ Agent setup is COMPLETE
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### When agent user is missing
|
|
94
|
+
|
|
95
|
+
```text
|
|
96
|
+
✗ Agent user NOT found
|
|
97
|
+
→ Attempting SOAP toggle...
|
|
98
|
+
→ (existing fallback logic)
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Testing
|
|
102
|
+
|
|
103
|
+
To test the modified script:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
cd skills/sales-agentforce-pipeline-management-configure/scripts
|
|
107
|
+
|
|
108
|
+
# Test on org with agent user but no BotDefinition
|
|
109
|
+
/opt/homebrew/bin/bash create-agent.sh <org-alias>
|
|
110
|
+
|
|
111
|
+
# Expected output:
|
|
112
|
+
# - Detects agent user
|
|
113
|
+
# - Detects missing BotDefinition
|
|
114
|
+
# - Creates and activates Sales Agent
|
|
115
|
+
# - Exits with status 0
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Files Modified
|
|
119
|
+
|
|
120
|
+
1. **`scripts/create-agent.sh`** - Main logic change (lines 80-165)
|
|
121
|
+
- Added authoring bundle deployment when BotDefinition is missing
|
|
122
|
+
- Added agent activation step
|
|
123
|
+
- Added improved status messaging
|
|
124
|
+
|
|
125
|
+
## Backward Compatibility
|
|
126
|
+
|
|
127
|
+
✅ **Fully backward compatible**
|
|
128
|
+
- If BotDefinition already exists → same behavior as before (early exit)
|
|
129
|
+
- If agent user is missing → existing fallback logic unchanged
|
|
130
|
+
- Only new behavior is when agent user exists but BotDefinition is missing
|
|
131
|
+
|
|
132
|
+
## Related Files
|
|
133
|
+
|
|
134
|
+
- **Assets used**:
|
|
135
|
+
- `assets/sales_management_agent.agent` - Agent Script definition
|
|
136
|
+
- `assets/sales_management_agent.bundle-meta.xml` - Bundle metadata
|
|
137
|
+
|
|
138
|
+
- **Called from**:
|
|
139
|
+
- `setup-all.sh` - Main orchestration script (Phase 4)
|
|
140
|
+
|
|
141
|
+
## Verification
|
|
142
|
+
|
|
143
|
+
After running the modified script, verify with:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
/opt/homebrew/bin/bash verify-all.sh <org-alias>
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Expected output:
|
|
150
|
+
|
|
151
|
+
```text
|
|
152
|
+
--- Agent ---
|
|
153
|
+
[PASS] Agent user: salesmanagementagentuser@...
|
|
154
|
+
[PASS] BotDefinition: SalesAgent ← Should now PASS instead of FAIL
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## Impact
|
|
158
|
+
|
|
159
|
+
**Before**: Users had to manually create the Sales Agent BotDefinition
|
|
160
|
+
**After**: Sales Agent BotDefinition is created automatically
|
|
161
|
+
|
|
162
|
+
This ensures users get both:
|
|
163
|
+
1. ✅ Backend suggestion generation (agent user + flow)
|
|
164
|
+
2. ✅ Interactive Sales Agent for user chat (BotDefinition)
|
|
165
|
+
|
|
166
|
+
## Commit Message
|
|
167
|
+
|
|
168
|
+
```text
|
|
169
|
+
fix: always create Sales Agent BotDefinition in create-agent.sh
|
|
170
|
+
|
|
171
|
+
When agent user exists but BotDefinition is missing, the script now:
|
|
172
|
+
- Deploys Sales Agent via authoring bundle
|
|
173
|
+
- Activates version 1 automatically
|
|
174
|
+
- Provides clear success/failure messaging
|
|
175
|
+
|
|
176
|
+
This ensures users get an interactive Sales Agent they can chat with,
|
|
177
|
+
not just backend suggestion generation.
|
|
178
|
+
|
|
179
|
+
Fixes: Pipeline Management setup completing without user-facing agent
|
|
180
|
+
```
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Scripts for Pipeline Management Configuration
|
|
2
|
+
|
|
3
|
+
This directory contains automation scripts for enabling Agentforce Pipeline Management. All scripts require an `sfdx-project.json` in your working directory.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
- Salesforce CLI (`sf`) installed
|
|
8
|
+
- Authenticated org with alias
|
|
9
|
+
- `sfdx-project.json` in working directory (see `../assets/sfdx-project.json`)
|
|
10
|
+
|
|
11
|
+
## Usage Table
|
|
12
|
+
|
|
13
|
+
| Script | Purpose | Usage | Dependencies |
|
|
14
|
+
|--------|---------|-------|--------------|
|
|
15
|
+
| `setup-all.sh` | **Master orchestration** — end-to-end setup, enables all prerequisites + PM inline | `./setup-all.sh <org-alias> --fields "NextStep,Risk__c"` | None (auth only) |
|
|
16
|
+
| `retrieve-settings.sh` | Retrieve all settings for inspection | `./retrieve-settings.sh <org-alias>` | None |
|
|
17
|
+
| `enable-prerequisites.sh` | Enable prerequisite settings only (no fields/flow/agent) | `./enable-prerequisites.sh <org-alias>` | None |
|
|
18
|
+
| `enable-deal-agent.sh` | Enable SalesDealAgent settings (standalone helper) | `./enable-deal-agent.sh <org-alias>` | Prerequisites must already be enabled |
|
|
19
|
+
| `create-flow.sh` | Detect/verify/activate suggestion flow | `./create-flow.sh <org-alias>` | Deal agent enabled + manual UI clone |
|
|
20
|
+
| `create-agent.sh` | Verify/create/activate agent | `./create-agent.sh <org-alias>` | Deal agent enabled |
|
|
21
|
+
| `deploy-settings.sh` | Deploy settings from local files | `./deploy-settings.sh <org-alias>` | Local metadata files |
|
|
22
|
+
| `verify-all.sh` | Comprehensive status check | `./verify-all.sh <org-alias>` | None (read-only) |
|
|
23
|
+
|
|
24
|
+
## Execution Order
|
|
25
|
+
|
|
26
|
+
For end-to-end setup, drive **`setup-all.sh`** — it enables all prerequisites (Einstein GenAI, Agentforce, Enhanced Notes, Opportunity Team), enables Pipeline Management, deploys prompt templates, builds/activates the flow, provisions the agent + PSGs, and verifies, in dependency order. The individual scripts below are for isolated inspection or repair of a single component:
|
|
27
|
+
|
|
28
|
+
1. **retrieve-settings.sh** — Inspect current state
|
|
29
|
+
2. **enable-prerequisites.sh** — Enable prerequisite settings only (Einstein, Notes, Opportunity Team)
|
|
30
|
+
3. **enable-deal-agent.sh** — Enable Pipeline Management in isolation (prerequisites must already be on)
|
|
31
|
+
4. **create-flow.sh** — Detect/verify/activate flow (requires manual Setup UI clone first)
|
|
32
|
+
5. **create-agent.sh** — Verify agent user and PSGs (auto-provisioned on enablement)
|
|
33
|
+
6. **verify-all.sh** — Comprehensive status check (read-only)
|
|
34
|
+
|
|
35
|
+
## Important Notes
|
|
36
|
+
|
|
37
|
+
- All scripts are idempotent (safe to re-run)
|
|
38
|
+
- Scripts use SOAP API v62.0-64.0 for settings that fail silently via CLI
|
|
39
|
+
- Individual setting deployment isolates failures
|
|
40
|
+
- Each script validates before making changes
|
|
41
|
+
- All `sf` commands use `--json` with error suppression for clean parsing
|
|
42
|
+
|
|
43
|
+
## sfdx-project.json Requirement
|
|
44
|
+
|
|
45
|
+
All scripts expect an `sfdx-project.json` in your working directory. Copy from `../assets/sfdx-project.json`:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
cp ../assets/sfdx-project.json ./sfdx-project.json
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Error Handling
|
|
52
|
+
|
|
53
|
+
- Scripts exit with non-zero code on critical failures
|
|
54
|
+
- Warnings are logged but don't stop execution
|
|
55
|
+
- SOAP API errors are captured and reported
|
|
56
|
+
- Missing metadata is handled gracefully
|