analyzing-omnistudio-dependencies

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

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

  • 适用场景:命名空间检测(Core / vlocity_cmt / vlocity_ins)、组织级组件清单、依赖图构建、影响分析、Mermaid图表生成
  • 不适用场景:编写或修改OmniScript(使用
    building-omnistudio-omniscript
    )、构建FlexCard(使用
    building-omnistudio-flexcard
    )、创建Integration Procedure(使用
    building-omnistudio-integration-procedure
    )、配置Data Mapper(使用
    building-omnistudio-datamapper

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. 组件清单 — OmniScript、Integration Procedure、FlexCard、Data Mapper的数量统计(激活状态 vs 草稿状态)
  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:
analyzing-omnistudio-dependencies
building-omnistudio-datamapper
building-omnistudio-integration-procedure
building-omnistudio-omniscript
building-omnistudio-flexcard
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技能时,请遵循以下依赖链:
analyzing-omnistudio-dependencies
building-omnistudio-datamapper
building-omnistudio-integration-procedure
building-omnistudio-omniscript
building-omnistudio-flexcard
本技能需优先运行,以建立命名空间上下文和依赖关系图,供下游技能使用。

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(FlexCard)、InputObjectName/OutputObjectName(Data Mapper)
可能存在循环引用OmniScript A → IP B → OmniScript A(通过嵌入式调用)
FlexCard数据源有类型区分DataSourceConfig JSON中
dataSource.type === 'IntegrationProcedures'
(复数形式)
激活状态 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:
  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组件的清单。
使用检测到的命名空间,查询各组件类型:
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 200
Integration 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 200
FlexCard(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 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
.
FlexCard的数据源配置存储在
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 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:#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

组件清单:
  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
    /
    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

统计OmniScript数量

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

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

统计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
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

跨技能集成

SkillRelationshipHow This Skill Helps
building-omnistudio-datamapperProvides namespace and object dependency dataData Mapper authoring uses detected namespace for correct API names
building-omnistudio-integration-procedureProvides namespace and IP dependency mapIP authoring uses dependency graph to avoid circular references
building-omnistudio-omniscriptProvides namespace and element dependency dataOmniScript authoring uses namespace-correct field names
building-omnistudio-flexcardProvides namespace and data source dependency mapFlexCard authoring uses detected IP references for validation
generating-mermaid-diagramsConsumes dependency graph for visualizationThis skill generates Mermaid output compatible with generating-mermaid-diagrams styling
generating-custom-object / generating-custom-fieldProvides sObject metadata for Data Mapper analysisObject field validation during dependency extraction
deploying-metadataDeployment uses namespace-correct metadata typesThis 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

注意事项

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: generating-mermaid-diagrams 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:
    building-omnistudio-datamapper
    ,
    building-omnistudio-integration-procedure
    ,
    building-omnistudio-omniscript
    ,
    building-omnistudio-flexcard
    — install these to enable the full OmniStudio authoring suite

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