sf-omnistudio-analyze

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

sf-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

核心职责

  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:
sf-omnistudio-analyze
sf-datamapper
sf-integration-procedure
sf-omniscript
sf-flexcard
This skill runs first to establish namespace context and dependency maps that downstream skills consume.

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

关键提示:编排顺序
当涉及多个OmniStudio技能时,请遵循以下依赖链:
sf-omnistudio-analyze
sf-datamapper
sf-integration-procedure
sf-omniscript
sf-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'
(复数形式)
激活状态与草稿状态有区别仅激活状态的组件会参与运行时依赖链

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):
soql
SELECT Id, Type, SubType, Language, IsActive, VersionNumber,
       PropertySetConfig, LastModifiedDate
FROM OmniProcess
WHERE IsIntegrationProcedure = false
ORDER BY Type, SubType, Language, VersionNumber DESC
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
FlexCards (Core example):
soql
SELECT Id, Name, IsActive, DataSourceConfig, PropertySetConfig,
       AuthorName, LastModifiedDate
FROM OmniUiCard
ORDER BY Name
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
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命名空间示例):
soql
SELECT Id, Type, SubType, Language, IsActive, VersionNumber,
       PropertySetConfig, LastModifiedDate
FROM OmniProcess
WHERE IsIntegrationProcedure = false
ORDER BY Type, SubType, Language, VersionNumber DESC
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
FlexCard(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 Name
Data Mapper Item(用于提取对象依赖关系):
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(注意:复数形式,首字母大写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对应的数据源类型是
IntegrationProcedures
(复数形式,首字母大写P),而非
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:#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

命名空间对象/字段映射

Complete mapping of OmniStudio objects and fields across all three namespaces:
三类命名空间下OmniStudio对象与字段的完整映射:

Primary Objects

主对象

ConceptCorevlocity_cmtvlocity_ins
OmniScript / IP container
OmniProcess
vlocity_cmt__OmniScript__c
vlocity_ins__OmniScript__c
OmniScript / IP elements
OmniProcessElement
vlocity_cmt__Element__c
vlocity_ins__Element__c
FlexCard
OmniUiCard
vlocity_cmt__VlocityUITemplate__c
vlocity_ins__VlocityUITemplate__c
Data Mapper
OmniDataTransform
vlocity_cmt__DRBundle__c
vlocity_ins__DRBundle__c
Data Mapper Item
OmniDataTransformItem
vlocity_cmt__DRMapItem__c
vlocity_ins__DRMapItem__c
概念Corevlocity_cmtvlocity_ins
OmniScript / IP容器
OmniProcess
vlocity_cmt__OmniScript__c
vlocity_ins__OmniScript__c
OmniScript / IP元素
OmniProcessElement
vlocity_cmt__Element__c
vlocity_ins__Element__c
FlexCard
OmniUiCard
vlocity_cmt__VlocityUITemplate__c
vlocity_ins__VlocityUITemplate__c
Data Mapper
OmniDataTransform
vlocity_cmt__DRBundle__c
vlocity_ins__DRBundle__c
Data Mapper Item
OmniDataTransformItem
vlocity_cmt__DRMapItem__c
vlocity_ins__DRMapItem__c

Key Fields

关键字段

ConceptCore Fieldvlocity_cmt Fieldvlocity_ins Field
Script type
Type
vlocity_cmt__Type__c
vlocity_ins__Type__c
Script subtype
SubType
vlocity_cmt__SubType__c
vlocity_ins__SubType__c
Language
Language
vlocity_cmt__Language__c
vlocity_ins__Language__c
Is active
IsActive
vlocity_cmt__IsActive__c
vlocity_ins__IsActive__c
Version
VersionNumber
vlocity_cmt__Version__c
vlocity_ins__Version__c
Element config
PropertySetConfig
vlocity_cmt__PropertySet__c
vlocity_ins__PropertySet__c
Is Integration Procedure
IsIntegrationProcedure
vlocity_cmt__IsIntegrationProcedure__c
vlocity_ins__IsIntegrationProcedure__c
FlexCard data sources
DataSourceConfig
vlocity_cmt__Definition__c
vlocity_ins__Definition__c
FlexCard layout/states
PropertySetConfig
(same field)(same field)
DM input object
InputObjectName
(on Item)
vlocity_cmt__InterfaceObject__c
vlocity_ins__InterfaceObject__c
DM output object
OutputObjectName
(on Item)
vlocity_cmt__TargetFieldObjectType__c
vlocity_ins__TargetFieldObjectType__c
See: references/namespace-guide.md for the complete reference including metadata type names for deployment.

概念Core字段vlocity_cmt字段vlocity_ins字段
脚本类型
Type
vlocity_cmt__Type__c
vlocity_ins__Type__c
脚本子类型
SubType
vlocity_cmt__SubType__c
vlocity_ins__SubType__c
语言
Language
vlocity_cmt__Language__c
vlocity_ins__Language__c
是否激活
IsActive
vlocity_cmt__IsActive__c
vlocity_ins__IsActive__c
版本
VersionNumber
vlocity_cmt__Version__c
vlocity_ins__Version__c
元素配置
PropertySetConfig
vlocity_cmt__PropertySet__c
vlocity_ins__PropertySet__c
是否为Integration Procedure
IsIntegrationProcedure
vlocity_cmt__IsIntegrationProcedure__c
vlocity_ins__IsIntegrationProcedure__c
FlexCard数据源
DataSourceConfig
vlocity_cmt__Definition__c
vlocity_ins__Definition__c
FlexCard布局/状态
PropertySetConfig
(相同字段)(相同字段)
DM输入对象
InputObjectName
(Item对象上)
vlocity_cmt__InterfaceObject__c
vlocity_ins__InterfaceObject__c
DM输出对象
OutputObjectName
(Item对象上)
vlocity_cmt__TargetFieldObjectType__c
vlocity_ins__TargetFieldObjectType__c
参考references/namespace-guide.md 包含完整参考信息,包括用于部署的元数据类型名称。

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 Item(用于对象依赖关系)

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
sf-datamapperProvides namespace and object dependency dataData Mapper authoring uses detected namespace for correct API names
sf-integration-procedureProvides namespace and IP dependency mapIP authoring uses dependency graph to avoid circular references
sf-omniscriptProvides namespace and element dependency dataOmniScript authoring uses namespace-correct field names
sf-flexcardProvides namespace and data source dependency mapFlexCard authoring uses detected IP references for validation
sf-diagram-mermaidConsumes dependency graph for visualizationThis skill generates Mermaid output compatible with sf-diagram-mermaid styling
sf-metadataProvides sObject metadata for Data Mapper analysisObject field validation during dependency extraction
sf-deployDeployment uses namespace-correct metadata typesThis 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

边缘场景

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: sf-diagram-mermaid 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.
  • 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

  • 依赖要求:需要已完成组织认证的
    sf
    CLI。可选依赖:sf-diagram-mermaid(用于样式化可视化)。
  • 必须先检测命名空间:所有下游查询都依赖于正确的对象和字段API名称。
  • PropertySetConfig是核心:几乎所有依赖关系信息都存储在OmniProcessElement记录的该JSON字段中。
  • FlexCard使用DataSourceConfig:数据源信息存储在
    DataSourceConfig
    中,而非
    Definition
    字段(
    OmniUiCard
    对象不存在该字段)。卡片布局/状态信息存储在
    PropertySetConfig
    中。
  • Data Mapper Item包含对象引用: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
    替代。
  • 安装相关技能
    /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