@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
|
@@ -1,286 +0,0 @@
|
|
|
1
|
-
# Salesforce Deployment Checklist
|
|
2
|
-
|
|
3
|
-
**Deployment Date**: _________________
|
|
4
|
-
**Deployment Time Window**: _________ to _________
|
|
5
|
-
**Environment**: ☐ Production ☐ Sandbox ☐ UAT
|
|
6
|
-
**Deployment Lead**: _________________
|
|
7
|
-
**Release Version**: _________________
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Pre-Deployment
|
|
12
|
-
|
|
13
|
-
### 1. Code & Configuration Review
|
|
14
|
-
|
|
15
|
-
- [ ] All code reviewed and approved via pull request
|
|
16
|
-
- [ ] Code follows organizational coding standards
|
|
17
|
-
- [ ] No debugging statements or console.logs in production code
|
|
18
|
-
- [ ] API versions are current (API 56.0+)
|
|
19
|
-
- [ ] Hard-coded IDs/URLs removed (use Custom Settings or Custom Metadata)
|
|
20
|
-
- [ ] Comments and documentation are up-to-date
|
|
21
|
-
|
|
22
|
-
### 2. Testing
|
|
23
|
-
|
|
24
|
-
- [ ] All unit tests pass locally
|
|
25
|
-
- [ ] Test coverage meets minimum requirements (≥75% org-wide)
|
|
26
|
-
- [ ] Integration tests executed successfully
|
|
27
|
-
- [ ] User acceptance testing (UAT) completed
|
|
28
|
-
- [ ] Regression testing performed for existing features
|
|
29
|
-
- [ ] Performance testing validates no degradation
|
|
30
|
-
|
|
31
|
-
**Test Results**:
|
|
32
|
-
- Total classes: _____
|
|
33
|
-
- Test coverage: _____%
|
|
34
|
-
- Failed tests: _____
|
|
35
|
-
- Test run ID: _________________
|
|
36
|
-
|
|
37
|
-
### 3. Security Review
|
|
38
|
-
|
|
39
|
-
- [ ] Profile/permission set changes reviewed
|
|
40
|
-
- [ ] Field-level security validated
|
|
41
|
-
- [ ] Sharing rules appropriate for data sensitivity
|
|
42
|
-
- [ ] No admin permissions granted to standard users
|
|
43
|
-
- [ ] Connected Apps use appropriate OAuth scopes
|
|
44
|
-
- [ ] Named Credentials use secure authentication
|
|
45
|
-
- [ ] Sensitive data is encrypted or masked
|
|
46
|
-
|
|
47
|
-
### 4. Dependencies
|
|
48
|
-
|
|
49
|
-
- [ ] All metadata dependencies identified
|
|
50
|
-
- [ ] Missing components added to package.xml
|
|
51
|
-
- [ ] External system dependencies documented
|
|
52
|
-
- [ ] API integrations tested in target environment
|
|
53
|
-
- [ ] Third-party packages compatible with deployment
|
|
54
|
-
|
|
55
|
-
### 5. Backup & Rollback
|
|
56
|
-
|
|
57
|
-
- [ ] Pre-deployment backup completed
|
|
58
|
-
- Metadata backup: ☐ Yes ☐ N/A
|
|
59
|
-
- Data backup: ☐ Yes ☐ N/A
|
|
60
|
-
- Backup location: _________________
|
|
61
|
-
- [ ] Rollback procedure documented and tested
|
|
62
|
-
- [ ] Rollback criteria defined
|
|
63
|
-
- [ ] Emergency contacts list current
|
|
64
|
-
|
|
65
|
-
### 6. Documentation
|
|
66
|
-
|
|
67
|
-
- [ ] Release notes prepared
|
|
68
|
-
- [ ] Deployment guide created
|
|
69
|
-
- [ ] User training materials ready (if applicable)
|
|
70
|
-
- [ ] Help documentation updated
|
|
71
|
-
- [ ] Known issues documented
|
|
72
|
-
- [ ] FAQ prepared for support team
|
|
73
|
-
|
|
74
|
-
### 7. Communication
|
|
75
|
-
|
|
76
|
-
- [ ] Stakeholders notified of deployment schedule
|
|
77
|
-
- [ ] Users notified of system downtime (if applicable)
|
|
78
|
-
- [ ] Support team briefed on changes
|
|
79
|
-
- [ ] Change advisory board approval obtained
|
|
80
|
-
- [ ] Post-deployment communication template ready
|
|
81
|
-
|
|
82
|
-
### 8. Validation
|
|
83
|
-
|
|
84
|
-
- [ ] Validation deployment successful in production
|
|
85
|
-
- [ ] Quick Deploy ID obtained: _________________
|
|
86
|
-
- [ ] Validation results reviewed and approved
|
|
87
|
-
- [ ] All deployment warnings addressed
|
|
88
|
-
|
|
89
|
-
**Validation Command**:
|
|
90
|
-
```bash
|
|
91
|
-
sf project deploy validate --manifest package.xml --test-level RunLocalTests --verbose
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
---
|
|
95
|
-
|
|
96
|
-
## Deployment Execution
|
|
97
|
-
|
|
98
|
-
### 9. Pre-Deployment Actions
|
|
99
|
-
|
|
100
|
-
- [ ] Announced maintenance window to users
|
|
101
|
-
- [ ] Disabled scheduled jobs/batch processes (if required)
|
|
102
|
-
- Jobs disabled: _________________
|
|
103
|
-
- [ ] Created deployment tag in git: _________________
|
|
104
|
-
- [ ] Verified target org connectivity
|
|
105
|
-
- [ ] Team on standby for deployment
|
|
106
|
-
|
|
107
|
-
### 10. Deployment
|
|
108
|
-
|
|
109
|
-
**Deployment Start Time**: _________
|
|
110
|
-
|
|
111
|
-
- [ ] Deployment initiated via validated package or change set
|
|
112
|
-
- [ ] Deployment progress monitored
|
|
113
|
-
- [ ] Test execution in progress
|
|
114
|
-
- [ ] Any deployment errors addressed immediately
|
|
115
|
-
|
|
116
|
-
**Deployment Command**:
|
|
117
|
-
```bash
|
|
118
|
-
sf project deploy start --use-most-recent-validation
|
|
119
|
-
# OR
|
|
120
|
-
sf project deploy start --manifest package.xml --test-level RunLocalTests
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
**Deployment ID**: _________________
|
|
124
|
-
|
|
125
|
-
**Deployment End Time**: _________
|
|
126
|
-
|
|
127
|
-
**Duration**: _________ minutes
|
|
128
|
-
|
|
129
|
-
### 11. Post-Deployment Verification
|
|
130
|
-
|
|
131
|
-
- [ ] Deployment completed successfully
|
|
132
|
-
- [ ] All tests passed in production
|
|
133
|
-
- [ ] Deployment results reviewed (no warnings/errors)
|
|
134
|
-
- [ ] Smoke tests executed successfully
|
|
135
|
-
- [ ] Critical user workflows verified:
|
|
136
|
-
- [ ] Workflow 1: _________________
|
|
137
|
-
- [ ] Workflow 2: _________________
|
|
138
|
-
- [ ] Workflow 3: _________________
|
|
139
|
-
- [ ] Re-enabled scheduled jobs/batch processes
|
|
140
|
-
- [ ] Debug logs show no new errors
|
|
141
|
-
|
|
142
|
-
### 12. Post-Deployment Actions
|
|
143
|
-
|
|
144
|
-
- [ ] Stakeholders notified of successful deployment
|
|
145
|
-
- [ ] Users notified system is available
|
|
146
|
-
- [ ] Release notes published
|
|
147
|
-
- [ ] Support team provided with deployment summary
|
|
148
|
-
- [ ] Monitoring dashboard reviewed
|
|
149
|
-
|
|
150
|
-
---
|
|
151
|
-
|
|
152
|
-
## Post-Deployment Monitoring (24-48 Hours)
|
|
153
|
-
|
|
154
|
-
### 13. System Monitoring
|
|
155
|
-
|
|
156
|
-
- [ ] **Day 1** - Monitor debug logs for errors
|
|
157
|
-
- Errors found: ☐ Yes ☐ No
|
|
158
|
-
- If yes, describe: _________________
|
|
159
|
-
- [ ] **Day 1** - Review governor limit usage
|
|
160
|
-
- Limits exceeded: ☐ Yes ☐ No
|
|
161
|
-
- [ ] **Day 1** - Check user-reported issues
|
|
162
|
-
- Issues reported: ☐ Yes ☐ No
|
|
163
|
-
- [ ] **Day 2** - Confirm automation working correctly
|
|
164
|
-
- [ ] **Day 2** - Validate data integrity
|
|
165
|
-
- [ ] **Day 2** - Review performance metrics
|
|
166
|
-
|
|
167
|
-
### 14. User Acceptance
|
|
168
|
-
|
|
169
|
-
- [ ] Key users confirmed functionality works
|
|
170
|
-
- [ ] No critical bugs reported
|
|
171
|
-
- [ ] User feedback collected
|
|
172
|
-
- [ ] Support tickets categorized by severity
|
|
173
|
-
|
|
174
|
-
**Feedback Summary**:
|
|
175
|
-
_________________
|
|
176
|
-
|
|
177
|
-
---
|
|
178
|
-
|
|
179
|
-
## Rollback (If Required)
|
|
180
|
-
|
|
181
|
-
**Rollback Decision**: ☐ Yes ☐ No
|
|
182
|
-
|
|
183
|
-
**Reason**: _________________
|
|
184
|
-
|
|
185
|
-
- [ ] Stakeholder approval for rollback obtained
|
|
186
|
-
- [ ] Users notified of rollback
|
|
187
|
-
- [ ] Rollback procedure executed
|
|
188
|
-
- [ ] Rollback verified successful
|
|
189
|
-
- [ ] Post-rollback communication sent
|
|
190
|
-
|
|
191
|
-
**Rollback Time**: _________
|
|
192
|
-
|
|
193
|
-
---
|
|
194
|
-
|
|
195
|
-
## Deployment Summary
|
|
196
|
-
|
|
197
|
-
### Components Deployed
|
|
198
|
-
|
|
199
|
-
| Component Type | Count | Examples |
|
|
200
|
-
|----------------|-------|----------|
|
|
201
|
-
| Apex Classes | | |
|
|
202
|
-
| Apex Triggers | | |
|
|
203
|
-
| LWC | | |
|
|
204
|
-
| Flows | | |
|
|
205
|
-
| Custom Objects | | |
|
|
206
|
-
| Custom Fields | | |
|
|
207
|
-
| Profiles | | |
|
|
208
|
-
| Perm Sets | | |
|
|
209
|
-
| Other | | |
|
|
210
|
-
|
|
211
|
-
**Total Components**: _____
|
|
212
|
-
|
|
213
|
-
### Deployment Metrics
|
|
214
|
-
|
|
215
|
-
- Validation time: _________ minutes
|
|
216
|
-
- Deployment time: _________ minutes
|
|
217
|
-
- Test execution time: _________ minutes
|
|
218
|
-
- Total elapsed time: _________ minutes
|
|
219
|
-
- Downtime (if any): _________ minutes
|
|
220
|
-
|
|
221
|
-
### Issues Encountered
|
|
222
|
-
|
|
223
|
-
| Issue | Severity | Resolution | Time to Resolve |
|
|
224
|
-
|-------|----------|------------|-----------------|
|
|
225
|
-
| | | | |
|
|
226
|
-
| | | | |
|
|
227
|
-
|
|
228
|
-
**Total Issues**: _____
|
|
229
|
-
|
|
230
|
-
---
|
|
231
|
-
|
|
232
|
-
## Sign-Off
|
|
233
|
-
|
|
234
|
-
### Deployment Team
|
|
235
|
-
|
|
236
|
-
**Deployment Lead**: _________________ Date: _________
|
|
237
|
-
**Developer(s)**: _________________ Date: _________
|
|
238
|
-
**QA Lead**: _________________ Date: _________
|
|
239
|
-
**DevOps Engineer**: _________________ Date: _________
|
|
240
|
-
|
|
241
|
-
### Stakeholders
|
|
242
|
-
|
|
243
|
-
**Product Owner**: _________________ Date: _________
|
|
244
|
-
**Business Analyst**: _________________ Date: _________
|
|
245
|
-
**Release Manager**: _________________ Date: _________
|
|
246
|
-
|
|
247
|
-
---
|
|
248
|
-
|
|
249
|
-
## Post-Deployment Review
|
|
250
|
-
|
|
251
|
-
**Review Date**: _________________
|
|
252
|
-
|
|
253
|
-
### What Went Well
|
|
254
|
-
1. _________________
|
|
255
|
-
2. _________________
|
|
256
|
-
3. _________________
|
|
257
|
-
|
|
258
|
-
### What Could Be Improved
|
|
259
|
-
1. _________________
|
|
260
|
-
2. _________________
|
|
261
|
-
3. _________________
|
|
262
|
-
|
|
263
|
-
### Action Items
|
|
264
|
-
- [ ] Action: _________________ Owner: _________ Due: _________
|
|
265
|
-
- [ ] Action: _________________ Owner: _________ Due: _________
|
|
266
|
-
- [ ] Action: _________________ Owner: _________ Due: _________
|
|
267
|
-
|
|
268
|
-
---
|
|
269
|
-
|
|
270
|
-
## Attachments
|
|
271
|
-
|
|
272
|
-
- [ ] package.xml
|
|
273
|
-
- [ ] Test results report
|
|
274
|
-
- [ ] Deployment log
|
|
275
|
-
- [ ] Release notes
|
|
276
|
-
- [ ] Rollback procedure (if executed)
|
|
277
|
-
- [ ] Post-deployment monitoring reports
|
|
278
|
-
|
|
279
|
-
**Storage Location**: _________________
|
|
280
|
-
|
|
281
|
-
---
|
|
282
|
-
|
|
283
|
-
**Notes**:
|
|
284
|
-
_________________
|
|
285
|
-
_________________
|
|
286
|
-
_________________
|
|
@@ -1,308 +0,0 @@
|
|
|
1
|
-
# Rollback Procedures
|
|
2
|
-
|
|
3
|
-
This guide provides step-by-step instructions for rolling back a Salesforce deployment if issues are discovered after release.
|
|
4
|
-
|
|
5
|
-
## When to Rollback
|
|
6
|
-
|
|
7
|
-
Execute a rollback when:
|
|
8
|
-
- **Critical functionality is broken** and cannot be hotfixed quickly
|
|
9
|
-
- **Data integrity issues** are discovered
|
|
10
|
-
- **Performance degradation** exceeds 50% of baseline
|
|
11
|
-
- **Security vulnerabilities** are introduced
|
|
12
|
-
- **Stakeholder approval** to rollback is obtained
|
|
13
|
-
|
|
14
|
-
Do NOT rollback for:
|
|
15
|
-
- Minor UI issues that don't impact functionality
|
|
16
|
-
- Issues that can be hotfixed in < 2 hours
|
|
17
|
-
- Edge cases affecting < 5% of users
|
|
18
|
-
- Cosmetic problems
|
|
19
|
-
|
|
20
|
-
## Pre-Rollback Checklist
|
|
21
|
-
|
|
22
|
-
Before initiating rollback:
|
|
23
|
-
|
|
24
|
-
- [ ] Confirm the issue severity justifies rollback
|
|
25
|
-
- [ ] Obtain stakeholder approval
|
|
26
|
-
- [ ] Notify all users of upcoming rollback
|
|
27
|
-
- [ ] Backup current production state (post-deployment)
|
|
28
|
-
- [ ] Verify pre-deployment backup is available
|
|
29
|
-
- [ ] Review rollback plan with team
|
|
30
|
-
- [ ] Prepare communication for completion
|
|
31
|
-
|
|
32
|
-
## Rollback Methods
|
|
33
|
-
|
|
34
|
-
### Method 1: Redeploy Previous Version (Recommended)
|
|
35
|
-
|
|
36
|
-
**Best for**: Metadata-only deployments with no data changes.
|
|
37
|
-
|
|
38
|
-
**Steps**:
|
|
39
|
-
|
|
40
|
-
1. **Retrieve pre-deployment state from version control**:
|
|
41
|
-
```bash
|
|
42
|
-
git checkout pre-deployment-YYYYMMDD
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
2. **Validate rollback deployment**:
|
|
46
|
-
```bash
|
|
47
|
-
sf project deploy validate \
|
|
48
|
-
--manifest manifest/package.xml \
|
|
49
|
-
--test-level RunLocalTests \
|
|
50
|
-
--target-org production
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
3. **Deploy previous version**:
|
|
54
|
-
```bash
|
|
55
|
-
sf project deploy start \
|
|
56
|
-
--manifest manifest/package.xml \
|
|
57
|
-
--test-level RunLocalTests \
|
|
58
|
-
--target-org production
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
4. **Verify rollback**:
|
|
62
|
-
- Test critical user flows
|
|
63
|
-
- Check for errors in debug logs
|
|
64
|
-
- Confirm with stakeholders
|
|
65
|
-
|
|
66
|
-
**Timeline**: 30-60 minutes
|
|
67
|
-
|
|
68
|
-
### Method 2: Selective Component Rollback
|
|
69
|
-
|
|
70
|
-
**Best for**: When only specific components are problematic.
|
|
71
|
-
|
|
72
|
-
**Steps**:
|
|
73
|
-
|
|
74
|
-
1. **Identify problematic components**:
|
|
75
|
-
- Review error logs
|
|
76
|
-
- Isolate failing functionality
|
|
77
|
-
- List components to rollback
|
|
78
|
-
|
|
79
|
-
2. **Create targeted package.xml**:
|
|
80
|
-
```xml
|
|
81
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
82
|
-
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
83
|
-
<types>
|
|
84
|
-
<members>ProblematicClass</members>
|
|
85
|
-
<name>ApexClass</name>
|
|
86
|
-
</types>
|
|
87
|
-
<version>59.0</version>
|
|
88
|
-
</Package>
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
3. **Retrieve previous version of components**:
|
|
92
|
-
```bash
|
|
93
|
-
git show pre-deployment-YYYYMMDD:force-app/main/default/classes/ProblematicClass.cls > temp/ProblematicClass.cls
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
4. **Deploy only those components**:
|
|
97
|
-
```bash
|
|
98
|
-
sf project deploy start \
|
|
99
|
-
--manifest rollback-package.xml \
|
|
100
|
-
--target-org production
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
**Timeline**: 15-30 minutes
|
|
104
|
-
|
|
105
|
-
### Method 3: Destructive Changes
|
|
106
|
-
|
|
107
|
-
**Best for**: When new components must be removed entirely.
|
|
108
|
-
|
|
109
|
-
**Steps**:
|
|
110
|
-
|
|
111
|
-
1. **Create destructiveChanges.xml**:
|
|
112
|
-
```xml
|
|
113
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
114
|
-
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
115
|
-
<types>
|
|
116
|
-
<members>NewComponentToDelete</members>
|
|
117
|
-
<name>ApexClass</name>
|
|
118
|
-
</types>
|
|
119
|
-
<version>59.0</version>
|
|
120
|
-
</Package>
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
2. **Create empty package.xml**:
|
|
124
|
-
```xml
|
|
125
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
126
|
-
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
127
|
-
<version>59.0</version>
|
|
128
|
-
</Package>
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
3. **Deploy destructive changes**:
|
|
132
|
-
```bash
|
|
133
|
-
sf project deploy start \
|
|
134
|
-
--manifest package.xml \
|
|
135
|
-
--pre-destructive-changes destructiveChanges.xml \
|
|
136
|
-
--test-level RunLocalTests \
|
|
137
|
-
--target-org production
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
4. **Verify deletion**:
|
|
141
|
-
```bash
|
|
142
|
-
sf org list metadata --metadata-type ApexClass --target-org production
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
**Timeline**: 20-40 minutes
|
|
146
|
-
|
|
147
|
-
## Data Rollback Considerations
|
|
148
|
-
|
|
149
|
-
If the deployment included data changes:
|
|
150
|
-
|
|
151
|
-
### Option A: Restore from Backup
|
|
152
|
-
|
|
153
|
-
1. **Locate pre-deployment data backup**:
|
|
154
|
-
- Data Export Service snapshot
|
|
155
|
-
- Backup tool (OwnBackup, Spanning, etc.)
|
|
156
|
-
- Manual CSV exports
|
|
157
|
-
|
|
158
|
-
2. **Restore data**:
|
|
159
|
-
```bash
|
|
160
|
-
sf data import tree --plan data-backup/data-plan.json --target-org production
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
3. **Validate data integrity**:
|
|
164
|
-
- Run data quality checks
|
|
165
|
-
- Verify record counts
|
|
166
|
-
- Check relationships
|
|
167
|
-
|
|
168
|
-
**Timeline**: 1-4 hours (depending on data volume)
|
|
169
|
-
|
|
170
|
-
### Option B: Reverse Data Changes (Scripted)
|
|
171
|
-
|
|
172
|
-
1. **Identify affected records**:
|
|
173
|
-
```bash
|
|
174
|
-
sf data query --query "SELECT Id FROM Account WHERE LastModifiedDate >= YESTERDAY"
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
2. **Apply reverse operations**:
|
|
178
|
-
- Create Apex script to reverse changes
|
|
179
|
-
- Test in sandbox first
|
|
180
|
-
- Execute in production
|
|
181
|
-
|
|
182
|
-
**Timeline**: 2-6 hours
|
|
183
|
-
|
|
184
|
-
## Post-Rollback Steps
|
|
185
|
-
|
|
186
|
-
After rollback is complete:
|
|
187
|
-
|
|
188
|
-
1. **Verify Functionality**:
|
|
189
|
-
- [ ] Execute smoke tests
|
|
190
|
-
- [ ] Confirm critical workflows work
|
|
191
|
-
- [ ] Check automation (triggers, flows) operates correctly
|
|
192
|
-
- [ ] Review debug logs for errors
|
|
193
|
-
|
|
194
|
-
2. **Communication**:
|
|
195
|
-
- [ ] Notify users rollback is complete
|
|
196
|
-
- [ ] Send post-mortem summary to stakeholders
|
|
197
|
-
- [ ] Update status page / internal wiki
|
|
198
|
-
|
|
199
|
-
3. **Root Cause Analysis**:
|
|
200
|
-
- [ ] Document what went wrong
|
|
201
|
-
- [ ] Identify why issues weren't caught pre-deployment
|
|
202
|
-
- [ ] Update deployment checklist to prevent recurrence
|
|
203
|
-
- [ ] Schedule retrospective with team
|
|
204
|
-
|
|
205
|
-
4. **Next Steps**:
|
|
206
|
-
- [ ] Fix issues in development environment
|
|
207
|
-
- [ ] Add test cases to catch similar issues
|
|
208
|
-
- [ ] Re-validate deployment in sandbox
|
|
209
|
-
- [ ] Schedule new deployment with fixes
|
|
210
|
-
|
|
211
|
-
## Emergency Contacts
|
|
212
|
-
|
|
213
|
-
**Production Issues**:
|
|
214
|
-
- On-call DevOps: [contact info]
|
|
215
|
-
- Salesforce Support: [premier support phone]
|
|
216
|
-
- Release Manager: [contact info]
|
|
217
|
-
|
|
218
|
-
**Stakeholder Notifications**:
|
|
219
|
-
- Product Owner: [contact info]
|
|
220
|
-
- Business Analyst: [contact info]
|
|
221
|
-
- Executive Sponsor: [contact info]
|
|
222
|
-
|
|
223
|
-
## Rollback Decision Matrix
|
|
224
|
-
|
|
225
|
-
| Severity | Impact | Rollback? | Timeline |
|
|
226
|
-
|----------|--------|-----------|----------|
|
|
227
|
-
| **Critical** | >50% users affected, core functionality broken | Yes | Immediate (< 1 hour) |
|
|
228
|
-
| **High** | 10-50% users affected, workaround exists | Consider | Within 2-4 hours |
|
|
229
|
-
| **Medium** | <10% users affected, non-critical features | No, hotfix instead | Plan fix for next release |
|
|
230
|
-
| **Low** | Edge case, cosmetic issues | No | Address in backlog |
|
|
231
|
-
|
|
232
|
-
## Lessons Learned Template
|
|
233
|
-
|
|
234
|
-
After each rollback, document lessons learned:
|
|
235
|
-
|
|
236
|
-
```markdown
|
|
237
|
-
# Rollback Post-Mortem: [Date]
|
|
238
|
-
|
|
239
|
-
## Deployment Summary
|
|
240
|
-
- Deployment date/time: [timestamp]
|
|
241
|
-
- Components deployed: [list]
|
|
242
|
-
- Rollback date/time: [timestamp]
|
|
243
|
-
- Rollback method used: [method]
|
|
244
|
-
|
|
245
|
-
## Issue Description
|
|
246
|
-
[Describe what went wrong]
|
|
247
|
-
|
|
248
|
-
## Root Cause
|
|
249
|
-
[Why did the issue occur?]
|
|
250
|
-
|
|
251
|
-
## Detection
|
|
252
|
-
- How was the issue discovered?
|
|
253
|
-
- How long after deployment?
|
|
254
|
-
- Who reported it?
|
|
255
|
-
|
|
256
|
-
## Impact
|
|
257
|
-
- Number of users affected: [count]
|
|
258
|
-
- Business processes impacted: [list]
|
|
259
|
-
- Duration of impact: [timespan]
|
|
260
|
-
|
|
261
|
-
## Resolution
|
|
262
|
-
- Rollback timeline: [start - end]
|
|
263
|
-
- Additional fixes required: [list]
|
|
264
|
-
|
|
265
|
-
## Prevention
|
|
266
|
-
- What tests would have caught this?
|
|
267
|
-
- Process improvements needed:
|
|
268
|
-
- Deployment checklist updates:
|
|
269
|
-
|
|
270
|
-
## Action Items
|
|
271
|
-
- [ ] [Action item with owner]
|
|
272
|
-
- [ ] [Action item with owner]
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
## Best Practices
|
|
276
|
-
|
|
277
|
-
1. **Practice rollbacks in sandbox** - Don't wait for an emergency to learn the process
|
|
278
|
-
2. **Maintain detailed backups** - Automate metadata and data backups before every deployment
|
|
279
|
-
3. **Use version control tags** - Tag every production deployment for easy identification
|
|
280
|
-
4. **Document everything** - Keep a deployment log with timestamps and decisions
|
|
281
|
-
5. **Communicate proactively** - Keep stakeholders informed throughout the process
|
|
282
|
-
6. **Set time limits** - If rollback takes >2 hours, consider alternative approaches
|
|
283
|
-
7. **Test the rollback** - Validate in sandbox that the rollback process works
|
|
284
|
-
|
|
285
|
-
## Rollback Scripts Repository
|
|
286
|
-
|
|
287
|
-
Keep commonly-used rollback scripts in version control:
|
|
288
|
-
|
|
289
|
-
```
|
|
290
|
-
scripts/rollback/
|
|
291
|
-
├── rollback-apex.sh # Rollback Apex classes
|
|
292
|
-
├── rollback-lwc.sh # Rollback Lightning Web Components
|
|
293
|
-
├── rollback-flows.sh # Rollback flows and processes
|
|
294
|
-
├── rollback-data.sh # Restore data from backup
|
|
295
|
-
└── verify-rollback.sh # Post-rollback verification
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
## Testing Rollback Procedures
|
|
299
|
-
|
|
300
|
-
**Quarterly rollback drill**:
|
|
301
|
-
1. Deploy a test change to sandbox
|
|
302
|
-
2. Wait 1 hour
|
|
303
|
-
3. Execute full rollback procedure
|
|
304
|
-
4. Time the process
|
|
305
|
-
5. Document any issues
|
|
306
|
-
6. Update procedures as needed
|
|
307
|
-
|
|
308
|
-
This ensures the team is prepared when a real rollback is needed.
|