sf-vlocity-build-deploy
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesesf-vlocity-build-deploy: Vlocity Build DataPack Deployment
sf-vlocity-build-deploy:Vlocity Build DataPack部署
Use this skill when the user needs Vlocity DataPack deployment orchestration: export/deploy workflow, manifest-driven deploys, failure triage, and CI/CD sequencing for OmniStudio/Industries DataPacks.
当用户需要Vlocity DataPack部署编排时使用本技能:OmniStudio/Industries DataPacks的导出/部署工作流、清单驱动部署、故障排查,以及CI/CD流程编排。
When This Skill Owns the Task
本技能适用场景
Use when work involves:
sf-vlocity-build-deploy- ,
vlocity packDeploy,packRetry,packContinue,packExport,packGetDiffsvalidateLocalData - DataPack job-file design (,
projectPath,expansionPath,manifest)queries - org-to-org DataPack migration and retry loops
- troubleshooting DataPack dependency, matching-key, and GlobalKey issues
Delegate elsewhere when the user is:
- deploying standard metadata with -> sf-deploy
sf project deploy - building OmniScripts, FlexCards, IPs, or Data Mappers ->
sf-industry-commoncore-* - designing Product2 EPC bundles -> sf-industry-cme-epc-model
- writing Apex/LWC code -> sf-apex, sf-lwc
当工作涉及以下内容时使用:
sf-vlocity-build-deploy- 、
vlocity packDeploy、packRetry、packContinue、packExport、packGetDiffs命令validateLocalData - DataPack任务文件设计(、
projectPath、expansionPath、manifest配置)queries - 跨组织DataPack迁移与重试循环处理
- 排查DataPack依赖、匹配键、GlobalKey相关问题
以下场景请转至对应技能处理:
- 使用部署标准元数据 → sf-deploy
sf project deploy - 开发OmniScripts、FlexCards、IP、数据映射器 →
sf-industry-commoncore-* - 设计Product2 EPC套餐 → sf-industry-cme-epc-model
- 编写Apex/LWC代码 → sf-apex、sf-lwc
Critical Operating Rules
核心操作规则
- Use Vlocity Build () commands for DataPacks, not
vlocity.sf project deploy - Prefer Salesforce CLI auth integration () over username/password files when available.
-sfdx.username <alias> - Always run a pre-deploy quality gate before full deploy:
validateLocalData- optional
packGetDiffs - then
packDeploy
- Use repeatedly when error counts are dropping; stop when retries no longer improve results.
packRetry - Keep matching-key strategy and GlobalKey integrity consistent across source and target orgs.
- DataPack操作使用**Vlocity Build()**命令,不要使用
vlocity。sf project deploy - 可用时优先选择Salesforce CLI身份认证集成(),而非用户名/密码文件。
-sfdx.username <alias> - 全量部署前必须执行预部署质量门禁:
validateLocalData- 可选执行
packGetDiffs - 再执行
packDeploy
- 当错误数量持续下降时可重复执行;重试不再改善结果时停止操作。
packRetry - 源组织和目标组织之间需保持匹配键策略、GlobalKey完整性一致。
Required Context to Gather First
需要优先收集的上下文信息
Ask for or infer:
- source org and target org aliases
- job file path and DataPack project path
- deployment scope (full project, manifest subset, or specific )
-key - whether this is export, deploy, retry, continue, or diff-only
- namespace model (,
%vlocity_namespace%, or core)vlocity_cmt - known constraints (new sandbox bootstrap, trigger behavior, matching key customizations)
Preflight checks:
bash
vlocity help
sf org list
sf org display --target-org <alias> --json
test -f <job-file>.yaml主动询问或推断以下信息:
- 源组织和目标组织的别名
- 任务文件路径与DataPack项目路径
- 部署范围(全项目、清单子集、特定)
-key - 操作类型:导出、部署、重试、继续、仅比对差异
- 命名空间模式(、
%vlocity_namespace%或核心版)vlocity_cmt - 已知约束(新沙箱初始化、触发器行为、匹配键自定义)
预检检查项:
bash
vlocity help
sf org list
sf org display --target-org <alias> --json
test -f <job-file>.yamlRecommended Workflow
推荐工作流
1. Ensure tool readiness
1. 确认工具就绪
bash
npm install --global vlocity
vlocity helpbash
npm install --global vlocity
vlocity help2. Validate project data locally
2. 本地验证项目数据
bash
vlocity -sfdx.username <source-alias> -job <job-file>.yaml validateLocalDataUse only when explicitly requested and after explaining impact.
--fixLocalGlobalKeysbash
vlocity -sfdx.username <source-alias> -job <job-file>.yaml validateLocalData仅在用户明确要求且说明影响后,才可使用参数。
--fixLocalGlobalKeys3. Export from source (when needed)
3. 从源组织导出(按需执行)
bash
vlocity -sfdx.username <source-alias> -job <job-file>.yaml packExport
vlocity -sfdx.username <source-alias> -job <job-file>.yaml packRetrybash
vlocity -sfdx.username <source-alias> -job <job-file>.yaml packExport
vlocity -sfdx.username <source-alias> -job <job-file>.yaml packRetry4. Deploy to target
4. 部署到目标组织
bash
vlocity -sfdx.username <target-alias> -job <job-file>.yaml packDeploy
vlocity -sfdx.username <target-alias> -job <job-file>.yaml packRetrybash
vlocity -sfdx.username <target-alias> -job <job-file>.yaml packDeploy
vlocity -sfdx.username <target-alias> -job <job-file>.yaml packRetry5. Continue interrupted jobs
5. 继续中断的任务
bash
vlocity -sfdx.username <target-alias> -job <job-file>.yaml packContinuebash
vlocity -sfdx.username <target-alias> -job <job-file>.yaml packContinue6. Verify post-deploy parity
6. 部署后一致性验证
bash
vlocity -sfdx.username <target-alias> -job <job-file>.yaml packGetDiffsJob-file starter: references/job-file-template.md
bash
vlocity -sfdx.username <target-alias> -job <job-file>.yaml packGetDiffs任务文件模板:references/job-file-template.md
High-Signal Failure Patterns
常见故障模式
| Error / symptom | Likely cause | Default fix direction |
|---|---|---|
| missing dependency in target org | include missing DataPack key and redeploy |
| duplicate records in target | clean duplicates and re-run deploy |
| source duplicate matching-key records | remove duplicates in source and re-export |
| outdated DataPack settings | run |
| settings mismatch / partial dependency state | refresh settings both orgs, then retry |
| SASS / template compile failures | missing referenced UI template assets | export/deploy referenced template dependencies first |
Detailed matrix: references/troubleshooting-matrix.md
| 错误/症状 | 可能原因 | 默认修复方向 |
|---|---|---|
| 目标组织缺少依赖 | 加入缺失的DataPack键后重新部署 |
| 目标组织存在重复记录 | 清理重复项后重新执行部署 |
| 源组织存在重复匹配键记录 | 移除源组织重复项后重新导出 |
| DataPack设置过时 | 执行 |
| 设置不匹配/部分依赖状态异常 | 刷新两个组织的设置后重试 |
| SASS/模板编译失败 | 缺少引用的UI模板资产 | 先导出/部署引用的模板依赖 |
详细排查矩阵:references/troubleshooting-matrix.md
CI/CD Guidance
CI/CD指导
Default pipeline shape:
- authenticate orgs ()
sf org login ... - validate local DataPack integrity ()
validateLocalData - export changed scope (or manifest-driven export)
packExport - deploy ()
packDeploy - retry loop () until stable
packRetry - compare () and publish deployment report
packGetDiffs
For incremental deploy optimization, use job-file options such as:
gitCheck: truegitCheckKey: <folder>- for deterministic scope control
manifest
默认流水线结构:
- 组织身份认证()
sf org login ... - 验证本地DataPack完整性()
validateLocalData - 导出变更范围(或清单驱动导出)
packExport - 部署()
packDeploy - 重试循环()直到结果稳定
packRetry - 差异比对()并发布部署报告
packGetDiffs
增量部署优化可使用以下任务文件配置项:
gitCheck: truegitCheckKey: <folder>- 实现确定性范围控制
manifest
Cross-Skill Integration
跨技能集成
| Need | Delegate to | Reason |
|---|---|---|
| metadata deploy outside DataPacks | sf-deploy | Metadata API workflows |
| OmniStudio component authoring | | build artifacts before deploy |
| EPC product and offer payload authoring | sf-industry-cme-epc-model | Product2/DataPack model quality |
| Apex trigger/log error diagnosis | sf-debug, sf-apex | automation-side root-cause fixes |
| 需求 | 转交技能 | 原因 |
|---|---|---|
| DataPacks之外的元数据部署 | sf-deploy | 元数据API工作流 |
| OmniStudio组件开发 | | 部署前的制品构建 |
| EPC产品与Offer载荷开发 | sf-industry-cme-epc-model | Product2/DataPack模型质量 |
| Apex触发器/日志错误诊断 | sf-debug、sf-apex | 自动化侧根因修复 |
Reference Map
参考索引
Start here
入门参考
- references/job-file-template.md
- references/troubleshooting-matrix.md
- examples/business-internet-plus-bundle/TRANSCRIPT.md
- examples/business-internet-plus-bundle-deploy/TRANSCRIPT.md
- references/job-file-template.md
- references/troubleshooting-matrix.md
- examples/business-internet-plus-bundle/TRANSCRIPT.md
- examples/business-internet-plus-bundle-deploy/TRANSCRIPT.md
External reference
外部参考
Completion Format
完成输出格式
text
DataPack goal: <export / deploy / retry / diff / ci-cd>
Source org: <alias or N/A>
Target org: <alias or N/A>
Scope: <job file + manifest/key/full>
Result: <passed / failed / partial>
Key findings: <errors, dependencies, retries, diffs>
Next step: <safe follow-up action>text
DataPack目标:<export / deploy / retry / diff / ci-cd>
源组织:<alias or N/A>
目标组织:<alias or N/A>
范围:<job file + manifest/key/full>
结果:<passed / failed / partial>
关键发现:<errors, dependencies, retries, diffs>
下一步:<safe follow-up action>