analyzing-omnistudio-dependencies
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseanalyzing-omnistudio-dependencies: OmniStudio Cross-Component Analysis
analyzing-omnistudio-dependencies:OmniStudio跨组件分析
Expert OmniStudio analyst specializing in namespace detection, dependency mapping, and impact analysis across the full OmniStudio component suite. Performs org-wide inventory of OmniScripts, FlexCards, Integration Procedures, and Data Mappers with automated dependency graph construction and Mermaid visualization.
专业的OmniStudio分析师,擅长针对全系列OmniStudio组件进行命名空间检测、依赖关系映射和影响分析。可自动构建依赖图并生成Mermaid可视化,完成组织内OmniScript、FlexCard、Integration Procedure和Data Mapper的全局清单统计。
Scope
适用范围
- In scope: Namespace detection (Core / vlocity_cmt / vlocity_ins), org-wide component inventory, dependency graph construction, impact analysis, Mermaid diagram generation
- Out of scope: Authoring or modifying OmniScripts (use ), building FlexCards (use
building-omnistudio-omniscript), creating Integration Procedures (usebuilding-omnistudio-flexcard), configuring Data Mappers (usebuilding-omnistudio-integration-procedure)building-omnistudio-datamapper
- 适用场景:命名空间检测(Core / vlocity_cmt / vlocity_ins)、组织级组件清单、依赖图构建、影响分析、Mermaid图表生成
- 不适用场景:编写或修改OmniScript(使用)、构建FlexCard(使用
building-omnistudio-omniscript)、创建Integration Procedure(使用building-omnistudio-flexcard)、配置Data Mapper(使用building-omnistudio-integration-procedure)building-omnistudio-datamapper
Required Inputs
必要输入项
Ask for or infer before starting:
| Input | Default if not provided |
|---|---|
| Target org alias | Ask the user |
| Analysis scope | Full org (all OmniStudio component types) |
| Specific component to impact-analyze | None (produce full inventory first) |
| Output format preference | All three: Mermaid diagram + JSON summary + human-readable report |
开始前需询问或推断以下内容:
| 输入项 | 未提供时的默认值 |
|---|---|
| 目标组织别名 | 询问用户 |
| 分析范围 | 全组织(所有OmniStudio组件类型) |
| 要进行影响分析的特定组件 | 无(先生成完整组件清单) |
| 输出格式偏好 | 三种格式均生成:Mermaid图表 + JSON摘要 + 易读性报告 |
Output Expectations
输出预期
Each analysis run produces one or more of:
- Namespace detection result — which namespace is active (Core / vlocity_cmt / vlocity_ins / not installed)
- Component inventory — counts of OmniScripts, Integration Procedures, FlexCards, Data Mappers (active vs draft)
- Dependency graph — directed edges between all OmniStudio components with edge type labels
- Mermaid diagram — copy-pasteable Mermaid block for documentation
graph LR - JSON summary — machine-readable namespace + components + dependencies + impact analysis
- Human-readable report — plain-text summary with component counts, edge count, circular references, and most-depended components
- Circular reference warnings — cycle path and risk statement for each detected cycle
每次分析运行将生成以下一项或多项内容:
- 命名空间检测结果 — 当前激活的命名空间(Core / vlocity_cmt / vlocity_ins / 未安装)
- 组件清单 — OmniScript、Integration Procedure、FlexCard、Data Mapper的数量统计(激活状态 vs 草稿状态)
- 依赖图 — 所有OmniStudio组件间的有向关联边,并标注关联类型
- Mermaid图表 — 可直接复制粘贴的Mermaid 代码块,用于文档编制
graph LR - JSON摘要 — 机器可读的命名空间、组件、依赖关系及影响分析数据
- 易读性报告 — 纯文本摘要,包含组件数量、关联边数量、循环引用及被依赖最多的组件信息
- 循环引用警告 — 每个检测到的循环路径及风险说明
Core Responsibilities
核心职责
- Namespace Detection: Identify whether an org uses Core (Industries), vlocity_cmt (Communications, Media & Energy), or vlocity_ins (Insurance & Health) namespace
- Dependency Analysis: Build directed graphs of cross-component dependencies using BFS traversal with circular reference detection
- Impact Analysis: Determine which components are affected when a given OmniScript, IP, FlexCard, or Data Mapper changes
- Mermaid Visualization: Generate dependency diagrams in Mermaid syntax for documentation and review
- Org-Wide Inventory: Catalog all OmniStudio components by type, status, language, and version
CRITICAL: Orchestration OrderWhen multiple OmniStudio skills are involved, follow this dependency chain:→analyzing-omnistudio-dependencies→building-omnistudio-datamapper→building-omnistudio-integration-procedure→building-omnistudio-omniscriptbuilding-omnistudio-flexcardThis skill runs first to establish namespace context and dependency maps that downstream skills consume.
- 命名空间检测:识别组织使用的是Core(Industries)、vlocity_cmt(通信、媒体与能源)还是vlocity_ins(保险与医疗)命名空间
- 依赖分析:使用带循环引用检测的BFS遍历构建跨组件依赖的有向图
- 影响分析:确定当指定OmniScript、IP、FlexCard或Data Mapper发生变更时,哪些组件会受到影响
- Mermaid可视化:生成Mermaid语法的依赖关系图,用于文档编制和评审
- 全局组件清单:按类型、状态、语言和版本分类记录所有OmniStudio组件
关键:编排顺序当涉及多个OmniStudio技能时,请遵循以下依赖链:→analyzing-omnistudio-dependencies→building-omnistudio-datamapper→building-omnistudio-integration-procedure→building-omnistudio-omniscriptbuilding-omnistudio-flexcard本技能需优先运行,以建立命名空间上下文和依赖关系图,供下游技能使用。
Key Insights
关键洞察
| Insight | Detail |
|---|---|
| Three namespaces coexist | Core (OmniProcess), vlocity_cmt (vlocity_cmt__OmniScript__c), vlocity_ins (vlocity_ins__OmniScript__c) |
| Dependencies are stored in JSON | PropertySetConfig (elements), Definition (FlexCards), InputObjectName/OutputObjectName (Data Mappers) |
| Circular references are possible | OmniScript A → IP B → OmniScript A via embedded call |
| FlexCard data sources are typed | |
| Active vs Draft matters | Only active components participate in runtime dependency chains |
| 洞察内容 | 详细说明 |
|---|---|
| 三种命名空间共存 | Core(OmniProcess)、vlocity_cmt(vlocity_cmt__OmniScript__c)、vlocity_ins(vlocity_ins__OmniScript__c) |
| 依赖关系存储于JSON中 | PropertySetConfig(元素)、Definition(FlexCard)、InputObjectName/OutputObjectName(Data Mapper) |
| 可能存在循环引用 | OmniScript A → IP B → OmniScript A(通过嵌入式调用) |
| FlexCard数据源有类型区分 | DataSourceConfig JSON中 |
| 激活状态 vs 草稿状态至关重要 | 仅激活状态的组件会参与运行时依赖链 |
Workflow (4-Phase Pattern)
工作流程(四阶段模式)
Phase 1: Namespace Detection
阶段1:命名空间检测
Purpose: Determine which OmniStudio namespace the org uses before querying any component metadata.
Detection Algorithm — Probe objects in order until a successful COUNT() returns:
-
Core (Industries namespace):soql
SELECT COUNT() FROM OmniProcessIf this succeeds, the org uses the Core namespace (API 234.0+ / Spring '22+). -
vlocity_cmt (Communications, Media & Energy):soql
SELECT COUNT() FROM vlocity_cmt__OmniScript__c -
vlocity_ins (Insurance & Health):soql
SELECT COUNT() FROM vlocity_ins__OmniScript__c
If none succeed, OmniStudio is not installed in the org.
CLI Commands for namespace detection:
bash
undefined目标:在查询任何组件元数据前,确定组织使用的OmniStudio命名空间。
检测算法 — 按顺序探测对象,直到COUNT()查询成功返回:
-
Core(Industries命名空间):soql
SELECT COUNT() FROM OmniProcess如果查询成功,说明组织使用Core命名空间(API 234.0+ / Spring '22+)。 -
vlocity_cmt(通信、媒体与能源):soql
SELECT COUNT() FROM vlocity_cmt__OmniScript__c -
vlocity_ins(保险与医疗):soql
SELECT COUNT() FROM vlocity_ins__OmniScript__c
如果所有查询均失败,说明组织未安装OmniStudio。
用于命名空间检测的CLI命令:
bash
undefinedCore namespace probe
Core命名空间探测
sf data query --query "SELECT COUNT() FROM OmniProcess" --target-org myorg --json 2>/dev/null
sf data query --query "SELECT COUNT() FROM OmniProcess" --target-org myorg --json 2>/dev/null
vlocity_cmt namespace probe
vlocity_cmt命名空间探测
sf data query --query "SELECT COUNT() FROM vlocity_cmt__OmniScript__c" --target-org myorg --json 2>/dev/null
sf data query --query "SELECT COUNT() FROM vlocity_cmt__OmniScript__c" --target-org myorg --json 2>/dev/null
vlocity_ins namespace probe
vlocity_ins命名空间探测
sf data query --query "SELECT COUNT() FROM vlocity_ins__OmniScript__c" --target-org myorg --json 2>/dev/null
**Evaluate results**: A successful query (exit code 0 with `totalSize` in JSON) confirms the namespace. A query failure (`INVALID_TYPE` or `sObject type not found`) means that namespace is not present.
**See**: [references/namespace-guide.md](references/namespace-guide.md) for complete object/field mapping across all three namespaces.
---sf data query --query "SELECT COUNT() FROM vlocity_ins__OmniScript__c" --target-org myorg --json 2>/dev/null
**结果评估**:查询成功(退出码0且JSON中包含`totalSize`)则确认该命名空间存在。查询失败(`INVALID_TYPE`或`sObject type not found`)则说明该命名空间不存在。
**参考**:[references/namespace-guide.md](references/namespace-guide.md) 获取所有三个命名空间的完整对象/字段映射。
---Phase 2: Component Discovery
阶段2:组件发现
Purpose: Build an inventory of all OmniStudio components in the org.
Using the detected namespace, query each component type:
OmniScripts (Core example — paginate with LIMIT/OFFSET for large orgs):
soql
SELECT Id, Type, SubType, Language, IsActive, VersionNumber,
PropertySetConfig, LastModifiedDate
FROM OmniProcess
WHERE IsIntegrationProcedure = false
ORDER BY Type, SubType, Language, VersionNumber DESC
LIMIT 200Integration Procedures (Core example):
soql
SELECT Id, Type, SubType, Language, IsActive, VersionNumber,
PropertySetConfig, LastModifiedDate
FROM OmniProcess
WHERE IsIntegrationProcedure = true
ORDER BY Type, SubType, Language, VersionNumber DESC
LIMIT 200FlexCards (Core example):
soql
SELECT Id, Name, IsActive, DataSourceConfig, PropertySetConfig,
AuthorName, LastModifiedDate
FROM OmniUiCard
ORDER BY Name
LIMIT 200IMPORTANT: Theobject does NOT have aOmniUiCardfield. UseDefinitionfor data source bindings andDataSourceConfigfor card layout/states configuration.PropertySetConfig
Data Mappers (Core example):
soql
SELECT Id, Name, IsActive, Type, LastModifiedDate
FROM OmniDataTransform
ORDER BY Name
LIMIT 200Data Mapper Items (for object dependency extraction):
soql
SELECT Id, OmniDataTransformationId, InputObjectName, OutputObjectName,
InputObjectQuerySequence
FROM OmniDataTransformItem
WHERE OmniDataTransformationId IN ({datamapper_ids})IMPORTANT: The foreign key field is(full word "Transformation"), NOTOmniDataTransformationId.OmniDataTransformId
CLI Command pattern:
bash
sf data query --query "SELECT Id, Type, SubType, Language, IsActive FROM OmniProcess WHERE IsIntegrationProcedure = false" \
--target-org myorg --json目标:构建组织内所有OmniStudio组件的清单。
使用检测到的命名空间,查询各组件类型:
OmniScript(Core示例 — 大型组织需使用LIMIT/OFFSET分页):
soql
SELECT Id, Type, SubType, Language, IsActive, VersionNumber,
PropertySetConfig, LastModifiedDate
FROM OmniProcess
WHERE IsIntegrationProcedure = false
ORDER BY Type, SubType, Language, VersionNumber DESC
LIMIT 200Integration Procedure(Core示例):
soql
SELECT Id, Type, SubType, Language, IsActive, VersionNumber,
PropertySetConfig, LastModifiedDate
FROM OmniProcess
WHERE IsIntegrationProcedure = true
ORDER BY Type, SubType, Language, VersionNumber DESC
LIMIT 200FlexCard(Core示例):
soql
SELECT Id, Name, IsActive, DataSourceConfig, PropertySetConfig,
AuthorName, LastModifiedDate
FROM OmniUiCard
ORDER BY Name
LIMIT 200重要提示:对象没有OmniUiCard字段。请使用Definition获取数据源绑定信息,使用DataSourceConfig获取卡片布局/状态配置。PropertySetConfig
Data Mapper(Core示例):
soql
SELECT Id, Name, IsActive, Type, LastModifiedDate
FROM OmniDataTransform
ORDER BY Name
LIMIT 200Data Mapper项(用于提取对象依赖关系):
soql
SELECT Id, OmniDataTransformationId, InputObjectName, OutputObjectName,
InputObjectQuerySequence
FROM OmniDataTransformItem
WHERE OmniDataTransformationId IN ({datamapper_ids})重要提示:外键字段为(完整单词"Transformation"),而非OmniDataTransformationId。OmniDataTransformId
CLI命令模板:
bash
sf data query --query "SELECT Id, Type, SubType, Language, IsActive FROM OmniProcess WHERE IsIntegrationProcedure = false" \
--target-org myorg --jsonPhase 3: Dependency Analysis
阶段3:依赖分析
Purpose: Parse component metadata to build a directed dependency graph.
目标:解析组件元数据,构建有向依赖图。
Algorithm: BFS with Circular Detection
算法:带循环检测的BFS
1. Initialize empty graph G and visited set V
2. For each root component C:
a. Enqueue C into work queue Q
b. While Q is not empty:
i. Dequeue component X from Q
ii. If X is in V, record circular reference and skip
iii. Add X to V
iv. Parse X's metadata for dependency references
v. For each dependency D found:
- Add edge X → D to graph G
- If D is not in V, enqueue D into Q
3. Return graph G and any circular references detected1. 初始化空图G和已访问集合V
2. 遍历每个根组件C:
a. 将C加入工作队列Q
b. 当Q不为空时:
i. 从Q中取出组件X
ii. 如果X已在V中,记录循环引用并跳过
iii. 将X加入V
iv. 解析X的元数据以提取依赖引用
v. 针对每个找到的依赖D:
- 向图G中添加边X → D
- 如果D不在V中,将D加入Q
3. 返回图G及所有检测到的循环引用Element Type → Dependency Extraction
元素类型 → 依赖提取规则
OmniScript and IP elements store references in the JSON field. Parse each element to extract dependencies:
PropertySetConfig| Element Type | JSON Path in PropertySetConfig | Dependency Target |
|---|---|---|
| DataRaptor Transform Action | | Data Mapper (by name) |
| DataRaptor Turbo Action | | Data Mapper (by name) |
| Remote Action | | Apex Class.Method |
| Integration Procedure Action | | IP (Type_SubType) |
| OmniScript Action | | OmniScript (Type_SubType) |
| HTTP Action | | External endpoint (URL) |
| DocuSign Envelope Action | | DocuSign template |
| Apex Remote Action | | Apex Class |
Parsing PropertySetConfig:
For each OmniProcessElement:
1. Read PropertySetConfig (JSON string)
2. Parse JSON
3. Check element.Type against extraction table
4. Extract referenced component name/key
5. Resolve reference to an OmniProcess/OmniDataTransform record
6. Add edge: parent component → referenced componentOmniScript和IP元素的引用存储在 JSON字段中。解析每个元素以提取依赖关系:
PropertySetConfig| 元素类型 | PropertySetConfig中的JSON路径 | 依赖目标 |
|---|---|---|
| DataRaptor Transform Action | | Data Mapper(按名称) |
| DataRaptor Turbo Action | | Data Mapper(按名称) |
| Remote Action | | Apex Class.Method |
| Integration Procedure Action | | IP(Type_SubType) |
| OmniScript Action | | OmniScript(Type_SubType) |
| HTTP Action | | 外部端点(URL) |
| DocuSign Envelope Action | | DocuSign模板 |
| Apex Remote Action | | Apex Class |
解析PropertySetConfig:
遍历每个OmniProcessElement:
1. 读取PropertySetConfig(JSON字符串)
2. 解析JSON
3. 对照提取表检查element.Type
4. 提取引用组件的名称/键
5. 将引用解析为OmniProcess/OmniDataTransform记录
6. 添加边:父组件 → 引用组件FlexCard Data Source Parsing
FlexCard数据源解析
FlexCards store their data source configuration in the JSON field (NOT — that field does not exist on ):
DataSourceConfigDefinitionOmniUiCardParse DataSourceConfig JSON:
1. Access dataSource object (singular, not array)
2. For each dataSource where type === 'IntegrationProcedures' (note: PLURAL):
- Extract dataSource.value.ipMethod (IP Type_SubType)
- Add edge: FlexCard → Integration Procedure
3. For each dataSource where type === 'ApexRemote':
- Extract dataSource.value.className
- Add edge: FlexCard → Apex Class
4. For childCard references, parse PropertySetConfig:
- Add edge: FlexCard → child FlexCardIMPORTANT: The data source type for IPs is(plural with capital P), notIntegrationProcedures.IntegrationProcedure
FlexCard的数据源配置存储在 JSON字段中(而非 — 对象不存在该字段):
DataSourceConfigDefinitionOmniUiCard解析DataSourceConfig JSON:
1. 访问dataSource对象(单数,非数组)
2. 针对每个type === 'IntegrationProcedures'(注意:复数形式)的dataSource:
- 提取dataSource.value.ipMethod(IP Type_SubType)
- 添加边:FlexCard → Integration Procedure
3. 针对每个type === 'ApexRemote'的dataSource:
- 提取dataSource.value.className
- 添加边:FlexCard → Apex Class
4. 针对childCard引用,解析PropertySetConfig:
- 添加边:FlexCard → 子FlexCard重要提示:IP的数据源类型为(首字母大写的复数形式),而非IntegrationProcedures。IntegrationProcedure
Data Mapper Object Dependencies
Data Mapper对象依赖关系
Data Mappers reference Salesforce objects via their items:
For each OmniDataTransformItem:
1. Read InputObjectName → source sObject
2. Read OutputObjectName → target sObject
3. Add edge: Data Mapper → sObject (read from InputObjectName)
4. Add edge: Data Mapper → sObject (write to OutputObjectName)See: references/dependency-patterns.md for complete dependency extraction rules and examples.
Data Mapper通过其项引用Salesforce对象:
遍历每个OmniDataTransformItem:
1. 读取InputObjectName → 源sObject
2. 读取OutputObjectName → 目标sObject
3. 添加边:Data Mapper → sObject(从InputObjectName读取)
4. 添加边:Data Mapper → sObject(写入OutputObjectName)参考:references/dependency-patterns.md 获取完整的依赖提取规则及示例。
Phase 4: Visualization & Reporting
阶段4:可视化与报告
Purpose: Generate human-readable output from the dependency graph.
目标:从依赖图生成易读的输出内容。
Output Format 1: Mermaid Dependency Diagram
输出格式1:Mermaid依赖关系图
mermaid
graph LR
subgraph OmniScripts
OS1["createOrder<br/>English v3"]
OS2["updateAccount<br/>English v1"]
end
subgraph Integration Procedures
IP1["fetchAccountData<br/>English v2"]
IP2["submitOrder<br/>English v1"]
end
subgraph Data Mappers
DM1["AccountExtract"]
DM2["OrderTransform"]
end
subgraph FlexCards
FC1["AccountSummaryCard"]
end
OS1 -->|IP Action| IP2
OS1 -->|DR Action| DM2
OS2 -->|IP Action| IP1
IP1 -->|DR Action| DM1
FC1 -->|Data Source| IP1
style OS1 fill:#dbeafe,stroke:#1d4ed8,color:#1f2937
style OS2 fill:#dbeafe,stroke:#1d4ed8,color:#1f2937
style IP1 fill:#fef3c7,stroke:#b45309,color:#1f2937
style IP2 fill:#fef3c7,stroke:#b45309,color:#1f2937
style DM1 fill:#d1fae5,stroke:#047857,color:#1f2937
style DM2 fill:#d1fae5,stroke:#047857,color:#1f2937
style FC1 fill:#fce7f3,stroke:#be185d,color:#1f2937Color scheme:
| Component Type | Fill | Stroke |
|---|---|---|
| OmniScript | | |
| Integration Procedure | | |
| Data Mapper | | |
| FlexCard | | |
| Apex Class | | |
| External (HTTP) | | |
mermaid
graph LR
subgraph OmniScripts
OS1["createOrder<br/>English v3"]
OS2["updateAccount<br/>English v1"]
end
subgraph Integration Procedures
IP1["fetchAccountData<br/>English v2"]
IP2["submitOrder<br/>English v1"]
end
subgraph Data Mappers
DM1["AccountExtract"]
DM2["OrderTransform"]
end
subgraph FlexCards
FC1["AccountSummaryCard"]
end
OS1 -->|IP Action| IP2
OS1 -->|DR Action| DM2
OS2 -->|IP Action| IP1
IP1 -->|DR Action| DM1
FC1 -->|Data Source| IP1
style OS1 fill:#dbeafe,stroke:#1d4ed8,color:#1f2937
style OS2 fill:#dbeafe,stroke:#1d4ed8,color:#1f2937
style IP1 fill:#fef3c7,stroke:#b45309,color:#1f2937
style IP2 fill:#fef3c7,stroke:#b45309,color:#1f2937
style DM1 fill:#d1fae5,stroke:#047857,color:#1f2937
style DM2 fill:#d1fae5,stroke:#047857,color:#1f2937
style FC1 fill:#fce7f3,stroke:#be185d,color:#1f2937配色方案:
| 组件类型 | 填充色 | 边框色 |
|---|---|---|
| OmniScript | | |
| Integration Procedure | | |
| Data Mapper | | |
| FlexCard | | |
| Apex Class | | |
| 外部(HTTP) | | |
Output Format 2: JSON Summary
输出格式2:JSON摘要
json
{
"namespace": "Core",
"components": {
"omniScripts": 12,
"integrationProcedures": 8,
"flexCards": 5,
"dataMappers": 15
},
"dependencies": [
{ "from": "OS:createOrder", "to": "IP:submitOrder", "type": "IPAction" },
{ "from": "IP:fetchAccountData", "to": "DM:AccountExtract", "type": "DataRaptorAction" }
],
"circularReferences": [],
"impactAnalysis": {
"DM:AccountExtract": {
"directDependents": ["IP:fetchAccountData"],
"transitiveDependents": ["OS:updateAccount", "FC:AccountSummaryCard"]
}
}
}json
{
"namespace": "Core",
"components": {
"omniScripts": 12,
"integrationProcedures": 8,
"flexCards": 5,
"dataMappers": 15
},
"dependencies": [
{ "from": "OS:createOrder", "to": "IP:submitOrder", "type": "IPAction" },
{ "from": "IP:fetchAccountData", "to": "DM:AccountExtract", "type": "DataRaptorAction" }
],
"circularReferences": [],
"impactAnalysis": {
"DM:AccountExtract": {
"directDependents": ["IP:fetchAccountData"],
"transitiveDependents": ["OS:updateAccount", "FC:AccountSummaryCard"]
}
}
}Output Format 3: Human-Readable Report
输出格式3:易读性报告
OmniStudio Dependency Report
=============================
Org Namespace: Core (Industries)
Scan Date: 2026-03-06
Component Inventory:
OmniScripts: 12 (8 active, 4 draft)
Integration Procedures: 8 (6 active, 2 draft)
FlexCards: 5 (5 active)
Data Mappers: 15 (12 active, 3 draft)
Dependency Summary:
Total edges: 23
Circular references: 0
Orphaned components: 2 (no inbound/outbound deps)
Impact Analysis (most-depended components):
1. DM:AccountExtract → 5 dependents
2. IP:fetchAccountData → 3 dependents
3. DM:OrderTransform → 2 dependentsOmniStudio依赖关系报告
=============================
组织命名空间:Core(Industries)
扫描日期:2026-03-06
组件清单:
OmniScript: 12个(8个激活,4个草稿)
Integration Procedure: 8个(6个激活,2个草稿)
FlexCard: 5个(全部激活)
Data Mapper: 15个(12个激活,3个草稿)
依赖关系摘要:
总关联边数: 23条
循环引用数: 0
孤立组件数: 2个(无入站/出站依赖)
影响分析(被依赖最多的组件):
1. DM:AccountExtract → 5个依赖组件
2. IP:fetchAccountData → 3个依赖组件
3. DM:OrderTransform → 2个依赖组件Namespace Object/Field Mapping
命名空间对象/字段映射
For the complete object name, field name, and metadata type mapping across all three namespaces (Core, vlocity_cmt, vlocity_ins), read:
references/namespace-guide.md
Key discriminators to keep in mind:
- Core uses /
OmniProcess/OmniUiCardOmniDataTransform - vlocity_cmt uses /
vlocity_cmt__OmniScript__c/vlocity_cmt__VlocityUITemplate__cvlocity_cmt__DRBundle__c - vlocity_ins uses /
vlocity_ins__OmniScript__c/vlocity_ins__VlocityUITemplate__cvlocity_ins__DRBundle__c - The boolean and
IsIntegrationProcedure(notDataSourceConfig) field names are Core-onlyDefinition
如需获取所有三个命名空间(Core、vlocity_cmt、vlocity_ins)的完整对象名称、字段名称及元数据类型映射,请查阅:
references/namespace-guide.md
需注意的关键区分点:
- Core使用/
OmniProcess/OmniUiCardOmniDataTransform - vlocity_cmt使用/
vlocity_cmt__OmniScript__c/vlocity_cmt__VlocityUITemplate__cvlocity_cmt__DRBundle__c - vlocity_ins使用/
vlocity_ins__OmniScript__c/vlocity_ins__VlocityUITemplate__cvlocity_ins__DRBundle__c - 布尔字段和
IsIntegrationProcedure(而非DataSourceConfig)字段仅Core命名空间支持Definition
CLI Commands Reference
CLI命令参考
Namespace Detection
命名空间检测
bash
undefinedbash
undefinedProbe all three namespaces (run sequentially, first success wins)
探测所有三个命名空间(按顺序运行,第一个成功的即为当前命名空间)
sf data query --query "SELECT COUNT() FROM OmniProcess" --target-org myorg --json 2>/dev/null && echo "CORE" ||
sf data query --query "SELECT COUNT() FROM vlocity_cmt__OmniScript__c" --target-org myorg --json 2>/dev/null && echo "VLOCITY_CMT" ||
sf data query --query "SELECT COUNT() FROM vlocity_ins__OmniScript__c" --target-org myorg --json 2>/dev/null && echo "VLOCITY_INS" ||
echo "NOT_INSTALLED"
sf data query --query "SELECT COUNT() FROM vlocity_cmt__OmniScript__c" --target-org myorg --json 2>/dev/null && echo "VLOCITY_CMT" ||
sf data query --query "SELECT COUNT() FROM vlocity_ins__OmniScript__c" --target-org myorg --json 2>/dev/null && echo "VLOCITY_INS" ||
echo "NOT_INSTALLED"
undefinedsf data query --query "SELECT COUNT() FROM OmniProcess" --target-org myorg --json 2>/dev/null && echo "CORE" ||
sf data query --query "SELECT COUNT() FROM vlocity_cmt__OmniScript__c" --target-org myorg --json 2>/dev/null && echo "VLOCITY_CMT" ||
sf data query --query "SELECT COUNT() FROM vlocity_ins__OmniScript__c" --target-org myorg --json 2>/dev/null && echo "VLOCITY_INS" ||
echo "NOT_INSTALLED"
sf data query --query "SELECT COUNT() FROM vlocity_cmt__OmniScript__c" --target-org myorg --json 2>/dev/null && echo "VLOCITY_CMT" ||
sf data query --query "SELECT COUNT() FROM vlocity_ins__OmniScript__c" --target-org myorg --json 2>/dev/null && echo "VLOCITY_INS" ||
echo "NOT_INSTALLED"
undefinedComponent Inventory (Core Namespace)
组件清单(Core命名空间)
bash
undefinedbash
undefinedCount OmniScripts
统计OmniScript数量
sf data query --query "SELECT COUNT() FROM OmniProcess WHERE IsIntegrationProcedure = false"
--target-org myorg --json
--target-org myorg --json
sf data query --query "SELECT COUNT() FROM OmniProcess WHERE IsIntegrationProcedure = false"
--target-org myorg --json
--target-org myorg --json
Count Integration Procedures
统计Integration Procedure数量
sf data query --query "SELECT COUNT() FROM OmniProcess WHERE IsIntegrationProcedure = true"
--target-org myorg --json
--target-org myorg --json
sf data query --query "SELECT COUNT() FROM OmniProcess WHERE IsIntegrationProcedure = true"
--target-org myorg --json
--target-org myorg --json
Count FlexCards
统计FlexCard数量
sf data query --query "SELECT COUNT() FROM OmniUiCard" --target-org myorg --json
sf data query --query "SELECT COUNT() FROM OmniUiCard" --target-org myorg --json
Count Data Mappers
统计Data Mapper数量
sf data query --query "SELECT COUNT() FROM OmniDataTransform" --target-org myorg --json
undefinedsf data query --query "SELECT COUNT() FROM OmniDataTransform" --target-org myorg --json
undefinedDependency Data Extraction (Core Namespace)
依赖数据提取(Core命名空间)
bash
undefinedbash
undefinedGet OmniScript elements with their config
获取OmniScript元素及其配置
sf data query --query "SELECT Id, OmniProcessId, Name, Type, PropertySetConfig FROM OmniProcessElement WHERE OmniProcessId = '{process_id}'"
--target-org myorg --json
--target-org myorg --json
sf data query --query "SELECT Id, OmniProcessId, Name, Type, PropertySetConfig FROM OmniProcessElement WHERE OmniProcessId = '{process_id}'"
--target-org myorg --json
--target-org myorg --json
Get FlexCard data sources (for dependency parsing)
获取FlexCard数据源(用于依赖解析)
sf data query --query "SELECT Id, Name, DataSourceConfig FROM OmniUiCard WHERE IsActive = true"
--target-org myorg --json
--target-org myorg --json
sf data query --query "SELECT Id, Name, DataSourceConfig FROM OmniUiCard WHERE IsActive = true"
--target-org myorg --json
--target-org myorg --json
Get Data Mapper items (for object dependencies)
获取Data Mapper项(用于对象依赖关系)
sf data query --query "SELECT Id, OmniDataTransformationId, InputObjectName, OutputObjectName FROM OmniDataTransformItem"
--target-org myorg --json
--target-org myorg --json
---sf data query --query "SELECT Id, OmniDataTransformationId, InputObjectName, OutputObjectName FROM OmniDataTransformItem"
--target-org myorg --json
--target-org myorg --json
---Cross-Skill Integration
跨技能集成
| Skill | Relationship | How This Skill Helps |
|---|---|---|
| building-omnistudio-datamapper | Provides namespace and object dependency data | Data Mapper authoring uses detected namespace for correct API names |
| building-omnistudio-integration-procedure | Provides namespace and IP dependency map | IP authoring uses dependency graph to avoid circular references |
| building-omnistudio-omniscript | Provides namespace and element dependency data | OmniScript authoring uses namespace-correct field names |
| building-omnistudio-flexcard | Provides namespace and data source dependency map | FlexCard authoring uses detected IP references for validation |
| generating-mermaid-diagrams | Consumes dependency graph for visualization | This skill generates Mermaid output compatible with generating-mermaid-diagrams styling |
| generating-custom-object / generating-custom-field | Provides sObject metadata for Data Mapper analysis | Object field validation during dependency extraction |
| deploying-metadata | Deployment uses namespace-correct metadata types | This skill provides the correct metadata type names per namespace |
| 技能 | 关系 | 本技能的作用 |
|---|---|---|
| building-omnistudio-datamapper | 提供命名空间和对象依赖数据 | Data Mapper编写时使用检测到的命名空间获取正确的API名称 |
| building-omnistudio-integration-procedure | 提供命名空间和IP依赖图 | IP编写时使用依赖图避免循环引用 |
| building-omnistudio-omniscript | 提供命名空间和元素依赖数据 | OmniScript编写时使用命名空间对应的正确字段名称 |
| building-omnistudio-flexcard | 提供命名空间和数据源依赖图 | FlexCard编写时使用检测到的IP引用进行验证 |
| generating-mermaid-diagrams | 依赖图用于可视化 | 本技能生成的Mermaid输出与generating-mermaid-diagrams的样式兼容 |
| generating-custom-object / generating-custom-field | 提供sObject元数据用于Data Mapper分析 | 依赖提取过程中验证对象字段 |
| deploying-metadata | 部署使用命名空间对应的元数据类型 | 本技能提供各命名空间对应的正确元数据类型名称 |
Gotchas
注意事项
| Scenario | Handling |
|---|---|
| Mixed namespace org (migration in progress) | Probe all three namespaces; report if multiple return results. Components may exist under both old and migrated namespaces. |
| Inactive components with dependencies | Include in dependency graph but mark as inactive. Warn if active component depends on inactive one. |
| Large orgs (1000+ components) | Use SOQL pagination (LIMIT/OFFSET or queryMore). Process in batches of 200. |
| PropertySetConfig exceeds SOQL field length | Use Tooling API or REST API to fetch full JSON body for elements with truncated config. |
| Circular dependency detected | Log the cycle path (A → B → C → A), mark all participating edges, continue traversal for remaining branches. |
| Components referencing deleted items | Record as "broken reference" in output. Flag for cleanup. |
| Version conflicts (multiple active versions) | Only the highest active version number participates in runtime. Warn if lower versions have unique dependencies. |
| 场景 | 处理方式 |
|---|---|
| 混合命名空间组织(迁移进行中) | 探测所有三个命名空间;若多个命名空间返回结果则进行报告。组件可能同时存在于旧命名空间和已迁移命名空间中。 |
| 带有依赖关系的非激活组件 | 纳入依赖图但标记为非激活状态。若激活组件依赖非激活组件则发出警告。 |
| 大型组织(1000+组件) | 使用SOQL分页(LIMIT/OFFSET或queryMore)。按200个组件为一批进行处理。 |
| PropertySetConfig超出SOQL字段长度 | 使用Tooling API或REST API获取元素的完整JSON内容(针对被截断的配置)。 |
| 检测到循环依赖 | 记录循环路径(A → B → C → A),标记所有参与的关联边,继续遍历剩余分支。 |
| 组件引用已删除的项 | 在输出中记录为"无效引用",标记为需要清理。 |
| 版本冲突(多个激活版本) | 仅最高版本号的激活组件参与运行时。若低版本存在唯一依赖关系则发出警告。 |
Notes
备注
- Dependencies: Requires CLI with org authentication. Optional: generating-mermaid-diagrams for styled visualization.
sf - Namespace must be detected first: All downstream queries depend on knowing the correct object and field API names.
- PropertySetConfig is the key: Nearly all dependency information lives in this JSON field on OmniProcessElement records.
- DataSourceConfig for FlexCards: Data sources are in , NOT a
DataSourceConfigfield (which does not exist onDefinition). Card layout/states are inOmniUiCard.PropertySetConfig - Data Mapper items contain object references: InputObjectName and OutputObjectName on OmniDataTransformItem records reveal which sObjects a Data Mapper reads from and writes to. The foreign key to the parent is (full "Transformation").
OmniDataTransformationId - IsIntegrationProcedure is the discriminator: uses a boolean
OmniProcessfield, not aIsIntegrationProcedurefield (which does not exist). TheTypeCategorypicklist is computed from this boolean and is useful for filtering reads but cannot be set directly on create.OmniProcessType - sf data create record limitations: The flag cannot handle JSON strings in textarea fields (e.g., PropertySetConfig). Use
--valuesinstead for records with JSON configuration.sf api request rest --method POST --body @file.json - Related skills: ,
building-omnistudio-datamapper,building-omnistudio-integration-procedure,building-omnistudio-omniscript— install these to enable the full OmniStudio authoring suitebuilding-omnistudio-flexcard
- 依赖条件:需要已完成组织认证的CLI。可选:generating-mermaid-diagrams用于样式化可视化。
sf - 必须先检测命名空间:所有下游查询都依赖于正确的对象和字段API名称。
- PropertySetConfig是核心:几乎所有依赖信息都存储在OmniProcessElement记录的该JSON字段中。
- FlexCard使用DataSourceConfig:数据源信息位于,而非
DataSourceConfig字段(Definition对象不存在该字段)。卡片布局/状态信息位于OmniUiCard。PropertySetConfig - Data Mapper项包含对象引用:OmniDataTransformItem记录的InputObjectName和OutputObjectName字段揭示了Data Mapper读取和写入的sObject。父对象的外键为(完整单词"Transformation")。
OmniDataTransformationId - IsIntegrationProcedure是区分标识:使用布尔字段
OmniProcess,而非IsIntegrationProcedure字段(该字段不存在)。TypeCategory选择列表由该布尔值计算得出,可用于过滤读取操作,但创建时无法直接设置。OmniProcessType - sf data create record限制:标志无法处理文本区域字段中的JSON字符串(如PropertySetConfig)。对于包含JSON配置的记录,请改用
--values。sf api request rest --method POST --body @file.json - 相关技能:、
building-omnistudio-datamapper、building-omnistudio-integration-procedure、building-omnistudio-omniscript— 安装这些技能以启用完整的OmniStudio编写套件building-omnistudio-flexcard
Reference File Index
参考文件索引
| File | When to read |
|---|---|
| Phase 1 — complete object/field mapping across all three namespaces (Core, vlocity_cmt, vlocity_ins), metadata type names for deployment, mixed-namespace migration scenarios |
| Phase 3 — complete dependency extraction rules per element type, FlexCard data source parsing, Data Mapper item parsing, circular reference detection algorithm, impact analysis patterns |
| 文件 | 阅读时机 |
|---|---|
| 阶段1 — 获取所有三个命名空间(Core、vlocity_cmt、vlocity_ins)的完整对象/字段映射、部署用元数据类型名称、混合命名空间迁移场景 |
| 阶段3 — 获取各元素类型的完整依赖提取规则、FlexCard数据源解析、Data Mapper项解析、循环引用检测算法、影响分析模式 |