sf-omniscript
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesesf-omniscript: OmniStudio OmniScript Creation and Validation
sf-omniscript:OmniStudio OmniScript 创建与验证
Expert OmniStudio OmniScript builder for declarative, step-based guided digital experiences. OmniScripts are the OmniStudio analog of Screen Flows: multi-step, interactive processes that collect input, orchestrate server-side logic (Integration Procedures, DataRaptors), and present results to the user — all without code.
专业的OmniStudio OmniScript构建工具,用于声明式、基于步骤的引导式数字化体验。OmniScript相当于OmniStudio中的Screen Flow:无需编写代码即可实现多步骤交互式流程,支持收集输入、编排服务器端逻辑(Integration Procedure、DataRaptor)并向用户展示结果。
Quick Reference
快速参考
Scoring: 120 points across 6 categories. Thresholds: ✅ 90+ (Deploy) | ⚠️ 67-89 (Review) | ❌ <67 (Block - fix required)
评分体系:6个类别总计120分。阈值:✅ 90分及以上(可部署) | ⚠️ 67-89分(需审核) | ❌ 低于67分(阻止部署,需修复)
Core Responsibilities
核心职责
- OmniScript Generation: Create well-structured OmniScripts from requirements, selecting appropriate element types for each step
- Element Design: Configure PropertySetConfig JSON for each element with correct data binding, validation, and conditional logic
- Dependency Analysis: Map all references to Integration Procedures, DataRaptors, and embedded OmniScripts before deployment
- Data Flow Analysis: Trace data through the OmniScript JSON structure — from prefill through user input to final save actions
- OmniScript生成:根据需求创建结构规范的OmniScript,为每个步骤选择合适的元素类型
- 元素设计:为每个元素配置PropertySetConfig JSON,包含正确的数据绑定、验证规则和条件逻辑
- 依赖分析:部署前梳理所有对Integration Procedure、DataRaptor和嵌入式OmniScript的引用
- 数据流分析:追踪数据在OmniScript JSON结构中的流转——从预填充、用户输入到最终保存操作
CRITICAL: Orchestration Order
重要提示:编排顺序
sf-omnistudio-analyze → sf-datamapper → sf-integration-procedure → sf-omniscript → sf-flexcard (you are here: sf-omniscript)
OmniScripts consume Integration Procedures and DataRaptors. Build those FIRST. FlexCards may launch OmniScripts — build FlexCards AFTER. Use sf-omnistudio-analyze to map the full dependency tree before starting.
sf-omnistudio-analyze → sf-datamapper → sf-integration-procedure → sf-omniscript → sf-flexcard(当前处于:sf-omniscript)
OmniScript依赖Integration Procedure和DataRaptor,需先构建这两者。FlexCard可能会启动OmniScript,需在OmniScript之后构建。开始前请使用sf-omnistudio-analyze梳理完整的依赖树。
Key Insights
关键要点
| Insight | Details |
|---|---|
| Type/SubType/Language triplet | Uniquely identifies an OmniScript. All three values are required and form the composite key. Example: Type= |
| PropertySetConfig | JSON blob containing all element configuration — layout, data binding, validation rules, conditional visibility. This is where the real logic lives |
| Core namespace | OmniProcess with |
| Element hierarchy | Elements use Level/Order fields for tree structure. Level 0 = Steps, Level 1+ = elements within steps. Order determines sequence within a level |
| Version management | Multiple versions can exist; only one can be active per Type/SubType/Language triplet. Activate via the |
| Data JSON | OmniScripts pass a single JSON data structure through all steps. Elements read from and write to this shared JSON via merge field syntax |
| 要点 | 详情 |
|---|---|
| Type/SubType/Language三元组 | 唯一标识一个OmniScript。这三个值均为必填项,共同构成复合键。示例:Type= |
| PropertySetConfig | 包含所有元素配置的JSON对象——布局、数据绑定、验证规则、条件可见性。核心逻辑均在此定义 |
| 核心命名空间 | OmniProcess需设置 |
| 元素层级 | 元素通过Level/Order字段构建树形结构。Level 0 = 步骤,Level 1+ = 步骤内的元素。Order字段决定同层级内的顺序 |
| 版本管理 | 可存在多个版本,但每个Type/SubType/Language三元组仅能有一个激活版本。通过 |
| 数据JSON | OmniScript在所有步骤中传递单个JSON数据结构。元素通过合并字段语法读取和写入该共享JSON |
Workflow Design (5-Phase Pattern)
工作流设计(5阶段模式)
Phase 1: Requirements Gathering
阶段1:需求收集
Before building, evaluate alternatives: OmniScripts are best for complex, multi-step guided processes. For simple single-screen data entry, consider Screen Flows. For data display without interaction, consider FlexCards.
Ask the user to gather:
- Type: The process category (e.g., ,
ServiceRequest,Enrollment)ClaimSubmission - SubType: The specific variation (e.g., ,
NewCase,UpdateAddress)FileAppeal - Language: Typically unless multi-language support is required
English - Purpose: What business process this OmniScript guides the user through
- Target org: Org alias for deployment
- Data sources: Which objects/APIs need to be queried or updated
Then: Check existing OmniScripts to avoid duplication, identify reusable Integration Procedures or DataRaptors, and map the dependency chain.
构建前先评估替代方案:OmniScript最适合复杂的多步骤引导流程。对于简单的单屏数据录入,可考虑使用Screen Flow。对于仅展示数据无需交互的场景,可考虑使用FlexCard。
请用户提供以下信息:
- Type:流程类别(例如:、
ServiceRequest、Enrollment)ClaimSubmission - SubType:具体的流程变体(例如:、
NewCase、UpdateAddress)FileAppeal - Language:通常为,除非需要多语言支持
English - 用途:该OmniScript用于引导用户完成何种业务流程
- 目标组织:部署的组织别名
- 数据源:需要查询或更新哪些对象/API
后续操作:检查是否存在重复的OmniScript,识别可复用的Integration Procedure或DataRaptor,并梳理依赖链。
Phase 2: Design & Element Selection
阶段2:设计与元素选择
Design each step and select element types appropriate to the interaction pattern.
设计每个步骤,并根据交互模式选择合适的元素类型。
Container Elements
容器元素
| Element Type | Purpose | Key Config |
|---|---|---|
| Step | Top-level container for a group of UI elements; each Step is a page in the wizard | |
| Conditional Block | Show/hide a group of elements based on conditions | |
| Loop Block | Iterate over a data list and render elements for each item | |
| Edit Block | Inline editing container for tabular data | |
| 元素类型 | 用途 | 关键配置 |
|---|---|---|
| Step | 一组UI元素的顶层容器;每个Step对应向导中的一个页面 | |
| Conditional Block | 根据条件显示/隐藏一组元素 | |
| Loop Block | 遍历数据列表并为每个项渲染元素 | |
| Edit Block | 表格数据的内联编辑容器 | |
Input Elements
输入元素
| Element Type | Purpose | Key Config |
|---|---|---|
| Text | Single-line text input | |
| Text Area | Multi-line text input | |
| Number | Numeric input with optional formatting | |
| Date | Date picker | |
| Date/Time | Date and time picker | |
| Checkbox | Boolean toggle | |
| Radio | Radio button group for single selection | |
| Select | Dropdown selection | |
| Multi-select | Multiple item selection | |
| Type Ahead | Search/autocomplete input | |
| Signature | Signature capture pad | |
| File | File upload | |
| Currency | Currency input with locale formatting | |
| Email input with format validation | | |
| Telephone | Phone number input with masking | |
| URL | URL input with format validation | |
| Password | Masked text input | |
| Range | Slider input | |
| Time | Time picker | |
| 元素类型 | 用途 | 关键配置 |
|---|---|---|
| Text | 单行文本输入 | |
| Text Area | 多行文本输入 | |
| Number | 数值输入(支持可选格式化) | |
| Date | 日期选择器 | |
| Date/Time | 日期时间选择器 | |
| Checkbox | 布尔值开关 | |
| Radio | 单选按钮组 | |
| Select | 下拉选择框 | |
| Multi-select | 多选选择框 | |
| Type Ahead | 搜索/自动补全输入框 | |
| Signature | 签名捕获面板 | |
| File | 文件上传 | |
| Currency | 货币输入(支持区域格式化) | |
| 邮箱输入(带格式验证) | | |
| Telephone | 电话号码输入(带掩码) | |
| URL | URL输入(带格式验证) | |
| Password | 掩码文本输入 | |
| Range | 滑块输入 | |
| Time | 时间选择器 | |
Display Elements
展示元素
| Element Type | Purpose | Key Config |
|---|---|---|
| Text Block | Static content display (HTML supported) | |
| Headline | Section heading | |
| Aggregate | Calculated summary display | |
| Disclosure | Expandable/collapsible content | |
| Image | Image display | |
| Chart | Data visualization | |
| 元素类型 | 用途 | 关键配置 |
|---|---|---|
| Text Block | 静态内容展示(支持HTML) | |
| Headline | 章节标题 | |
| Aggregate | 计算结果汇总展示 | |
| Disclosure | 可展开/折叠的内容 | |
| Image | 图片展示 | |
| Chart | 数据可视化 | |
Action Elements
动作元素
| Element Type | Purpose | Key Config |
|---|---|---|
| DataRaptor Extract Action | Pull data from Salesforce | |
| DataRaptor Load Action | Push data to Salesforce | |
| Integration Procedure Action | Call server-side Integration Procedure | |
| Remote Action | Call Apex @RemoteAction or REST | |
| Navigate Action | Page navigation or redirection | |
| DocuSign Envelope Action | Trigger DocuSign envelope | |
| Email Action | Send email | |
| 元素类型 | 用途 | 关键配置 |
|---|---|---|
| DataRaptor Extract Action | 从Salesforce拉取数据 | |
| DataRaptor Load Action | 向Salesforce推送数据 | |
| Integration Procedure Action | 调用服务器端Integration Procedure | |
| Remote Action | 调用Apex @RemoteAction或REST接口 | |
| Navigate Action | 页面导航或重定向 | |
| DocuSign Envelope Action | 触发DocuSign信封 | |
| Email Action | 发送邮件 | |
Logic Elements
逻辑元素
| Element Type | Purpose | Key Config |
|---|---|---|
| Set Values | Variable assignment and data transformation | |
| Validation | Input validation rules with custom messages | |
| Formula | Calculate values using formula expressions | |
| Submit Action | Final submission of collected data | |
| 元素类型 | 用途 | 关键配置 |
|---|---|---|
| Set Values | 变量赋值与数据转换 | |
| Validation | 带自定义提示的输入验证规则 | |
| Formula | 使用公式表达式计算值 | |
| Submit Action | 收集数据的最终提交 | |
Phase 3: Generation & Validation
阶段3:生成与验证
bash
undefinedbash
undefinedVerify no duplicate Type/SubType/Language exists
Verify no duplicate Type/SubType/Language exists
sf data query -q "SELECT Id,Name,Type,SubType,Language,IsActive,VersionNumber FROM OmniProcess WHERE Type='<Type>' AND SubType='<SubType>' AND Language='<Language>' AND OmniProcessType='OmniScript'" -o <org>
**Build the OmniScript**:
1. Create the OmniProcess record with Type, SubType, Language, and OmniProcessType='OmniScript'
2. Create OmniProcessElement child records for each Step (Level=0)
3. Create OmniProcessElement child records for each element within Steps (Level=1+, ordered by Order field)
4. Configure PropertySetConfig JSON for each element
5. Wire action elements to their Integration Procedures / DataRaptors
**Validation (STRICT MODE)**:
- **BLOCK**: Missing Type/SubType/Language, circular OmniScript embedding, broken IP/DataRaptor references, missing required PropertySetConfig fields
- **WARN**: Steps with no elements, input elements without validation, missing error handling on actions, unused data paths, deeply nested elements (>4 levels)
**Validation Report Format** (6-Category Scoring 0-120):Score: 102/120 ---- Very Good
-- Design & Structure: 22/25 (88%)
-- Data Integration: 18/20 (90%)
-- Error Handling: 17/20 (85%)
-- Performance: 18/20 (90%)
-- User Experience: 17/20 (85%)
-- Security: 10/15 (67%)
undefinedsf data query -q "SELECT Id,Name,Type,SubType,Language,IsActive,VersionNumber FROM OmniProcess WHERE Type='<Type>' AND SubType='<SubType>' AND Language='<Language>' AND OmniProcessType='OmniScript'" -o <org>
**构建OmniScript**:
1. 创建OmniProcess记录,指定Type、SubType、Language,并设置OmniProcessType='OmniScript'
2. 为每个Step创建子OmniProcessElement记录(Level=0)
3. 为Step内的每个元素创建子OmniProcessElement记录(Level=1+,按Order字段排序)
4. 为每个元素配置PropertySetConfig JSON
5. 将动作元素关联到对应的Integration Procedure / DataRaptor
**验证(严格模式)**:
- **阻止部署**:缺失Type/SubType/Language、OmniScript循环嵌入、Integration Procedure/DataRaptor引用失效、PropertySetConfig必填字段缺失
- **警告**:无元素Step、无验证规则的输入元素、动作元素缺失错误处理、未使用的数据路径、嵌套过深的元素(超过4层)
**验证报告格式**(6类别评分,总分0-120):Score: 102/120 ---- Very Good
-- Design & Structure: 22/25 (88%)
-- Data Integration: 18/20 (90%)
-- Error Handling: 17/20 (85%)
-- Performance: 18/20 (90%)
-- User Experience: 17/20 (85%)
-- Security: 10/15 (67%)
undefinedPhase 4: Deployment
阶段4:部署
- Deploy all dependencies first: DataRaptors, Integration Procedures, referenced OmniScripts
- Retrieve or deploy OmniScript metadata:
bash
sf project retrieve start -m OmniScript:<Name> -o <org> sf project deploy start -m OmniScript:<Name> -o <org> - Activate the OmniScript version after successful deployment
- Verify activation:
bash
sf data query -q "SELECT Id,Name,Type,SubType,Language,IsActive,VersionNumber FROM OmniProcess WHERE Type='<Type>' AND SubType='<SubType>' AND OmniProcessType='OmniScript' AND IsActive=true" -o <org>
- 先部署所有依赖项:DataRaptor、Integration Procedure、被引用的OmniScript
- 拉取或部署OmniScript元数据:
bash
sf project retrieve start -m OmniScript:<Name> -o <org> sf project deploy start -m OmniScript:<Name> -o <org> - 部署成功后激活OmniScript版本
- 验证激活状态:
bash
sf data query -q "SELECT Id,Name,Type,SubType,Language,IsActive,VersionNumber FROM OmniProcess WHERE Type='<Type>' AND SubType='<SubType>' AND OmniProcessType='OmniScript' AND IsActive=true" -o <org>
Phase 5: Testing
阶段5:测试
Walk through all paths with various data scenarios:
- Happy path: Complete all steps with valid data, verify submission
- Validation testing: Submit invalid data at each input, verify error messages
- Conditional testing: Exercise all conditional blocks and verify show/hide logic
- Data prefill: Verify DataRaptor Extract Actions populate elements correctly
- Save for later: Test resume functionality if enabled
- Navigation: Test back/forward/cancel behavior across all steps
- Error scenarios: Simulate IP/DataRaptor failures, verify error handling
- Embedded OmniScripts: Test data passing between parent and child OmniScripts
- Bulk data: Test with large datasets in Loop Blocks and Type Ahead elements
遍历所有路径并测试多种数据场景:
- 正常流程:使用有效数据完成所有步骤,验证提交功能
- 验证测试:在每个输入框提交无效数据,验证错误提示
- 条件测试:触发所有条件块,验证显示/隐藏逻辑
- 数据预填充:验证DataRaptor Extract Action是否正确填充元素
- 保存续填:若启用则测试恢复功能
- 导航测试:测试所有步骤的返回/前进/取消行为
- 错误场景:模拟Integration Procedure/DataRaptor故障,验证错误处理
- 嵌入式OmniScript:测试父与子OmniScript之间的数据传递
- 批量数据:测试Loop Block和Type Ahead元素处理大数据集的情况
Generation Guardrails (MANDATORY)
生成规范(强制要求)
| Anti-Pattern | Impact | Correct Pattern |
|---|---|---|
| Circular OmniScript embedding | Infinite rendering loop | Map dependency tree; never embed A in B if B embeds A |
| Unbounded DataRaptor Extract | Performance degradation | Add filter conditions; limit returned records |
| Missing input validation | Bad data entry | Add Validation elements or |
| Hardcoded Salesforce IDs | Deployment failure across orgs | Use merge fields or Custom Settings/Metadata |
| IP Action without error handling | Silent failures | Configure |
| Large images in Text Blocks | Slow page load | Use Image elements with optimized URLs |
| Too many elements per Step | Poor user experience | Limit to 7-10 input elements per Step |
| Missing conditional visibility | Irrelevant fields shown | Use |
DO NOT generate anti-patterns even if explicitly requested.
| 反模式 | 影响 | 正确模式 |
|---|---|---|
| OmniScript循环嵌入 | 无限渲染循环 | 梳理依赖树;若B嵌入A,则禁止A嵌入B |
| 无限制的DataRaptor Extract | 性能下降 | 添加过滤条件;限制返回记录数 |
| 缺失输入验证 | 数据录入错误 | 添加Validation元素或在输入元素上设置 |
| 硬编码Salesforce ID | 跨组织部署失败 | 使用合并字段或自定义设置/元数据 |
| 无错误处理的Integration Procedure Action | 静默失败 | 在PropertySetConfig中配置 |
| Text Block中使用大图片 | 页面加载缓慢 | 使用Image元素并优化图片URL |
| 单个Step包含过多元素 | 用户体验差 | 每个Step最多包含7-10个输入元素 |
| 缺失条件可见性配置 | 展示无关字段 | 使用 |
即使被明确要求,也不得生成反模式内容。
Scoring: 120 Points Across 6 Categories
评分体系:6类别总计120分
Design & Structure (25 points)
设计与结构(25分)
| Check | Points | Criteria |
|---|---|---|
| Type/SubType/Language set correctly | 5 | All three fields populated with meaningful values |
| Step organization | 5 | Logical grouping, 7-10 elements per step max |
| Element naming | 5 | Descriptive names following |
| Conditional logic | 5 | Proper use of Conditional Blocks and |
| Version management | 5 | Clean version history, only one active version |
| 检查项 | 分值 | 标准 |
|---|---|---|
| Type/SubType/Language设置正确 | 5 | 三个字段均已填充且有实际意义 |
| Step组织合理 | 5 | 逻辑分组,每个Step最多7-10个元素 |
| 元素命名规范 | 5 | 描述性名称,遵循 |
| 条件逻辑使用正确 | 5 | 合理使用Conditional Block和 |
| 版本管理规范 | 5 | 版本历史清晰,仅一个激活版本 |
Data Integration (20 points)
数据集成(20分)
| Check | Points | Criteria |
|---|---|---|
| DataRaptor references valid | 5 | All Extract/Load bundles exist and are active |
| Integration Procedure references valid | 5 | All IP actions reference active IPs |
| Input/Output maps correct | 5 | Data flows correctly between elements and actions |
| Data prefill configured | 5 | Initial data loaded before user interaction |
| 检查项 | 分值 | 标准 |
|---|---|---|
| DataRaptor引用有效 | 5 | 所有Extract/Load bundle均存在且已激活 |
| Integration Procedure引用有效 | 5 | 所有Integration Procedure Action均引用已激活的Integration Procedure |
| 输入/输出映射正确 | 5 | 元素与动作之间的数据流正确 |
| 数据预填充配置完成 | 5 | 用户交互前已加载初始数据 |
Error Handling (20 points)
错误处理(20分)
| Check | Points | Criteria |
|---|---|---|
| Action elements have error handling | 5 | |
| User-facing error messages | 5 | Clear, actionable error text |
| Validation on required inputs | 5 | All required fields have validation rules |
| Fallback behavior defined | 5 | Graceful handling when data sources return empty |
| 检查项 | 分值 | 标准 |
|---|---|---|
| 动作元素配置错误处理 | 5 | 所有Integration Procedure/DataRaptor动作均配置 |
| 用户友好的错误提示 | 5 | 错误文本清晰、可操作 |
| 必填输入项有验证规则 | 5 | 所有必填字段均配置验证规则 |
| 定义回退行为 | 5 | 数据源返回空值时可优雅处理 |
Performance (20 points)
性能(20分)
| Check | Points | Criteria |
|---|---|---|
| No unbounded data fetches | 5 | All DataRaptor Extracts have filters/limits |
| Lazy loading configured | 5 | Action elements fire on step entry, not OmniScript load |
| Element count per Step reasonable | 5 | No Step with >15 elements |
| Conditional rendering used | 5 | Elements hidden when not applicable (not just invisible) |
| 检查项 | 分值 | 标准 |
|---|---|---|
| 无无限制的数据拉取 | 5 | 所有DataRaptor Extract均配置过滤/限制条件 |
| 配置懒加载 | 5 | 动作元素在Step进入时触发,而非OmniScript加载时 |
| 单个Step的元素数量合理 | 5 | 无Step包含超过15个元素 |
| 使用条件渲染 | 5 | 不适用的元素被隐藏(而非仅不可见) |
User Experience (20 points)
用户体验(20分)
| Check | Points | Criteria |
|---|---|---|
| Logical step flow | 5 | Steps follow natural task progression |
| Input labels and help text | 5 | All inputs have clear labels and contextual help |
| Navigation controls | 5 | Back, Next, Cancel, Save for Later configured appropriately |
| Responsive layout | 5 | Elements configured for mobile and desktop breakpoints |
| 检查项 | 分值 | 标准 |
|---|---|---|
| 步骤流逻辑清晰 | 5 | 步骤遵循自然的任务流程 |
| 输入项有标签和帮助文本 | 5 | 所有输入项均有清晰的标签和上下文帮助 |
| 导航控件配置合理 | 5 | 正确配置返回、前进、取消、保存续填按钮 |
| 响应式布局 | 5 | 元素针对移动端和桌面端断点配置 |
Security (15 points)
安全性(15分)
| Check | Points | Criteria |
|---|---|---|
| No sensitive data in client-side JSON | 5 | Passwords, SSNs, tokens kept server-side |
| IP actions use server-side processing | 5 | Sensitive logic in Integration Procedures, not client OmniScript |
| Field-level access respected | 5 | Data access matches user profile/permission set |
| 检查项 | 分值 | 标准 |
|---|---|---|
| 客户端JSON中无敏感数据 | 5 | 密码、社保号、令牌等数据保留在服务器端 |
| Integration Procedure动作使用服务器端处理 | 5 | 敏感逻辑在Integration Procedure中实现,而非客户端OmniScript |
| 遵循字段级访问权限 | 5 | 数据访问权限与用户配置文件/权限集匹配 |
CLI Commands
CLI命令
bash
undefinedbash
undefinedList active OmniScripts
List active OmniScripts
sf data query -q "SELECT Id,Name,Type,SubType,Language,IsActive,VersionNumber FROM OmniProcess WHERE IsActive=true AND OmniProcessType='OmniScript'" -o <org>
sf data query -q "SELECT Id,Name,Type,SubType,Language,IsActive,VersionNumber FROM OmniProcess WHERE IsActive=true AND OmniProcessType='OmniScript'" -o <org>
Query elements for a specific OmniScript
Query elements for a specific OmniScript
sf data query -q "SELECT Id,Name,ElementType,PropertySetConfig,Level,Order FROM OmniProcessElement WHERE OmniProcessId='<id>' ORDER BY Level,Order" -o <org>
sf data query -q "SELECT Id,Name,ElementType,PropertySetConfig,Level,Order FROM OmniProcessElement WHERE OmniProcessId='<id>' ORDER BY Level,Order" -o <org>
Retrieve OmniScript metadata
Retrieve OmniScript metadata
sf project retrieve start -m OmniScript:<Name> -o <org>
sf project retrieve start -m OmniScript:<Name> -o <org>
Deploy OmniScript metadata
Deploy OmniScript metadata
sf project deploy start -m OmniScript:<Name> -o <org>
sf project deploy start -m OmniScript:<Name> -o <org>
Check OmniScript versions
Check OmniScript versions
sf data query -q "SELECT Id,VersionNumber,IsActive,LastModifiedDate FROM OmniProcess WHERE Type='<Type>' AND SubType='<SubType>' AND OmniProcessType='OmniScript' ORDER BY VersionNumber DESC" -o <org>
---sf data query -q "SELECT Id,VersionNumber,IsActive,LastModifiedDate FROM OmniProcess WHERE Type='<Type>' AND SubType='<SubType>' AND OmniProcessType='OmniScript' ORDER BY VersionNumber DESC" -o <org>
---Cross-Skill Integration
跨技能集成
| From Skill | To sf-omniscript | When |
|---|---|---|
| sf-omnistudio-analyze | -> sf-omniscript | "Analyze dependencies before building OmniScript" |
| sf-datamapper | -> sf-omniscript | "DataRaptor ready, build the OmniScript that uses it" |
| sf-integration-procedure | -> sf-omniscript | "IP ready, wire it into the OmniScript action" |
| From sf-omniscript | To Skill | When |
|---|---|---|
| sf-omniscript | -> sf-flexcard | "Build FlexCard that launches this OmniScript" |
| sf-omniscript | -> sf-deploy | "Deploy OmniScript to target org" |
| sf-omniscript | -> sf-omnistudio-analyze | "Map full dependency tree before deployment" |
| sf-omniscript | -> sf-integration-procedure | "Need a new IP for this OmniScript action" |
| sf-omniscript | -> sf-datamapper | "Need a DataRaptor for data prefill" |
| 来源技能 | 目标sf-omniscript | 触发时机 |
|---|---|---|
| sf-omnistudio-analyze | -> sf-omniscript | "构建OmniScript前分析依赖" |
| sf-datamapper | -> sf-omniscript | "DataRaptor已就绪,构建使用它的OmniScript" |
| sf-integration-procedure | -> sf-omniscript | "Integration Procedure已就绪,将其关联到OmniScript动作" |
| 来源sf-omniscript | 目标技能 | 触发时机 |
|---|---|---|
| sf-omniscript | -> sf-flexcard | "构建启动该OmniScript的FlexCard" |
| sf-omniscript | -> sf-deploy | "将OmniScript部署到目标组织" |
| sf-omniscript | -> sf-omnistudio-analyze | "部署前梳理完整依赖树" |
| sf-omniscript | -> sf-integration-procedure | "为OmniScript动作创建新的Integration Procedure" |
| sf-omniscript | -> sf-datamapper | "为数据预填充创建DataRaptor" |
Edge Cases
边缘场景
| Scenario | Solution |
|---|---|
| Multi-language OmniScript | Create separate versions per Language with shared Type/SubType. Use translation workbench for labels |
| Embedded OmniScript data passing | Map parent data JSON keys to child OmniScript input via |
| Large Loop Block datasets | Paginate or limit DataRaptor results. Consider server-side filtering in IP |
| OmniScript in FlexCard flyout | Ensure FlexCard passes required context data. Test flyout sizing |
| Community/Experience Cloud deployment | Verify OmniScript component is available in Experience Builder. Check guest user permissions |
| Save & Resume (Save for Later) | Configure |
| Versioning conflicts | Deactivate old version before activating new. Never have two active versions for same triplet |
| Custom Lightning Web Components in OmniScript | Register LWC as OmniScript-compatible. Follow |
Debug: OmniScript not rendering -> check activation status + element hierarchy | Data not prefilling -> verify DataRaptor Extract output mapping + JSON path | IP action failing -> check IP independently first + verify input map | Steps not showing -> review conditional visibility expressions
| 场景 | 解决方案 |
|---|---|
| 多语言OmniScript | 为每种Language创建单独版本,共享Type/SubType。使用翻译工作台处理标签 |
| 嵌入式OmniScript数据传递 | 通过 |
| 大型Loop Block数据集 | 对DataRaptor结果进行分页或限制。考虑在Integration Procedure中实现服务器端过滤 |
| FlexCard弹出层中的OmniScript | 确保FlexCard传递必要的上下文数据。测试弹出层尺寸 |
| 社区/体验云部署 | 验证OmniScript组件在Experience Builder中可用。检查访客用户权限 |
| 保存续填 | 配置 |
| 版本冲突 | 激活新版本前先停用旧版本。同一三元组不得有两个激活版本 |
| OmniScript中的自定义Lightning Web Components | 将LWC注册为OmniScript兼容组件。遵循 |
调试指南:OmniScript无法渲染 -> 检查激活状态 + 元素层级 | 数据未预填充 -> 验证DataRaptor Extract输出映射 + JSON路径 | Integration Procedure动作失败 -> 先单独测试Integration Procedure + 验证输入映射 | 步骤未显示 -> 检查条件可见性表达式
Notes
说明
Dependencies (required): sf-datamapper, sf-integration-procedure | Dependencies (optional): sf-deploy, sf-flexcard, sf-omnistudio-analyze | API: 66.0 | Mode: Strict (warnings block) | Scoring: Block deployment if score < 67 | Reference docs: See for element types and best practices
references/Creating OmniScripts programmatically: Use REST API (). Required fields: , , , , . OmniScripts default to (do NOT set — it is computed). The flag cannot handle JSON textarea fields like . Create child records via REST API for each Step and element.
sf api request rest --method POST --body @file.jsonNameTypeSubTypeLanguageVersionNumberIsIntegrationProcedure=falseOmniProcessTypesf data create record --valuesPropertySetConfigOmniProcessElement依赖项(必填):sf-datamapper、sf-integration-procedure | 依赖项(可选):sf-deploy、sf-flexcard、sf-omnistudio-analyze | API版本:66.0 | 模式:严格(警告会阻止部署) | 评分规则:评分低于67分则阻止部署 | 参考文档:请查看目录获取元素类型和最佳实践
references/程序化创建OmniScript:使用REST API()。必填字段:、、、、。OmniScript默认(请勿设置 — 该字段为计算字段)。命令无法处理这类JSON文本字段。请通过REST API为每个Step和元素创建子记录。
sf api request rest --method POST --body @file.jsonNameTypeSubTypeLanguageVersionNumberIsIntegrationProcedure=falseOmniProcessTypesf data create record --valuesPropertySetConfigOmniProcessElement