Loading...
Loading...
Compare original and translation side by side
| Insight | Details |
|---|---|
| Chaining | IPs call other IPs via Integration Procedure Action elements. Output of one step feeds input of the next via response mapping. Design data flow linearly where possible. |
| Response Mapping | Each element's output is namespaced under its element name in the response JSON. Use |
| Caching | IPs support platform cache for read-heavy orchestrations. Set |
| Versioning | Type/SubType pairs uniquely identify an IP. Use SubType for versioning (e.g., |
OmniProcessIsIntegrationProcedure = trueOmniProcessType = 'Integration Procedure'CRITICAL — Creating IPs via Data API: When creating OmniProcess records, setto make the record an Integration Procedure. TheIsIntegrationProcedure = truepicklist is computed from this boolean and cannot be set directly. Also,OmniProcessTypeis a required field onName(not documented in standard OmniStudio docs). UseOmniProcessfor creation — thesf api request rest --method POST --body @file.jsonflag cannot handle JSON textarea fields likesf data create record --values.PropertySetConfig
| 要点 | 详情 |
|---|---|
| 链式调用 | IP通过Integration Procedure Action元素调用其他IP。前一步的输出通过响应映射作为下一步的输入。尽可能设计线性数据流。 |
| 响应映射 | 每个元素的输出在响应JSON中以元素名称作为命名空间。使用 |
| 缓存 | IP支持平台缓存,适用于读密集型编排。在流程的PropertySet中设置 |
| 版本控制 | Type/SubType组合唯一标识一个IP。使用SubType进行版本管理(例如: |
OmniProcessIsIntegrationProcedure = trueOmniProcessType = 'Integration Procedure'关键提示——通过Data API创建IP:创建OmniProcess记录时,需设置以将该标记为Integration Procedure。IsIntegrationProcedure = true下拉选项是从此布尔值自动计算的,无法直接设置。此外,OmniProcessType是Name的必填字段(标准OmniStudio文档中未说明)。请使用OmniProcess命令创建——sf api request rest --method POST --body @file.json参数无法处理sf data create record --values这类JSON文本区域字段。PropertySetConfig
Type=OrderProcessingSubType=StandardType=OrderProcessingSubType=Standard| Element Type | Use Case | PropertySet Key |
|---|---|---|
| DataRaptor Extract Action | Read Salesforce data | |
| DataRaptor Load Action | Write Salesforce data | |
| DataRaptor Transform Action | Data shaping/mapping | |
| Remote Action | Call Apex class method | |
| Integration Procedure Action | Call nested IP | |
| HTTP Action | External API callout | |
| Conditional Block | Branching logic | -- |
| Loop Block | Iterate over collections | -- |
| Set Values | Assign variables/constants | -- |
[Type]_[SubType]GetAccountDetailsValidateInputCreateOrderRecord| 元素类型 | 使用场景 | PropertySet键 |
|---|---|---|
| DataRaptor Extract Action | 读取Salesforce数据 | |
| DataRaptor Load Action | 写入Salesforce数据 | |
| DataRaptor Transform Action | 数据格式化/映射 | |
| Remote Action | 调用Apex类方法 | |
| Integration Procedure Action | 调用嵌套IP | |
| HTTP Action | 外部API调用 | |
| Conditional Block | 分支逻辑 | -- |
| Loop Block | 遍历集合 | -- |
| Set Values | 分配变量/常量 | -- |
[Type]_[SubType]GetAccountDetailsValidateInputCreateOrderRecordScore: 95/110 Very Good
|- Design & Structure: 18/20 (90%)
|- Data Operations: 23/25 (92%)
|- Error Handling: 18/20 (90%)
|- Performance: 18/20 (90%)
|- Security: 13/15 (87%)
|- Documentation: 5/10 (50%)Score: 95/110 Very Good
|- Design & Structure: 18/20 (90%)
|- Data Operations: 23/25 (92%)
|- Error Handling: 18/20 (90%)
|- Performance: 18/20 (90%)
|- Security: 13/15 (87%)
|- Documentation: 5/10 (50%)| Anti-Pattern | Impact | Correct Pattern |
|---|---|---|
| Circular IP calls (A calls B calls A) | Infinite loop / stack overflow | Map dependency graph; no cycles allowed |
| DML without error handling | Silent data corruption | Wrap DataRaptor Load in try/catch or conditional error check |
| Unbounded DataRaptor Extract | Governor limits / timeout | Set LIMIT on extracts; paginate large datasets |
| Hardcoded Salesforce IDs in PropertySetConfig | Deployment failure across orgs | Use input variables, Custom Settings, or Custom Metadata |
| Sequential calls that could be parallel | Unnecessary latency | Group independent elements; no serial dependency needed |
| Missing response validation | Downstream null reference errors | Check element response before passing to next step |
| 反模式 | 影响 | 正确模式 |
|---|---|---|
| IP循环调用(A调用B,B调用A) | 无限循环/栈溢出 | 绘制依赖关系图;不允许存在循环 |
| 无错误处理的DML操作 | 静默数据损坏 | 将DataRaptor Load包装在try/catch中或添加条件错误检查 |
| 无限制的DataRaptor Extract | 触发 governor 限制/超时 | 为提取操作设置LIMIT;对大型数据集进行分页 |
| PropertySetConfig中硬编码Salesforce ID | 跨组织部署失败 | 使用输入变量、自定义设置或自定义元数据 |
| 可并行执行的串行调用 | 不必要的延迟 | 对独立元素进行分组;无需设置串行依赖 |
| 缺少响应验证 | 下游空引用错误 | 将响应传递到下一步之前,检查元素响应 |
sf project deploy start -m OmniIntegrationProcedure:<Name> -o <org>IsActive=truesf project deploy start -m OmniIntegrationProcedure:<Name> -o <org>IsActive=true| Criterion | Points | Description |
|---|---|---|
| Type/SubType naming | 5 | Follows convention, descriptive, versioned appropriately |
| Element naming | 5 | Clear, action-oriented names on all elements |
| Data flow clarity | 5 | Linear or well-documented branching; explicit input/output mapping |
| Element ordering | 5 | Logical execution sequence; no unnecessary dependencies |
| 评分标准 | 分值 | 描述 |
|---|---|---|
| Type/SubType命名 | 5 | 遵循规范、描述性强、版本管理合理 |
| 元素命名 | 5 | 所有元素名称清晰、面向操作 |
| 数据流清晰度 | 5 | 线性或文档完善的分支结构;显式输入/输出映射 |
| 元素排序 | 5 | 逻辑执行顺序;无不必要的依赖 |
| Criterion | Points | Description |
|---|---|---|
| DataRaptor references valid | 5 | All referenced bundles exist and are active |
| Extract operations bounded | 5 | LIMIT set on all extracts; pagination for large datasets |
| Load operations validated | 5 | Input data validated before DML; required fields checked |
| Response mapping correct | 5 | Outputs correctly mapped between elements |
| Data transformation accuracy | 5 | Transform actions produce expected output structure |
| 评分标准 | 分值 | 描述 |
|---|---|---|
| DataRaptor引用有效性 | 5 | 所有引用的bundle存在且处于激活状态 |
| 提取操作受限 | 5 | 所有提取操作设置LIMIT;大型数据集分页 |
| 加载操作验证 | 5 | DML前验证输入数据;检查必填字段 |
| 响应映射正确性 | 5 | 元素间输出映射正确 |
| 数据转换准确性 | 5 | 转换操作生成预期的输出结构 |
| Criterion | Points | Description |
|---|---|---|
| DML error handling | 8 | All DataRaptor Load actions have error handling |
| HTTP error handling | 4 | All HTTP actions check status codes and handle failures |
| Remote Action error handling | 4 | Apex exceptions caught and surfaced |
| Rollback strategy | 4 | Multi-step DML has conditional rollback or compensating actions |
| 评分标准 | 分值 | 描述 |
|---|---|---|
| DML错误处理 | 8 | 所有DataRaptor Load操作均有错误处理 |
| HTTP错误处理 | 4 | 所有HTTP操作检查状态码并处理失败场景 |
| Remote Action错误处理 | 4 | 捕获Apex异常并反馈 |
| 回滚策略 | 4 | 多步骤DML具备条件回滚或补偿操作 |
| Criterion | Points | Description |
|---|---|---|
| No unbounded queries | 5 | All extracts have reasonable LIMIT values |
| Caching applied | 5 | Read-only procedures use platform cache where appropriate |
| Parallel execution | 5 | Independent elements not serialized unnecessarily |
| No redundant calls | 5 | Same data not fetched multiple times across elements |
| 评分标准 | 分值 | 描述 |
|---|---|---|
| 无无限制查询 | 5 | 所有提取操作设置合理的LIMIT值 |
| 启用缓存 | 5 | 只读流程在合适场景下使用平台缓存 |
| 并行执行 | 5 | 独立元素未被不必要地串行化 |
| 无冗余调用 | 5 | 同一数据未在多个元素中重复获取 |
| Criterion | Points | Description |
|---|---|---|
| No hardcoded IDs | 5 | IDs passed as input variables or from metadata |
| No hardcoded credentials | 5 | API keys/tokens use Named Credentials or Custom Settings |
| Input validation | 5 | User-supplied input sanitized before use in queries or DML |
| 评分标准 | 分值 | 描述 |
|---|---|---|
| 无硬编码ID | 5 | ID通过输入变量或元数据传递 |
| 无硬编码凭证 | 5 | API密钥/令牌使用命名凭证或自定义设置 |
| 输入验证 | 5 | 用户提供的输入在查询或DML使用前进行清理 |
| Criterion | Points | Description |
|---|---|---|
| Procedure description | 3 | Clear description of purpose and business context |
| Element descriptions | 4 | Each element has a description explaining its role |
| Input/output documentation | 3 | Expected input JSON and output JSON structure documented |
| 评分标准 | 分值 | 描述 |
|---|---|---|
| 流程描述 | 3 | 清晰描述目的和业务背景 |
| 元素描述 | 4 | 每个元素都有说明其作用的描述 |
| 输入/输出文档 | 3 | 记录预期的输入JSON和输出JSON结构 |
undefinedundefined
**Core Namespace Note**: The `IsIntegrationProcedure=true` filter is REQUIRED (or equivalently `OmniProcessType='Integration Procedure'`). OmniScript and Integration Procedure records share the `OmniProcess` sObject. Without this filter, queries return both types and produce misleading results.
---
**核心命名空间提示**:必须使用`IsIntegrationProcedure=true`筛选条件(或等效的`OmniProcessType='Integration Procedure'`)。OmniScript和Integration Procedure记录共享`OmniProcess`对象。如果不添加此筛选条件,查询结果会包含两种类型的记录,产生误导性结果。
---| From Skill | To sf-integration-procedure | When |
|---|---|---|
| sf-omnistudio-analyze | -> sf-integration-procedure | "Analyze dependencies before building IP" |
| sf-datamapper | -> sf-integration-procedure | "DataRaptor/Data Mapper is ready, wire it into IP" |
| sf-apex | -> sf-integration-procedure | "Apex Remote Action class deployed, configure in IP" |
| From sf-integration-procedure | To Skill | When |
|---|---|---|
| sf-integration-procedure | -> sf-deploy | "Deploy IP to target org" |
| sf-integration-procedure | -> sf-omniscript | "IP is active, build OmniScript that calls it" |
| sf-integration-procedure | -> sf-flexcard | "IP is active, build FlexCard data source" |
| sf-integration-procedure | -> sf-omnistudio-analyze | "Verify IP dependency graph before deployment" |
| 来源技能 | 目标sf-integration-procedure | 触发时机 |
|---|---|---|
| sf-omnistudio-analyze | -> sf-integration-procedure | "构建IP前分析依赖关系" |
| sf-datamapper | -> sf-integration-procedure | "DataRaptor/Data Mapper已准备就绪,将其接入IP" |
| sf-apex | -> sf-integration-procedure | "Apex Remote Action类已部署,在IP中配置" |
| 来源sf-integration-procedure | 目标技能 | 触发时机 |
|---|---|---|
| sf-integration-procedure | -> sf-deploy | "将IP部署到目标组织" |
| sf-integration-procedure | -> sf-omniscript | "IP已激活,构建调用它的OmniScript" |
| sf-integration-procedure | -> sf-flexcard | "IP已激活,构建FlexCard数据源" |
| sf-integration-procedure | -> sf-omnistudio-analyze | "部署前验证IP依赖关系图" |
| Scenario | Solution |
|---|---|
| IP calls itself (direct recursion) | Block at design time; circular dependency check is mandatory |
| IP calls IP that calls original (indirect recursion) | Map full call graph; sf-omnistudio-analyze detects cycles |
| DataRaptor not yet deployed | Deploy DataRaptors first; IP deployment will fail on missing references |
| External API timeout | Set timeout values on HTTP Action elements; implement retry logic or graceful degradation |
| Large collection input to Loop Block | Set batch size; test with realistic data volumes to avoid CPU timeout |
| Type/SubType collision with existing IP | Query existing IPs before creating; SubType versioning avoids collisions |
| Mixed namespace (Vlocity vs Core) | Confirm org namespace; element property names differ between packages |
| 场景 | 解决方案 |
|---|---|
| IP自调用(直接递归) | 设计阶段阻止;必须检查循环依赖 |
| IP调用的IP调用原IP(间接递归) | 绘制完整调用图;sf-omnistudio-analyze可检测循环 |
| DataRaptor尚未部署 | 先部署DataRaptor;IP部署会因缺少引用而失败 |
| 外部API超时 | 在HTTP Action元素上设置超时值;实现重试逻辑或优雅降级 |
| Loop Block的大型集合输入 | 设置批处理大小;使用真实数据量测试以避免CPU超时 |
| Type/SubType与现有IP冲突 | 创建前查询现有IP;使用SubType版本管理避免冲突 |
| 混合命名空间(Vlocity vs Core) | 确认组织命名空间;不同包的元素属性名称不同 |
references/best-practices.mdreferences/element-types.mdsf api request rest --method POST --body @file.jsonNameTypeSubTypeLanguageVersionNumberIsIntegrationProcedure=trueOmniProcessElementIsActive=truereferences/best-practices.mdreferences/element-types.mdsf api request rest --method POST --body @file.jsonNameTypeSubTypeLanguageVersionNumberIsIntegrationProcedure=trueOmniProcessElementIsActive=true