@salesforce/afv-skills 1.1.0 → 1.2.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 +4 -4
- package/skills/agentforce-development/SKILL.md +427 -0
- package/skills/agentforce-development/assets/README-legacy.md +89 -0
- package/skills/agentforce-development/assets/agent-spec-template.md +90 -0
- package/skills/agentforce-development/assets/agents/README.md +45 -0
- package/skills/agentforce-development/assets/agents/hello-world.agent +60 -0
- package/skills/agentforce-development/assets/agents/multi-topic.agent +105 -0
- package/skills/agentforce-development/assets/agents/production-faq.agent +101 -0
- package/skills/agentforce-development/assets/agents/production-faq.bundle-meta.xml +4 -0
- package/skills/agentforce-development/assets/agents/simple-qa.agent +72 -0
- package/skills/agentforce-development/assets/apex/models-api-queueable.cls +225 -0
- package/skills/agentforce-development/assets/bundle-meta.xml +23 -0
- package/skills/agentforce-development/assets/components/apex-action.agent +52 -0
- package/skills/agentforce-development/assets/components/error-handling.agent +58 -0
- package/skills/agentforce-development/assets/components/escalation-setup.agent +169 -0
- package/skills/agentforce-development/assets/components/flow-action.agent +66 -0
- package/skills/agentforce-development/assets/components/n-ary-conditions.agent +110 -0
- package/skills/agentforce-development/assets/components/topic-with-actions.agent +40 -0
- package/skills/agentforce-development/assets/deterministic-routing.agent +166 -0
- package/skills/agentforce-development/assets/escalation-pattern.agent +209 -0
- package/skills/agentforce-development/assets/flow-action-lookup.agent +115 -0
- package/skills/agentforce-development/assets/hub-and-spoke.agent +104 -0
- package/skills/agentforce-development/assets/invocable-apex-template.cls +187 -0
- package/skills/agentforce-development/assets/local-info-agent-annotated.agent +355 -0
- package/skills/agentforce-development/assets/metadata/basic-prompt-template.promptTemplate-meta.xml +109 -0
- package/skills/agentforce-development/assets/metadata/genai-function-apex.xml +92 -0
- package/skills/agentforce-development/assets/metadata/genai-function-flow.xml +57 -0
- package/skills/agentforce-development/assets/metadata/genai-plugin.xml +72 -0
- package/skills/agentforce-development/assets/metadata/http-callout-flow.flow-meta.xml +348 -0
- package/skills/agentforce-development/assets/metadata/record-grounded-prompt.promptTemplate-meta.xml +136 -0
- package/skills/agentforce-development/assets/minimal-starter.agent +42 -0
- package/skills/agentforce-development/assets/patterns/README.md +254 -0
- package/skills/agentforce-development/assets/patterns/action-callbacks.agent +178 -0
- package/skills/agentforce-development/assets/patterns/advanced-input-bindings.agent +141 -0
- package/skills/agentforce-development/assets/patterns/bidirectional-routing.agent +156 -0
- package/skills/agentforce-development/assets/patterns/critical-input-collection.agent +244 -0
- package/skills/agentforce-development/assets/patterns/delegation-routing.agent +89 -0
- package/skills/agentforce-development/assets/patterns/lifecycle-events.agent +127 -0
- package/skills/agentforce-development/assets/patterns/llm-controlled-actions.agent +184 -0
- package/skills/agentforce-development/assets/patterns/multi-step-workflow.agent +282 -0
- package/skills/agentforce-development/assets/patterns/open-gate-routing.agent +286 -0
- package/skills/agentforce-development/assets/patterns/procedural-instructions.agent +273 -0
- package/skills/agentforce-development/assets/patterns/prompt-template-action.agent +188 -0
- package/skills/agentforce-development/assets/patterns/system-instruction-overrides.agent +293 -0
- package/skills/agentforce-development/assets/prompt-rag-search.agent +131 -0
- package/skills/agentforce-development/assets/template-multi-topic.agent +160 -0
- package/skills/agentforce-development/assets/template-single-topic.agent +81 -0
- package/skills/agentforce-development/assets/verification-gate.agent +208 -0
- package/skills/agentforce-development/references/action-prompt-templates.md +164 -0
- package/skills/agentforce-development/references/actions-reference.md +592 -0
- package/skills/agentforce-development/references/agent-access-guide.md +72 -0
- package/skills/agentforce-development/references/agent-design-and-spec-creation.md +1010 -0
- package/skills/agentforce-development/references/agent-metadata-and-lifecycle.md +575 -0
- package/skills/agentforce-development/references/agent-script-core-language.md +1218 -0
- package/skills/agentforce-development/references/agent-topic-map-diagrams.md +323 -0
- package/skills/agentforce-development/references/agent-user-setup.md +526 -0
- package/skills/agentforce-development/references/agent-validation-and-debugging.md +803 -0
- package/skills/agentforce-development/references/known-issues.md +353 -0
- package/skills/agentforce-development/references/minimal-examples.md +67 -0
- package/skills/agentforce-development/references/production-gotchas.md +279 -0
- package/skills/agentforce-development/references/salesforce-cli-for-agents.md +393 -0
- package/skills/agentforce-development/references/version-history.md +23 -0
- package/skills/generate-permission-set/SKILL.md +174 -0
- package/skills/salesforce-custom-application/SKILL.md +1 -2
- package/skills/salesforce-custom-field/SKILL.md +0 -4
- package/skills/salesforce-custom-tab/SKILL.md +84 -8
- package/skills/salesforce-experience-lwr-site/SKILL.md +196 -0
- package/skills/salesforce-experience-lwr-site/docs/bootstrap-template-byo-lwr.md +224 -0
- package/skills/salesforce-experience-lwr-site/docs/configure-content-brandingSet.md +131 -0
- package/skills/salesforce-experience-lwr-site/docs/configure-content-route.md +232 -0
- package/skills/salesforce-experience-lwr-site/docs/configure-content-themeLayout.md +141 -0
- package/skills/salesforce-experience-lwr-site/docs/configure-content-view.md +233 -0
- package/skills/salesforce-experience-lwr-site/docs/configure-guest-sharing-rules.md +42 -0
- package/skills/salesforce-experience-lwr-site/docs/handle-component-and-region-ids.md +27 -0
- package/skills/salesforce-experience-lwr-site/docs/handle-ui-components.md +215 -0
- package/skills/salesforce-flow/SKILL.md +2 -2
- package/skills/salesforce-fragment/SKILL.md +85 -10
- package/skills/salesforce-lightning-app-build/SKILL.md +102 -10
- package/skills/apex-class/SKILL.md +0 -253
- package/skills/apex-class/examples/AccountDeduplicationBatch.cls +0 -148
- package/skills/apex-class/examples/AccountSelector.cls +0 -193
- package/skills/apex-class/examples/AccountService.cls +0 -201
- package/skills/apex-class/templates/abstract.cls +0 -128
- package/skills/apex-class/templates/batch.cls +0 -125
- package/skills/apex-class/templates/domain.cls +0 -102
- package/skills/apex-class/templates/dto.cls +0 -108
- package/skills/apex-class/templates/exception.cls +0 -51
- package/skills/apex-class/templates/interface.cls +0 -25
- package/skills/apex-class/templates/queueable.cls +0 -92
- package/skills/apex-class/templates/schedulable.cls +0 -75
- package/skills/apex-class/templates/selector.cls +0 -92
- package/skills/apex-class/templates/service.cls +0 -69
- package/skills/apex-class/templates/utility.cls +0 -97
- package/skills/apex-test-class/SKILL.md +0 -101
- package/skills/apex-test-class/references/assertion-patterns.md +0 -209
- package/skills/apex-test-class/references/async-testing.md +0 -276
- package/skills/apex-test-class/references/mocking-patterns.md +0 -219
- package/skills/apex-test-class/references/test-data-factory.md +0 -176
- package/skills/deployment-readiness-check/SKILL.md +0 -257
- package/skills/deployment-readiness-check/assets/deployment_checklist.md +0 -286
- package/skills/deployment-readiness-check/references/rollback_procedures.md +0 -308
- package/skills/deployment-readiness-check/scripts/check_metadata.sh +0 -207
- package/skills/salesforce-experience-site/SKILL.md +0 -178
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!--
|
|
3
|
+
GenAiPlugin Template: Agent Topic/Plugin Container
|
|
4
|
+
|
|
5
|
+
Use Case: Organize GenAiFunctions into logical groups (Topics)
|
|
6
|
+
- Groups related functions together
|
|
7
|
+
- Provides topic-level instructions
|
|
8
|
+
- Maps to Agent Script topic concepts
|
|
9
|
+
|
|
10
|
+
Note: GenAiPlugin is the metadata equivalent of a "topic" in Agent Script.
|
|
11
|
+
Use this when you want to organize functions deployed via metadata
|
|
12
|
+
rather than Agent Script.
|
|
13
|
+
|
|
14
|
+
Setup Steps:
|
|
15
|
+
1. Replace all {{placeholder}} values
|
|
16
|
+
2. Deploy GenAiFunctions first
|
|
17
|
+
3. Deploy this GenAiPlugin
|
|
18
|
+
|
|
19
|
+
File Location: force-app/main/default/genAiPlugins/{{PluginName}}.genAiPlugin-meta.xml
|
|
20
|
+
-->
|
|
21
|
+
<GenAiPlugin xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
22
|
+
<!-- Display name for the topic/plugin -->
|
|
23
|
+
<masterLabel>{{PluginLabel}}</masterLabel>
|
|
24
|
+
|
|
25
|
+
<!-- Description shown in Agent Builder -->
|
|
26
|
+
<description>{{PluginDescription}}</description>
|
|
27
|
+
|
|
28
|
+
<!-- Developer name (API name) -->
|
|
29
|
+
<developerName>{{PluginDeveloperName}}</developerName>
|
|
30
|
+
|
|
31
|
+
<!--
|
|
32
|
+
Plugin Instructions:
|
|
33
|
+
Natural language instructions for how the agent should use
|
|
34
|
+
functions in this plugin. Similar to topic instructions in Agent Script.
|
|
35
|
+
-->
|
|
36
|
+
<pluginInstructions>
|
|
37
|
+
{{Instructions for the agent on how to use functions in this topic.
|
|
38
|
+
Include guidance on when to use specific functions,
|
|
39
|
+
how to handle edge cases, and any constraints.}}
|
|
40
|
+
</pluginInstructions>
|
|
41
|
+
|
|
42
|
+
<!--
|
|
43
|
+
Plugin Type:
|
|
44
|
+
- Standard: Regular function grouping
|
|
45
|
+
- Copilot: For Salesforce Copilot-specific plugins
|
|
46
|
+
-->
|
|
47
|
+
<pluginType>Standard</pluginType>
|
|
48
|
+
|
|
49
|
+
<!--
|
|
50
|
+
Associated Functions:
|
|
51
|
+
List the GenAiFunction developer names that belong to this plugin.
|
|
52
|
+
-->
|
|
53
|
+
<genAiFunctions>
|
|
54
|
+
<function>{{GenAiFunction1DeveloperName}}</function>
|
|
55
|
+
</genAiFunctions>
|
|
56
|
+
<genAiFunctions>
|
|
57
|
+
<function>{{GenAiFunction2DeveloperName}}</function>
|
|
58
|
+
</genAiFunctions>
|
|
59
|
+
|
|
60
|
+
<!--
|
|
61
|
+
AGENT BUILDER INTEGRATION:
|
|
62
|
+
|
|
63
|
+
After deploying GenAiPlugin:
|
|
64
|
+
1. Open Agent Builder in Setup
|
|
65
|
+
2. Navigate to Topics
|
|
66
|
+
3. Your plugin appears as a Topic
|
|
67
|
+
4. Associated functions are available as Actions
|
|
68
|
+
|
|
69
|
+
This provides an alternative to Agent Script for more
|
|
70
|
+
complex deployments or when you need metadata-level control.
|
|
71
|
+
-->
|
|
72
|
+
</GenAiPlugin>
|
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!--
|
|
3
|
+
HTTP Callout Flow Template for Agent Actions
|
|
4
|
+
|
|
5
|
+
Use Case: Create Flow-based API actions for agents
|
|
6
|
+
- Enables external API calls from Agent Script
|
|
7
|
+
- Uses Named Credential for secure auth
|
|
8
|
+
- Works with flow:// target in Agent Script
|
|
9
|
+
|
|
10
|
+
Pattern:
|
|
11
|
+
Agent Script → flow://{{FlowName}} → HTTP Callout → External API
|
|
12
|
+
|
|
13
|
+
Prerequisites:
|
|
14
|
+
1. Named Credential configured for API auth
|
|
15
|
+
2. sf-integration skill used to create Named Credential
|
|
16
|
+
|
|
17
|
+
Setup Steps:
|
|
18
|
+
1. Replace all {{placeholder}} values
|
|
19
|
+
2. Deploy Named Credential first
|
|
20
|
+
3. Deploy this Flow
|
|
21
|
+
4. Reference in Agent Script: target: "flow://{{FlowApiName}}"
|
|
22
|
+
|
|
23
|
+
File Location: force-app/main/default/flows/{{FlowApiName}}.flow-meta.xml
|
|
24
|
+
-->
|
|
25
|
+
<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
26
|
+
<!-- API Name -->
|
|
27
|
+
<fullName>{{FlowApiName}}</fullName>
|
|
28
|
+
|
|
29
|
+
<!-- Display label -->
|
|
30
|
+
<label>{{FlowLabel}}</label>
|
|
31
|
+
|
|
32
|
+
<!-- Description -->
|
|
33
|
+
<description>HTTP callout to {{ExternalSystemName}} for agent actions</description>
|
|
34
|
+
|
|
35
|
+
<!-- Autolaunched Flow (required for agent actions) -->
|
|
36
|
+
<processType>AutoLaunchedFlow</processType>
|
|
37
|
+
|
|
38
|
+
<!-- API Version -->
|
|
39
|
+
<apiVersion>66.0</apiVersion>
|
|
40
|
+
|
|
41
|
+
<!-- Active status -->
|
|
42
|
+
<status>Active</status>
|
|
43
|
+
|
|
44
|
+
<!--
|
|
45
|
+
=========================================
|
|
46
|
+
INPUT VARIABLES
|
|
47
|
+
Must be marked "Available for Input"
|
|
48
|
+
=========================================
|
|
49
|
+
-->
|
|
50
|
+
<variables>
|
|
51
|
+
<name>input_param_1</name>
|
|
52
|
+
<dataType>String</dataType>
|
|
53
|
+
<isCollection>false</isCollection>
|
|
54
|
+
<isInput>true</isInput>
|
|
55
|
+
<isOutput>false</isOutput>
|
|
56
|
+
<value>
|
|
57
|
+
<stringValue></stringValue>
|
|
58
|
+
</value>
|
|
59
|
+
</variables>
|
|
60
|
+
|
|
61
|
+
<!-- Add more input variables as needed -->
|
|
62
|
+
<!--
|
|
63
|
+
<variables>
|
|
64
|
+
<name>input_param_2</name>
|
|
65
|
+
<dataType>String</dataType>
|
|
66
|
+
<isCollection>false</isCollection>
|
|
67
|
+
<isInput>true</isInput>
|
|
68
|
+
<isOutput>false</isOutput>
|
|
69
|
+
</variables>
|
|
70
|
+
-->
|
|
71
|
+
|
|
72
|
+
<!--
|
|
73
|
+
=========================================
|
|
74
|
+
OUTPUT VARIABLES
|
|
75
|
+
Must be marked "Available for Output"
|
|
76
|
+
=========================================
|
|
77
|
+
-->
|
|
78
|
+
<variables>
|
|
79
|
+
<name>output_result</name>
|
|
80
|
+
<dataType>String</dataType>
|
|
81
|
+
<isCollection>false</isCollection>
|
|
82
|
+
<isInput>false</isInput>
|
|
83
|
+
<isOutput>true</isOutput>
|
|
84
|
+
</variables>
|
|
85
|
+
|
|
86
|
+
<variables>
|
|
87
|
+
<name>output_status</name>
|
|
88
|
+
<dataType>String</dataType>
|
|
89
|
+
<isCollection>false</isCollection>
|
|
90
|
+
<isInput>false</isInput>
|
|
91
|
+
<isOutput>true</isOutput>
|
|
92
|
+
</variables>
|
|
93
|
+
|
|
94
|
+
<variables>
|
|
95
|
+
<name>output_error</name>
|
|
96
|
+
<dataType>String</dataType>
|
|
97
|
+
<isCollection>false</isCollection>
|
|
98
|
+
<isInput>false</isInput>
|
|
99
|
+
<isOutput>true</isOutput>
|
|
100
|
+
</variables>
|
|
101
|
+
|
|
102
|
+
<!--
|
|
103
|
+
=========================================
|
|
104
|
+
HTTP CALLOUT ACTION
|
|
105
|
+
Core Action for making HTTP requests
|
|
106
|
+
=========================================
|
|
107
|
+
-->
|
|
108
|
+
<actionCalls>
|
|
109
|
+
<name>HTTP_Callout</name>
|
|
110
|
+
<label>Call External API</label>
|
|
111
|
+
<locationX>176</locationX>
|
|
112
|
+
<locationY>158</locationY>
|
|
113
|
+
|
|
114
|
+
<!-- HTTP Callout Core Action -->
|
|
115
|
+
<actionType>httpCallout</actionType>
|
|
116
|
+
|
|
117
|
+
<!--
|
|
118
|
+
Named Credential for authentication
|
|
119
|
+
Format: callout:NamedCredentialName
|
|
120
|
+
-->
|
|
121
|
+
<actionName>callout:{{NamedCredentialName}}</actionName>
|
|
122
|
+
|
|
123
|
+
<!-- Continue on error to handle gracefully -->
|
|
124
|
+
<connector>
|
|
125
|
+
<targetReference>Check_Response</targetReference>
|
|
126
|
+
</connector>
|
|
127
|
+
|
|
128
|
+
<faultConnector>
|
|
129
|
+
<targetReference>Handle_Error</targetReference>
|
|
130
|
+
</faultConnector>
|
|
131
|
+
|
|
132
|
+
<!-- HTTP Method: GET, POST, PUT, PATCH, DELETE -->
|
|
133
|
+
<inputParameters>
|
|
134
|
+
<name>method</name>
|
|
135
|
+
<value>
|
|
136
|
+
<stringValue>{{GET|POST|PUT|PATCH|DELETE}}</stringValue>
|
|
137
|
+
</value>
|
|
138
|
+
</inputParameters>
|
|
139
|
+
|
|
140
|
+
<!-- API Endpoint path (appended to Named Credential base URL) -->
|
|
141
|
+
<inputParameters>
|
|
142
|
+
<name>url</name>
|
|
143
|
+
<value>
|
|
144
|
+
<elementReference>API_Endpoint</elementReference>
|
|
145
|
+
</value>
|
|
146
|
+
</inputParameters>
|
|
147
|
+
|
|
148
|
+
<!-- Request body (for POST/PUT/PATCH) -->
|
|
149
|
+
<inputParameters>
|
|
150
|
+
<name>body</name>
|
|
151
|
+
<value>
|
|
152
|
+
<elementReference>Request_Body</elementReference>
|
|
153
|
+
</value>
|
|
154
|
+
</inputParameters>
|
|
155
|
+
|
|
156
|
+
<!-- Response body -->
|
|
157
|
+
<outputParameters>
|
|
158
|
+
<assignToReference>Response_Body</assignToReference>
|
|
159
|
+
<name>responseBody</name>
|
|
160
|
+
</outputParameters>
|
|
161
|
+
|
|
162
|
+
<!-- Response status code -->
|
|
163
|
+
<outputParameters>
|
|
164
|
+
<assignToReference>Response_Status_Code</assignToReference>
|
|
165
|
+
<name>statusCode</name>
|
|
166
|
+
</outputParameters>
|
|
167
|
+
</actionCalls>
|
|
168
|
+
|
|
169
|
+
<!--
|
|
170
|
+
=========================================
|
|
171
|
+
FORMULAS
|
|
172
|
+
Build request URL and body
|
|
173
|
+
=========================================
|
|
174
|
+
-->
|
|
175
|
+
<formulas>
|
|
176
|
+
<name>API_Endpoint</name>
|
|
177
|
+
<dataType>String</dataType>
|
|
178
|
+
<!-- Build endpoint with input parameters -->
|
|
179
|
+
<expression>"/{{apiPath}}/" & {!input_param_1}</expression>
|
|
180
|
+
</formulas>
|
|
181
|
+
|
|
182
|
+
<formulas>
|
|
183
|
+
<name>Request_Body</name>
|
|
184
|
+
<dataType>String</dataType>
|
|
185
|
+
<!-- Build JSON request body -->
|
|
186
|
+
<expression>'{"param1": "' & {!input_param_1} & '"}'</expression>
|
|
187
|
+
</formulas>
|
|
188
|
+
|
|
189
|
+
<!--
|
|
190
|
+
=========================================
|
|
191
|
+
PRIVATE VARIABLES
|
|
192
|
+
For internal flow processing
|
|
193
|
+
=========================================
|
|
194
|
+
-->
|
|
195
|
+
<variables>
|
|
196
|
+
<name>Response_Body</name>
|
|
197
|
+
<dataType>String</dataType>
|
|
198
|
+
<isCollection>false</isCollection>
|
|
199
|
+
<isInput>false</isInput>
|
|
200
|
+
<isOutput>false</isOutput>
|
|
201
|
+
</variables>
|
|
202
|
+
|
|
203
|
+
<variables>
|
|
204
|
+
<name>Response_Status_Code</name>
|
|
205
|
+
<dataType>Number</dataType>
|
|
206
|
+
<isCollection>false</isCollection>
|
|
207
|
+
<isInput>false</isInput>
|
|
208
|
+
<isOutput>false</isOutput>
|
|
209
|
+
<scale>0</scale>
|
|
210
|
+
</variables>
|
|
211
|
+
|
|
212
|
+
<!--
|
|
213
|
+
=========================================
|
|
214
|
+
DECISION: Check Response Status
|
|
215
|
+
=========================================
|
|
216
|
+
-->
|
|
217
|
+
<decisions>
|
|
218
|
+
<name>Check_Response</name>
|
|
219
|
+
<label>Check Response Status</label>
|
|
220
|
+
<locationX>176</locationX>
|
|
221
|
+
<locationY>278</locationY>
|
|
222
|
+
|
|
223
|
+
<defaultConnector>
|
|
224
|
+
<targetReference>Set_Error_Output</targetReference>
|
|
225
|
+
</defaultConnector>
|
|
226
|
+
<defaultConnectorLabel>Error</defaultConnectorLabel>
|
|
227
|
+
|
|
228
|
+
<rules>
|
|
229
|
+
<name>Success</name>
|
|
230
|
+
<conditionLogic>and</conditionLogic>
|
|
231
|
+
<conditions>
|
|
232
|
+
<leftValueReference>Response_Status_Code</leftValueReference>
|
|
233
|
+
<operator>GreaterThanOrEqualTo</operator>
|
|
234
|
+
<rightValue>
|
|
235
|
+
<numberValue>200</numberValue>
|
|
236
|
+
</rightValue>
|
|
237
|
+
</conditions>
|
|
238
|
+
<conditions>
|
|
239
|
+
<leftValueReference>Response_Status_Code</leftValueReference>
|
|
240
|
+
<operator>LessThan</operator>
|
|
241
|
+
<rightValue>
|
|
242
|
+
<numberValue>300</numberValue>
|
|
243
|
+
</rightValue>
|
|
244
|
+
</conditions>
|
|
245
|
+
<connector>
|
|
246
|
+
<targetReference>Set_Success_Output</targetReference>
|
|
247
|
+
</connector>
|
|
248
|
+
<label>Success (2xx)</label>
|
|
249
|
+
</rules>
|
|
250
|
+
</decisions>
|
|
251
|
+
|
|
252
|
+
<!--
|
|
253
|
+
=========================================
|
|
254
|
+
ASSIGNMENTS: Set Output Variables
|
|
255
|
+
=========================================
|
|
256
|
+
-->
|
|
257
|
+
<assignments>
|
|
258
|
+
<name>Set_Success_Output</name>
|
|
259
|
+
<label>Set Success Output</label>
|
|
260
|
+
<locationX>50</locationX>
|
|
261
|
+
<locationY>398</locationY>
|
|
262
|
+
|
|
263
|
+
<assignmentItems>
|
|
264
|
+
<assignToReference>output_result</assignToReference>
|
|
265
|
+
<operator>Assign</operator>
|
|
266
|
+
<value>
|
|
267
|
+
<elementReference>Response_Body</elementReference>
|
|
268
|
+
</value>
|
|
269
|
+
</assignmentItems>
|
|
270
|
+
<assignmentItems>
|
|
271
|
+
<assignToReference>output_status</assignToReference>
|
|
272
|
+
<operator>Assign</operator>
|
|
273
|
+
<value>
|
|
274
|
+
<stringValue>Success</stringValue>
|
|
275
|
+
</value>
|
|
276
|
+
</assignmentItems>
|
|
277
|
+
</assignments>
|
|
278
|
+
|
|
279
|
+
<assignments>
|
|
280
|
+
<name>Set_Error_Output</name>
|
|
281
|
+
<label>Set Error Output</label>
|
|
282
|
+
<locationX>302</locationX>
|
|
283
|
+
<locationY>398</locationY>
|
|
284
|
+
|
|
285
|
+
<assignmentItems>
|
|
286
|
+
<assignToReference>output_status</assignToReference>
|
|
287
|
+
<operator>Assign</operator>
|
|
288
|
+
<value>
|
|
289
|
+
<stringValue>Error</stringValue>
|
|
290
|
+
</value>
|
|
291
|
+
</assignmentItems>
|
|
292
|
+
<assignmentItems>
|
|
293
|
+
<assignToReference>output_error</assignToReference>
|
|
294
|
+
<operator>Assign</operator>
|
|
295
|
+
<value>
|
|
296
|
+
<elementReference>Response_Body</elementReference>
|
|
297
|
+
</value>
|
|
298
|
+
</assignmentItems>
|
|
299
|
+
</assignments>
|
|
300
|
+
|
|
301
|
+
<assignments>
|
|
302
|
+
<name>Handle_Error</name>
|
|
303
|
+
<label>Handle Callout Error</label>
|
|
304
|
+
<locationX>440</locationX>
|
|
305
|
+
<locationY>278</locationY>
|
|
306
|
+
|
|
307
|
+
<assignmentItems>
|
|
308
|
+
<assignToReference>output_status</assignToReference>
|
|
309
|
+
<operator>Assign</operator>
|
|
310
|
+
<value>
|
|
311
|
+
<stringValue>Error</stringValue>
|
|
312
|
+
</value>
|
|
313
|
+
</assignmentItems>
|
|
314
|
+
<assignmentItems>
|
|
315
|
+
<assignToReference>output_error</assignToReference>
|
|
316
|
+
<operator>Assign</operator>
|
|
317
|
+
<value>
|
|
318
|
+
<stringValue>HTTP callout failed</stringValue>
|
|
319
|
+
</value>
|
|
320
|
+
</assignmentItems>
|
|
321
|
+
</assignments>
|
|
322
|
+
|
|
323
|
+
<!-- Flow start -->
|
|
324
|
+
<start>
|
|
325
|
+
<locationX>50</locationX>
|
|
326
|
+
<locationY>0</locationY>
|
|
327
|
+
<connector>
|
|
328
|
+
<targetReference>HTTP_Callout</targetReference>
|
|
329
|
+
</connector>
|
|
330
|
+
</start>
|
|
331
|
+
|
|
332
|
+
<!--
|
|
333
|
+
AGENT SCRIPT USAGE:
|
|
334
|
+
|
|
335
|
+
actions:
|
|
336
|
+
call_api:
|
|
337
|
+
description: "Calls external API"
|
|
338
|
+
inputs:
|
|
339
|
+
param1: string
|
|
340
|
+
description: "Input parameter"
|
|
341
|
+
outputs:
|
|
342
|
+
result: string
|
|
343
|
+
description: "API response"
|
|
344
|
+
status: string
|
|
345
|
+
description: "Success or Error"
|
|
346
|
+
target: "flow://{{FlowApiName}}"
|
|
347
|
+
-->
|
|
348
|
+
</Flow>
|
package/skills/agentforce-development/assets/metadata/record-grounded-prompt.promptTemplate-meta.xml
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!--
|
|
3
|
+
Prompt Template: Record-Grounded Template
|
|
4
|
+
|
|
5
|
+
Use Case: Prompts that use Salesforce record data for context
|
|
6
|
+
- Ground responses in actual CRM data
|
|
7
|
+
- Summarize records intelligently
|
|
8
|
+
- Generate record-specific content
|
|
9
|
+
|
|
10
|
+
Key Feature: Variables bound to record fields provide real data
|
|
11
|
+
to the prompt, ensuring accuracy and relevance.
|
|
12
|
+
|
|
13
|
+
Setup Steps:
|
|
14
|
+
1. Replace all {{placeholder}} values
|
|
15
|
+
2. Configure record field bindings
|
|
16
|
+
3. Deploy to org
|
|
17
|
+
|
|
18
|
+
File Location: force-app/main/default/promptTemplates/{{TemplateName}}.promptTemplate-meta.xml
|
|
19
|
+
-->
|
|
20
|
+
<PromptTemplate xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
21
|
+
<fullName>{{TemplateName}}</fullName>
|
|
22
|
+
<masterLabel>{{TemplateLabel}}</masterLabel>
|
|
23
|
+
<description>{{TemplateDescription}}</description>
|
|
24
|
+
|
|
25
|
+
<!-- Record summary type for record-grounded prompts -->
|
|
26
|
+
<type>recordSummary</type>
|
|
27
|
+
|
|
28
|
+
<isActive>true</isActive>
|
|
29
|
+
|
|
30
|
+
<!--
|
|
31
|
+
Primary Object:
|
|
32
|
+
The main object this template operates on.
|
|
33
|
+
-->
|
|
34
|
+
<objectType>{{ObjectApiName}}</objectType>
|
|
35
|
+
|
|
36
|
+
<!--
|
|
37
|
+
Prompt with record field references:
|
|
38
|
+
Use {!variableName} syntax for bound fields.
|
|
39
|
+
-->
|
|
40
|
+
<promptContent>
|
|
41
|
+
You are summarizing a {{ObjectLabel}} record for a sales representative.
|
|
42
|
+
|
|
43
|
+
Record Information:
|
|
44
|
+
- Name: {!recordName}
|
|
45
|
+
- Status: {!recordStatus}
|
|
46
|
+
- Owner: {!ownerName}
|
|
47
|
+
- Created Date: {!createdDate}
|
|
48
|
+
- Last Activity: {!lastActivityDate}
|
|
49
|
+
|
|
50
|
+
Additional Context:
|
|
51
|
+
{!additionalNotes}
|
|
52
|
+
|
|
53
|
+
Related Information:
|
|
54
|
+
{!relatedRecords}
|
|
55
|
+
|
|
56
|
+
Please provide a concise summary that highlights:
|
|
57
|
+
1. Current status and recent activity
|
|
58
|
+
2. Key metrics or important values
|
|
59
|
+
3. Recommended next steps
|
|
60
|
+
4. Any risks or concerns
|
|
61
|
+
|
|
62
|
+
Keep the summary under 200 words and focus on actionable insights.
|
|
63
|
+
</promptContent>
|
|
64
|
+
|
|
65
|
+
<!-- Record Name Field -->
|
|
66
|
+
<promptTemplateVariables>
|
|
67
|
+
<developerName>recordName</developerName>
|
|
68
|
+
<promptTemplateVariableType>recordField</promptTemplateVariableType>
|
|
69
|
+
<objectType>{{ObjectApiName}}</objectType>
|
|
70
|
+
<fieldName>Name</fieldName>
|
|
71
|
+
<isRequired>true</isRequired>
|
|
72
|
+
</promptTemplateVariables>
|
|
73
|
+
|
|
74
|
+
<!-- Status Field -->
|
|
75
|
+
<promptTemplateVariables>
|
|
76
|
+
<developerName>recordStatus</developerName>
|
|
77
|
+
<promptTemplateVariableType>recordField</promptTemplateVariableType>
|
|
78
|
+
<objectType>{{ObjectApiName}}</objectType>
|
|
79
|
+
<fieldName>{{StatusFieldApiName}}</fieldName>
|
|
80
|
+
<isRequired>false</isRequired>
|
|
81
|
+
</promptTemplateVariables>
|
|
82
|
+
|
|
83
|
+
<!-- Owner Name -->
|
|
84
|
+
<promptTemplateVariables>
|
|
85
|
+
<developerName>ownerName</developerName>
|
|
86
|
+
<promptTemplateVariableType>recordField</promptTemplateVariableType>
|
|
87
|
+
<objectType>{{ObjectApiName}}</objectType>
|
|
88
|
+
<fieldName>Owner.Name</fieldName>
|
|
89
|
+
<isRequired>false</isRequired>
|
|
90
|
+
</promptTemplateVariables>
|
|
91
|
+
|
|
92
|
+
<!-- Created Date -->
|
|
93
|
+
<promptTemplateVariables>
|
|
94
|
+
<developerName>createdDate</developerName>
|
|
95
|
+
<promptTemplateVariableType>recordField</promptTemplateVariableType>
|
|
96
|
+
<objectType>{{ObjectApiName}}</objectType>
|
|
97
|
+
<fieldName>CreatedDate</fieldName>
|
|
98
|
+
<isRequired>false</isRequired>
|
|
99
|
+
</promptTemplateVariables>
|
|
100
|
+
|
|
101
|
+
<!-- Last Activity Date -->
|
|
102
|
+
<promptTemplateVariables>
|
|
103
|
+
<developerName>lastActivityDate</developerName>
|
|
104
|
+
<promptTemplateVariableType>recordField</promptTemplateVariableType>
|
|
105
|
+
<objectType>{{ObjectApiName}}</objectType>
|
|
106
|
+
<fieldName>LastActivityDate</fieldName>
|
|
107
|
+
<isRequired>false</isRequired>
|
|
108
|
+
</promptTemplateVariables>
|
|
109
|
+
|
|
110
|
+
<!-- Free text for additional context -->
|
|
111
|
+
<promptTemplateVariables>
|
|
112
|
+
<developerName>additionalNotes</developerName>
|
|
113
|
+
<promptTemplateVariableType>freeText</promptTemplateVariableType>
|
|
114
|
+
<isRequired>false</isRequired>
|
|
115
|
+
</promptTemplateVariables>
|
|
116
|
+
|
|
117
|
+
<!-- Related records (could be from related list) -->
|
|
118
|
+
<promptTemplateVariables>
|
|
119
|
+
<developerName>relatedRecords</developerName>
|
|
120
|
+
<promptTemplateVariableType>freeText</promptTemplateVariableType>
|
|
121
|
+
<isRequired>false</isRequired>
|
|
122
|
+
</promptTemplateVariables>
|
|
123
|
+
|
|
124
|
+
<!--
|
|
125
|
+
DATA CLOUD GROUNDING (Optional):
|
|
126
|
+
|
|
127
|
+
For Data Cloud integration, add:
|
|
128
|
+
<dataCloudConfig>
|
|
129
|
+
<dataCloudObjectName>{{DataCloudObjectName}}</dataCloudObjectName>
|
|
130
|
+
<retrievalStrategy>semantic</retrievalStrategy>
|
|
131
|
+
</dataCloudConfig>
|
|
132
|
+
|
|
133
|
+
This enables RAG (Retrieval Augmented Generation) with
|
|
134
|
+
Data Cloud data for more contextual responses.
|
|
135
|
+
-->
|
|
136
|
+
</PromptTemplate>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Minimal Agent Script Starter Template
|
|
2
|
+
# =====================================
|
|
3
|
+
#
|
|
4
|
+
# This template provides the minimum required structure for an Agent Script.
|
|
5
|
+
# Use this as a starting point for simple, single-purpose agents.
|
|
6
|
+
#
|
|
7
|
+
# Required blocks: system, config, topic, start_agent
|
|
8
|
+
# File extension: .agent
|
|
9
|
+
|
|
10
|
+
system:
|
|
11
|
+
messages:
|
|
12
|
+
welcome: "Hello! How can I help you today?"
|
|
13
|
+
error: "I apologize, but something went wrong. Let me try again."
|
|
14
|
+
instructions: "You are a helpful assistant."
|
|
15
|
+
|
|
16
|
+
config:
|
|
17
|
+
agent_name: "MinimalAgent"
|
|
18
|
+
agent_label: "Minimal Agent"
|
|
19
|
+
description: "A minimal agent template to get started"
|
|
20
|
+
default_agent_user: "agent@yourorg.com" # REQUIRED: Change to valid Einstein Agent User
|
|
21
|
+
|
|
22
|
+
# Optional: Add variables for state tracking
|
|
23
|
+
# variables:
|
|
24
|
+
# counter: mutable number = 0
|
|
25
|
+
# session_id: linked string
|
|
26
|
+
# source: @session.sessionID
|
|
27
|
+
|
|
28
|
+
topic main:
|
|
29
|
+
description: "Main conversation handler"
|
|
30
|
+
reasoning:
|
|
31
|
+
instructions: |
|
|
32
|
+
Help the user with their request.
|
|
33
|
+
Be friendly and helpful.
|
|
34
|
+
|
|
35
|
+
start_agent entry:
|
|
36
|
+
description: "Entry point for all conversations"
|
|
37
|
+
reasoning:
|
|
38
|
+
instructions: |
|
|
39
|
+
Greet the user and route to the main topic.
|
|
40
|
+
actions:
|
|
41
|
+
begin: @utils.transition to @topic.main
|
|
42
|
+
description: "Start the main conversation"
|