omnistudio-dependencies-analyze

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

omnistudio-dependencies-analyze: OmniStudio Cross-Component Analysis

omnistudio-dependencies-analyze: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可视化内容,同时完成整个组织内OmniScripts、FlexCards、Integration Procedures和Data Mappers的清单统计。

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
    omnistudio-omniscript-generate
    ), building FlexCards (use
    omnistudio-flexcard-generate
    ), creating Integration Procedures (use
    omnistudio-integration-procedure-generate
    ), configuring Data Mappers (use
    omnistudio-datamapper-generate
    )

  • 适用范围:命名空间检测(Core / vlocity_cmt / vlocity_ins)、全组织组件清单统计、依赖关系图构建、影响分析、Mermaid图表生成
  • 不适用范围:编写或修改OmniScripts(请使用
    omnistudio-omniscript-generate
    )、构建FlexCards(请使用
    omnistudio-flexcard-generate
    )、创建Integration Procedures(请使用
    omnistudio-integration-procedure-generate
    )、配置Data Mappers(请使用
    omnistudio-datamapper-generate

Required Inputs

必填输入项

Ask for or infer before starting:
InputDefault if not provided
Target org aliasAsk the user
Analysis scopeFull org (all OmniStudio component types)
Specific component to impact-analyzeNone (produce full inventory first)
Output format preferenceAll three: Mermaid diagram + JSON summary + human-readable report

开始前需询问用户或自行推断:
输入项未提供时的默认值
目标组织别名询问用户
分析范围全组织(所有OmniStudio组件类型)
需进行影响分析的特定组件无(先生成完整清单)
输出格式偏好三种格式均生成:Mermaid图表 + JSON摘要 + 易读性报告

Output Expectations

输出预期

Each analysis run produces one or more of:
  1. Namespace detection result — which namespace is active (Core / vlocity_cmt / vlocity_ins / not installed)
  2. Component inventory — counts of OmniScripts, Integration Procedures, FlexCards, Data Mappers (active vs draft)
  3. Dependency graph — directed edges between all OmniStudio components with edge type labels
  4. Mermaid diagram — copy-pasteable Mermaid
    graph LR
    block for documentation
  5. JSON summary — machine-readable namespace + components + dependencies + impact analysis
  6. Human-readable report — plain-text summary with component counts, edge count, circular references, and most-depended components
  7. Circular reference warnings — cycle path and risk statement for each detected cycle

每次分析运行将生成以下一项或多项内容:
  1. 命名空间检测结果 — 显示当前激活的命名空间(Core / vlocity_cmt / vlocity_ins / 未安装)
  2. 组件清单 — OmniScripts、Integration Procedures、FlexCards、Data Mappers的数量统计(区分活跃状态与草稿状态)
  3. 依赖关系图 — 所有OmniStudio组件间的有向边,附带边类型标签
  4. Mermaid图表 — 可直接复制粘贴的Mermaid
    graph LR
    代码块,用于文档编写
  5. JSON摘要 — 机器可读的命名空间、组件、依赖关系及影响分析数据
  6. 易读性报告 — 纯文本摘要,包含组件数量、边数、循环引用以及被依赖最多的组件
  7. 循环引用警告 — 每个检测到的循环的路径及风险说明

Core Responsibilities

核心职责

  1. Namespace Detection: Identify whether an org uses Core (Industries), vlocity_cmt (Communications, Media & Energy), or vlocity_ins (Insurance & Health) namespace
  2. Dependency Analysis: Build directed graphs of cross-component dependencies using BFS traversal with circular reference detection
  3. Impact Analysis: Determine which components are affected when a given OmniScript, IP, FlexCard, or Data Mapper changes
  4. Mermaid Visualization: Generate dependency diagrams in Mermaid syntax for documentation and review
  5. Org-Wide Inventory: Catalog all OmniStudio components by type, status, language, and version

CRITICAL: Orchestration Order
When multiple OmniStudio skills are involved, follow this dependency chain:
omnistudio-dependencies-analyze
omnistudio-datamapper-generate
omnistudio-integration-procedure-generate
omnistudio-omniscript-generate
omnistudio-flexcard-generate
This skill runs first to establish namespace context and dependency maps that downstream skills consume.

  1. 命名空间检测:识别组织使用的是Core(Industries)、vlocity_cmt(通信、媒体与能源)还是vlocity_ins(保险与健康)命名空间
  2. 依赖关系分析:使用带循环引用检测的BFS遍历构建跨组件依赖关系的有向图
  3. 影响分析:确定当指定OmniScript、IP、FlexCard或Data Mapper发生变更时,哪些组件会受到影响
  4. Mermaid可视化:生成Mermaid语法的依赖关系图表,用于文档编写与评审
  5. 全组织组件清单:按类型、状态、语言和版本分类记录所有OmniStudio组件

重要提示:编排顺序
当涉及多个OmniStudio Skill时,请遵循以下依赖链:
omnistudio-dependencies-analyze
omnistudio-datamapper-generate
omnistudio-integration-procedure-generate
omnistudio-omniscript-generate
omnistudio-flexcard-generate
本Skill需优先运行,以建立下游Skill所需的命名空间上下文和依赖关系映射。

Key Insights

关键洞察

InsightDetail
Three namespaces coexistCore (OmniProcess), vlocity_cmt (vlocity_cmt__OmniScript__c), vlocity_ins (vlocity_ins__OmniScript__c)
Dependencies are stored in JSONPropertySetConfig (elements), Definition (FlexCards), InputObjectName/OutputObjectName (Data Mappers)
Circular references are possibleOmniScript A → IP B → OmniScript A via embedded call
FlexCard data sources are typed
dataSource.type === 'IntegrationProcedures'
(plural) in DataSourceConfig JSON
Active vs Draft mattersOnly active components participate in runtime dependency chains

关键洞察详细说明
三个命名空间可共存Core(OmniProcess)、vlocity_cmt(vlocity_cmt__OmniScript__c)、vlocity_ins(vlocity_ins__OmniScript__c)
依赖关系存储于JSON中PropertySetConfig(元素)、Definition(FlexCards)、InputObjectName/OutputObjectName(Data Mappers)
可能存在循环引用OmniScript A → IP B → 通过嵌入调用回到OmniScript A
FlexCard数据源带有类型标识DataSourceConfig JSON中
dataSource.type === 'IntegrationProcedures'
(复数形式)
活跃状态与草稿状态至关重要仅活跃组件会参与运行时依赖链

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:
  1. Core (Industries namespace):
    soql
    SELECT COUNT() FROM OmniProcess
    If this succeeds, the org uses the Core namespace (API 234.0+ / Spring '22+).
  2. vlocity_cmt (Communications, Media & Energy):
    soql
    SELECT COUNT() FROM vlocity_cmt__OmniScript__c
  3. 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()查询成功返回:
  1. Core(Industries命名空间):
    soql
    SELECT COUNT() FROM OmniProcess
    如果查询成功,说明组织使用Core命名空间(API 234.0+ / Spring '22+)。
  2. vlocity_cmt(通信、媒体与能源):
    soql
    SELECT COUNT() FROM vlocity_cmt__OmniScript__c
  3. vlocity_ins(保险与健康):
    soql
    SELECT COUNT() FROM vlocity_ins__OmniScript__c
如果所有查询均失败,说明组织未安装OmniStudio。
用于命名空间检测的CLI命令:
bash
undefined

Core 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 200
Integration 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 200
FlexCards (Core example):
soql
SELECT Id, Name, IsActive, DataSourceConfig, PropertySetConfig,
       AuthorName, LastModifiedDate
FROM OmniUiCard
ORDER BY Name
LIMIT 200
IMPORTANT: The
OmniUiCard
object does NOT have a
Definition
field. Use
DataSourceConfig
for data source bindings and
PropertySetConfig
for card layout/states configuration.
Data Mappers (Core example):
soql
SELECT Id, Name, IsActive, Type, LastModifiedDate
FROM OmniDataTransform
ORDER BY Name
LIMIT 200
Data 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
OmniDataTransformationId
(full word "Transformation"), NOT
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组件的清单。
根据检测到的命名空间,查询每种组件类型:
OmniScripts(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 200
Integration Procedures(Core示例):
soql
SELECT Id, Type, SubType, Language, IsActive, VersionNumber,
       PropertySetConfig, LastModifiedDate
FROM OmniProcess
WHERE IsIntegrationProcedure = true
ORDER BY Type, SubType, Language, VersionNumber DESC
LIMIT 200
FlexCards(Core示例):
soql
SELECT Id, Name, IsActive, DataSourceConfig, PropertySetConfig,
       AuthorName, LastModifiedDate
FROM OmniUiCard
ORDER BY Name
LIMIT 200
重要提示
OmniUiCard
对象没有
Definition
字段。请使用
DataSourceConfig
获取数据源绑定信息,使用
PropertySetConfig
获取卡片布局/状态配置。
Data Mappers(Core示例):
soql
SELECT Id, Name, IsActive, Type, LastModifiedDate
FROM OmniDataTransform
ORDER BY Name
LIMIT 200
Data Mapper项(用于提取对象依赖关系):
soql
SELECT Id, OmniDataTransformationId, InputObjectName, OutputObjectName,
       InputObjectQuerySequence
FROM OmniDataTransformItem
WHERE OmniDataTransformationId IN ({datamapper_ids})
重要提示:外键字段为
OmniDataTransformationId
(完整单词"Transformation"),而非
OmniDataTransformId
CLI命令模板:
bash
sf data query --query "SELECT Id, Type, SubType, Language, IsActive FROM OmniProcess WHERE IsIntegrationProcedure = false" \
  --target-org myorg --json

Phase 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 detected
1. 初始化空图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
PropertySetConfig
JSON field. Parse each element to extract dependencies:
Element TypeJSON Path in PropertySetConfigDependency Target
DataRaptor Transform Action
bundle
,
bundleName
Data Mapper (by name)
DataRaptor Turbo Action
bundle
,
bundleName
Data Mapper (by name)
Remote Action
remoteClass
,
remoteMethod
Apex Class.Method
Integration Procedure Action
integrationProcedureKey
IP (Type_SubType)
OmniScript Action
omniScriptKey
or
Type/SubType
OmniScript (Type_SubType)
HTTP Action
httpUrl
,
httpMethod
External endpoint (URL)
DocuSign Envelope Action
docuSignTemplateId
DocuSign template
Apex Remote Action
remoteClass
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 component
OmniScript和IP元素的引用存储在
PropertySetConfig
JSON字段中。解析每个元素以提取依赖关系:
元素类型PropertySetConfig中的JSON路径依赖目标
DataRaptor Transform Action
bundle
,
bundleName
Data Mapper(按名称)
DataRaptor Turbo Action
bundle
,
bundleName
Data Mapper(按名称)
Remote Action
remoteClass
,
remoteMethod
Apex Class.Method
Integration Procedure Action
integrationProcedureKey
IP(Type_SubType)
OmniScript Action
omniScriptKey
Type/SubType
OmniScript(Type_SubType)
HTTP Action
httpUrl
,
httpMethod
外部端点(URL)
DocuSign Envelope Action
docuSignTemplateId
DocuSign模板
Apex Remote Action
remoteClass
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
DataSourceConfig
JSON field (NOT
Definition
— that field does not exist on
OmniUiCard
):
Parse 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 FlexCard
IMPORTANT: The data source type for IPs is
IntegrationProcedures
(plural with capital P), not
IntegrationProcedure
.
FlexCards的数据源配置存储在
DataSourceConfig
JSON字段中(不是
Definition
— 该字段在
OmniUiCard
上不存在):
解析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 Mappers通过其项引用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:#1f2937
Color scheme:
Component TypeFillStroke
OmniScript
#dbeafe
(blue-100)
#1d4ed8
(blue-700)
Integration Procedure
#fef3c7
(amber-100)
#b45309
(amber-700)
Data Mapper
#d1fae5
(green-100)
#047857
(green-700)
FlexCard
#fce7f3
(pink-100)
#be185d
(pink-700)
Apex Class
#e9d5ff
(purple-100)
#7c3aed
(purple-700)
External (HTTP)
#f1f5f9
(slate-100)
#475569
(slate-600)
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
#dbeafe
(blue-100)
#1d4ed8
(blue-700)
Integration Procedure
#fef3c7
(amber-100)
#b45309
(amber-700)
Data Mapper
#d1fae5
(green-100)
#047857
(green-700)
FlexCard
#fce7f3
(pink-100)
#be185d
(pink-700)
Apex Class
#e9d5ff
(purple-100)
#7c3aed
(purple-700)
外部(HTTP)
#f1f5f9
(slate-100)
#475569
(slate-600)

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 dependents

OmniStudio依赖关系报告
=============================
组织命名空间:Core(Industries)
扫描日期:2026-03-06

组件清单:
  OmniScripts:              12个(8个活跃,4个草稿)
  Integration Procedures:    8个(6个活跃,2个草稿)
  FlexCards:                  5个(全部活跃)
  Data Mappers:             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
    /
    OmniUiCard
    /
    OmniDataTransform
  • vlocity_cmt uses
    vlocity_cmt__OmniScript__c
    /
    vlocity_cmt__VlocityUITemplate__c
    /
    vlocity_cmt__DRBundle__c
  • vlocity_ins uses
    vlocity_ins__OmniScript__c
    /
    vlocity_ins__VlocityUITemplate__c
    /
    vlocity_ins__DRBundle__c
  • The
    IsIntegrationProcedure
    boolean and
    DataSourceConfig
    (not
    Definition
    ) field names are Core-only

如需获取所有三个命名空间(Core、vlocity_cmt、vlocity_ins)的完整对象名称、字段名称及元数据类型映射,请阅读:
references/namespace-guide.md
需牢记的关键区分点:
  • Core使用
    OmniProcess
    /
    OmniUiCard
    /
    OmniDataTransform
  • vlocity_cmt使用
    vlocity_cmt__OmniScript__c
    /
    vlocity_cmt__VlocityUITemplate__c
    /
    vlocity_cmt__DRBundle__c
  • vlocity_ins使用
    vlocity_ins__OmniScript__c
    /
    vlocity_ins__VlocityUITemplate__c
    /
    vlocity_ins__DRBundle__c
  • IsIntegrationProcedure
    布尔值和
    DataSourceConfig
    (而非
    Definition
    )字段名仅适用于Core

CLI Commands Reference

CLI命令参考

Namespace Detection

命名空间检测

bash
undefined
bash
undefined

Probe 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"
undefined
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"
undefined

Component Inventory (Core Namespace)

组件清单(Core命名空间)

bash
undefined
bash
undefined

Count OmniScripts

统计OmniScripts数量

sf data query --query "SELECT COUNT() FROM OmniProcess WHERE IsIntegrationProcedure = false"
--target-org myorg --json
sf data query --query "SELECT COUNT() FROM OmniProcess WHERE IsIntegrationProcedure = false"
--target-org myorg --json

Count Integration Procedures

统计Integration Procedures数量

sf data query --query "SELECT COUNT() FROM OmniProcess WHERE IsIntegrationProcedure = true"
--target-org myorg --json
sf data query --query "SELECT COUNT() FROM OmniProcess WHERE IsIntegrationProcedure = true"
--target-org myorg --json

Count FlexCards

统计FlexCards数量

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 Mappers数量

sf data query --query "SELECT COUNT() FROM OmniDataTransform" --target-org myorg --json
undefined
sf data query --query "SELECT COUNT() FROM OmniDataTransform" --target-org myorg --json
undefined

Dependency Data Extraction (Core Namespace)

依赖关系数据提取(Core命名空间)

bash
undefined
bash
undefined

Get 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
sf data query --query "SELECT Id, OmniProcessId, Name, Type, PropertySetConfig FROM OmniProcessElement WHERE OmniProcessId = '{process_id}'"
--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
sf data query --query "SELECT Id, Name, DataSourceConfig FROM OmniUiCard WHERE IsActive = true"
--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

---
sf data query --query "SELECT Id, OmniDataTransformationId, InputObjectName, OutputObjectName FROM OmniDataTransformItem"
--target-org myorg --json

---

Cross-Skill Integration

跨Skill集成

SkillRelationshipHow This Skill Helps
omnistudio-datamapper-generateProvides namespace and object dependency dataData Mapper authoring uses detected namespace for correct API names
omnistudio-integration-procedure-generateProvides namespace and IP dependency mapIP authoring uses dependency graph to avoid circular references
omnistudio-omniscript-generateProvides namespace and element dependency dataOmniScript authoring uses namespace-correct field names
omnistudio-flexcard-generateProvides namespace and data source dependency mapFlexCard authoring uses detected IP references for validation
external-diagram-mermaid-generateConsumes dependency graph for visualizationThis skill generates Mermaid output compatible with external-diagram-mermaid-generate styling
platform-custom-object-generate / platform-custom-field-generateProvides sObject metadata for Data Mapper analysisObject field validation during dependency extraction
platform-metadata-deployDeployment uses namespace-correct metadata typesThis skill provides the correct metadata type names per namespace

Skill关系本Skill的作用
omnistudio-datamapper-generate提供命名空间和对象依赖关系数据Data Mapper编写时使用检测到的命名空间以确保API名称正确
omnistudio-integration-procedure-generate提供命名空间和IP依赖关系映射IP编写时使用依赖关系图避免循环引用
omnistudio-omniscript-generate提供命名空间和元素依赖关系数据OmniScript编写时使用命名空间对应的正确字段名
omnistudio-flexcard-generate提供命名空间和数据源依赖关系映射FlexCard编写时使用检测到的IP引用进行验证
external-diagram-mermaid-generate消费依赖关系图以生成可视化内容本Skill生成的Mermaid输出兼容external-diagram-mermaid-generate的样式
platform-custom-object-generate / platform-custom-field-generate为Data Mapper分析提供sObject元数据依赖关系提取过程中的对象字段验证
platform-metadata-deploy部署时使用命名空间对应的正确元数据类型本Skill提供每个命名空间对应的正确元数据类型名称

Gotchas

注意事项

ScenarioHandling
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 dependenciesInclude 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 lengthUse Tooling API or REST API to fetch full JSON body for elements with truncated config.
Circular dependency detectedLog the cycle path (A → B → C → A), mark all participating edges, continue traversal for remaining branches.
Components referencing deleted itemsRecord 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
    sf
    CLI with org authentication. Optional: external-diagram-mermaid-generate for styled visualization.
  • 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
    DataSourceConfig
    , NOT a
    Definition
    field (which does not exist on
    OmniUiCard
    ). Card layout/states are in
    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
    OmniDataTransformationId
    (full "Transformation").
  • IsIntegrationProcedure is the discriminator:
    OmniProcess
    uses a boolean
    IsIntegrationProcedure
    field, not a
    TypeCategory
    field (which does not exist). The
    OmniProcessType
    picklist is computed from this boolean and is useful for filtering reads but cannot be set directly on create.
  • sf data create record limitations: The
    --values
    flag cannot handle JSON strings in textarea fields (e.g., PropertySetConfig). Use
    sf api request rest --method POST --body @file.json
    instead for records with JSON configuration.
  • Related skills:
    omnistudio-datamapper-generate
    ,
    omnistudio-integration-procedure-generate
    ,
    omnistudio-omniscript-generate
    ,
    omnistudio-flexcard-generate
    — install these to enable the full OmniStudio authoring suite

  • 依赖项:需要已完成组织认证的
    sf
    CLI。可选:external-diagram-mermaid-generate用于样式化可视化。
  • 必须先检测命名空间:所有下游查询都依赖于正确的对象和字段API名称。
  • PropertySetConfig是核心:几乎所有依赖关系信息都存储在OmniProcessElement记录的这个JSON字段中。
  • FlexCards使用DataSourceConfig:数据源信息存储在
    DataSourceConfig
    中,而非
    Definition
    字段(该字段在
    OmniUiCard
    上不存在)。卡片布局/状态信息存储在
    PropertySetConfig
    中。
  • Data Mapper项包含对象引用:OmniDataTransformItem记录的InputObjectName和OutputObjectName揭示了Data Mapper读取和写入的sObjects。父对象的外键是
    OmniDataTransformationId
    (完整的"Transformation"单词)。
  • IsIntegrationProcedure是区分标识
    OmniProcess
    使用布尔值
    IsIntegrationProcedure
    字段,而非
    TypeCategory
    字段(该字段不存在)。
    OmniProcessType
    选择列表由该布尔值计算得出,可用于过滤读取操作,但创建时无法直接设置。
  • sf data create record的限制
    --values
    标志无法处理文本区域字段中的JSON字符串(例如PropertySetConfig)。对于包含JSON配置的记录,请改用
    sf api request rest --method POST --body @file.json
  • 相关Skill
    omnistudio-datamapper-generate
    omnistudio-integration-procedure-generate
    omnistudio-omniscript-generate
    omnistudio-flexcard-generate
    — 安装这些Skill以启用完整的OmniStudio编写套件

Reference File Index

参考文件索引

FileWhen to read
references/namespace-guide.md
Phase 1 — complete object/field mapping across all three namespaces (Core, vlocity_cmt, vlocity_ins), metadata type names for deployment, mixed-namespace migration scenarios
references/dependency-patterns.md
Phase 3 — complete dependency extraction rules per element type, FlexCard data source parsing, Data Mapper item parsing, circular reference detection algorithm, impact analysis patterns
文件阅读时机
references/namespace-guide.md
阶段1 — 获取所有三个命名空间(Core、vlocity_cmt、vlocity_ins)的完整对象/字段映射、部署用元数据类型名称、混合命名空间迁移场景
references/dependency-patterns.md
阶段3 — 获取每种元素类型的完整依赖关系提取规则、FlexCard数据源解析、Data Mapper项解析、循环引用检测算法、影响分析模式