sf-omnistudio-analyze
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesesf-omnistudio-analyze: OmniStudio Cross-Component Analysis
sf-omnistudio-analyze:OmniStudio跨组件分析
Expert OmniStudio analyst specializing in namespace detection, dependency mapping, and impact analysis across the full OmniStudio component suite. Perform org-wide inventory of OmniScripts, FlexCards, Integration Procedures, and Data Mappers with automated dependency graph construction and Mermaid visualization.
专注于OmniStudio全组件套件的命名空间检测、依赖关系映射与影响分析的专家级技能。可自动构建OmniScript、FlexCard、Integration Procedure和Data Mapper的组织级清单,并生成依赖关系图与Mermaid可视化内容。
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:→sf-omnistudio-analyze→sf-datamapper→sf-integration-procedure→sf-omniscriptsf-flexcardThis skill runs first to establish namespace context and dependency maps that downstream skills consume.
- 命名空间检测:识别组织所使用的OmniStudio命名空间,包括Core(Industries)、vlocity_cmt(通信、媒体与能源行业)或vlocity_ins(保险与医疗行业)
- 依赖关系分析:通过带循环引用检测的BFS遍历构建跨组件的有向依赖关系图
- 影响分析:确定当指定OmniScript、IP、FlexCard或Data Mapper发生变更时,哪些组件会受到影响
- Mermaid可视化:生成Mermaid语法的依赖关系图,用于文档记录与评审
- 组织级清单:按类型、状态、语言和版本分类整理所有OmniStudio组件
关键提示:编排顺序当涉及多个OmniStudio技能时,请遵循以下依赖链:→sf-omnistudio-analyze→sf-datamapper→sf-integration-procedure→sf-omniscriptsf-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中 |
| 激活状态与草稿状态有区别 | 仅激活状态的组件会参与运行时依赖链 |
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):
soql
SELECT Id, Type, SubType, Language, IsActive, VersionNumber,
PropertySetConfig, LastModifiedDate
FROM OmniProcess
WHERE IsIntegrationProcedure = false
ORDER BY Type, SubType, Language, VersionNumber DESCIntegration Procedures (Core example):
soql
SELECT Id, Type, SubType, Language, IsActive, VersionNumber,
PropertySetConfig, LastModifiedDate
FROM OmniProcess
WHERE IsIntegrationProcedure = true
ORDER BY Type, SubType, Language, VersionNumber DESCFlexCards (Core example):
soql
SELECT Id, Name, IsActive, DataSourceConfig, PropertySetConfig,
AuthorName, LastModifiedDate
FROM OmniUiCard
ORDER BY NameIMPORTANT: 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 NameData 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命名空间示例):
soql
SELECT Id, Type, SubType, Language, IsActive, VersionNumber,
PropertySetConfig, LastModifiedDate
FROM OmniProcess
WHERE IsIntegrationProcedure = false
ORDER BY Type, SubType, Language, VersionNumber DESCIntegration Procedure(Core命名空间示例):
soql
SELECT Id, Type, SubType, Language, IsActive, VersionNumber,
PropertySetConfig, LastModifiedDate
FROM OmniProcess
WHERE IsIntegrationProcedure = true
ORDER BY Type, SubType, Language, VersionNumber DESCFlexCard(Core命名空间示例):
soql
SELECT Id, Name, IsActive, DataSourceConfig, PropertySetConfig,
AuthorName, LastModifiedDate
FROM OmniUiCard
ORDER BY Name重要提示:对象没有OmniUiCard字段。请使用Definition获取数据源绑定信息,使用DataSourceConfig获取卡片布局/状态配置。PropertySetConfig
Data Mapper(Core命名空间示例):
soql
SELECT Id, Name, IsActive, Type, LastModifiedDate
FROM OmniDataTransform
ORDER BY NameData Mapper Item(用于提取对象依赖关系):
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(注意:复数形式,首字母大写P):
- 提取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对应的数据源类型是(复数形式,首字母大写P),而非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通过其Item引用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
命名空间对象/字段映射
Complete mapping of OmniStudio objects and fields across all three namespaces:
三类命名空间下OmniStudio对象与字段的完整映射:
Primary Objects
主对象
| Concept | Core | vlocity_cmt | vlocity_ins |
|---|---|---|---|
| OmniScript / IP container | | | |
| OmniScript / IP elements | | | |
| FlexCard | | | |
| Data Mapper | | | |
| Data Mapper Item | | | |
| 概念 | Core | vlocity_cmt | vlocity_ins |
|---|---|---|---|
| OmniScript / IP容器 | | | |
| OmniScript / IP元素 | | | |
| FlexCard | | | |
| Data Mapper | | | |
| Data Mapper Item | | | |
Key Fields
关键字段
| Concept | Core Field | vlocity_cmt Field | vlocity_ins Field |
|---|---|---|---|
| Script type | | | |
| Script subtype | | | |
| Language | | | |
| Is active | | | |
| Version | | | |
| Element config | | | |
| Is Integration Procedure | | | |
| FlexCard data sources | | | |
| FlexCard layout/states | | (same field) | (same field) |
| DM input object | | | |
| DM output object | | | |
See: references/namespace-guide.md for the complete reference including metadata type names for deployment.
| 概念 | Core字段 | vlocity_cmt字段 | vlocity_ins字段 |
|---|---|---|---|
| 脚本类型 | | | |
| 脚本子类型 | | | |
| 语言 | | | |
| 是否激活 | | | |
| 版本 | | | |
| 元素配置 | | | |
| 是否为Integration Procedure | | | |
| FlexCard数据源 | | | |
| FlexCard布局/状态 | | (相同字段) | (相同字段) |
| DM输入对象 | | | |
| DM输出对象 | | | |
参考:references/namespace-guide.md 包含完整参考信息,包括用于部署的元数据类型名称。
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 Item(用于对象依赖关系)
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 |
|---|---|---|
| sf-datamapper | Provides namespace and object dependency data | Data Mapper authoring uses detected namespace for correct API names |
| sf-integration-procedure | Provides namespace and IP dependency map | IP authoring uses dependency graph to avoid circular references |
| sf-omniscript | Provides namespace and element dependency data | OmniScript authoring uses namespace-correct field names |
| sf-flexcard | Provides namespace and data source dependency map | FlexCard authoring uses detected IP references for validation |
| sf-diagram-mermaid | Consumes dependency graph for visualization | This skill generates Mermaid output compatible with sf-diagram-mermaid styling |
| sf-metadata | Provides sObject metadata for Data Mapper analysis | Object field validation during dependency extraction |
| sf-deploy | Deployment uses namespace-correct metadata types | This skill provides the correct metadata type names per namespace |
| 技能 | 关系 | 本技能提供的支持 |
|---|---|---|
| sf-datamapper | 提供命名空间与对象依赖关系数据 | Data Mapper编写时使用检测到的命名空间获取正确的API名称 |
| sf-integration-procedure | 提供命名空间与IP依赖关系映射 | IP编写时使用依赖关系图避免循环引用 |
| sf-omniscript | 提供命名空间与元素依赖关系数据 | OmniScript编写时使用符合命名空间要求的字段名称 |
| sf-flexcard | 提供命名空间与数据源依赖关系映射 | FlexCard编写时使用检测到的IP引用进行验证 |
| sf-diagram-mermaid | 消费依赖关系图以生成可视化内容 | 本技能生成的Mermaid输出与sf-diagram-mermaid的样式兼容 |
| sf-metadata | 提供sObject元数据用于Data Mapper分析 | 依赖关系提取过程中验证对象字段 |
| sf-deploy | 部署时使用符合命名空间要求的元数据类型 | 本技能提供各命名空间对应的正确元数据类型名称 |
Edge Cases
边缘场景
| 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: sf-diagram-mermaid 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 - Install related skills: ,
/plugin install github:Jaganpro/sf-skills/sf-datamapper,/plugin install github:Jaganpro/sf-skills/sf-integration-procedure,/plugin install github:Jaganpro/sf-skills/sf-omniscript/plugin install github:Jaganpro/sf-skills/sf-flexcard
- 依赖要求:需要已完成组织认证的CLI。可选依赖:sf-diagram-mermaid(用于样式化可视化)。
sf - 必须先检测命名空间:所有下游查询都依赖于正确的对象和字段API名称。
- PropertySetConfig是核心:几乎所有依赖关系信息都存储在OmniProcessElement记录的该JSON字段中。
- FlexCard使用DataSourceConfig:数据源信息存储在中,而非
DataSourceConfig字段(Definition对象不存在该字段)。卡片布局/状态信息存储在OmniUiCard中。PropertySetConfig - Data Mapper Item包含对象引用: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 - 安装相关技能:,
/plugin install github:Jaganpro/sf-skills/sf-datamapper,/plugin install github:Jaganpro/sf-skills/sf-integration-procedure,/plugin install github:Jaganpro/sf-skills/sf-omniscript/plugin install github:Jaganpro/sf-skills/sf-flexcard
License
许可证
MIT License.
Copyright (c) 2026 weytani
MIT许可证。
版权所有 (c) 2026 weytani