OmniScript defines an OmniStudio guided process for sales, service, and other business workflows. Standard OmniStudio uses this metadata type for general OmniScripts. Discovery Framework is a specialized use that adds assessment-question associations and assessment lifecycle information to the process and its nested interaction elements.
Using this metadata type requires an Omnistudio license. Discovery Framework OmniScripts also require the Discovery Framework feature. Keep the metadata component's identity, process activation, nested element status, and generated Lightning web component identity separate: these are different settings, not interchangeable ways to identify or activate a script.
Key Elements
| Element | What the Element Controls |
|---|---|
fullName, name
|
fullName, inherited from Metadata, is the metadata component identity. name is the required OmniScript name. |
uniqueName, type, subType, language, versionNumber
|
Required process-identification fields. uniqueName follows Type_SubType_Language_VersionNumber, with underscore separators. Interpret it together with the individual fields. |
designerCustomizationType |
Identifies the designer customization. The documented value for Discovery Framework is discoveryframework. |
uniqueIndex |
The developer name of an associated assessment question, not its record ID. Relevant when designerCustomizationType is discoveryframework; also appears on nested elements. |
isActive |
Process activation; defaults to false. Nested elements have their own separate isActive setting. |
isWebCompEnabled |
Selects a web-component OmniScript rather than an Angular OmniScript when true. Defaults to false. |
elementTypeComponentMapping |
Maps an element type to a custom Lightning web component (LWC), replacing all elements of that type. |
omniProcessElements |
Contains OmniProcessElement definitions. Each element can contain recursive childElements. |
propertySetConfig |
Process-level or element-level configuration, which can contain serialized JSON carrying validation, visibility, remote-action, data-path, and save-for-later behavior. |
isOmniScriptEmbeddable |
Whether the process can be embedded in another OmniScript. Defaults to false; it does not identify an embedded child process. |
webComponentKey |
An internal unique key for generated LWCs, not a public component developer name. |
assessmentDefinitionMetadata |
Assessment definition information, including approval and revision timestamps, effective dates, purpose, display type, and intended performer. |
omniAssessmentTasks |
Assessment task definitions, available only with the Dynamic Assessment Access license enabled. Task status values are Completed, InProgress, IsDefined, and NotStarted; the default is IsDefined. |
isIntegrationProcedure, omniProcessType
|
isIntegrationProcedure indicates integration-procedure use and defaults to false. The exposed enumeration for required omniProcessType contains only OmniScript. |
requiredPermission, responseCacheType, isMetadataCacheDisabled
|
Integration-procedure-oriented execution permissions and caching. Documented response-cache values are session and Org. isMetadataCacheDisabled defaults to false. |
Behavior and Constraints
Identity and activation
uniqueName identifies the process using its type, subtype, language, and version. It has a different documented role from inherited fullName and from the internal generated-component key webComponentKey. Do not substitute one for another when interpreting a retrieved definition.
Process-level isActive determines whether the OmniScript is active. An active nested element does not activate its containing process, and a particular versionNumber does not substitute for the activation flag.
Element hierarchy and configuration
omniProcessElements contains the process's interaction elements. Within an element, childElements represents further nesting, while parentElementName and parentElementType describe parent associations. level describes vertical placement and sequenceNumber describes horizontal placement. These placement fields are not a documented execution-order contract.
Substantial behavior can reside inside propertySetConfig, a string containing serialized JSON, at both process and element level. Configuration can include required inputs, validation, conditional visibility, remote calls, request and response data paths, and save-for-later settings. Keys such as required, show, validationRequired, and allowSaveForLater are configuration keys, not separate top-level metadata elements. Comparing only the outer XML fields can miss business-rule or data-handling changes.
Remote-action configuration can name classes and methods through keys such as remoteClass and remoteMethod. It can also identify transformation bundles through preTransformBundle and postTransformBundle, and control data paths through keys such as sendJSONPath and responseJSONPath. The actual configuration values determine which external components are involved.
Rendering and embedding
Interpret customizations in the context of isWebCompEnabled. customHtmlTemplates contains Angular template definitions, while customJavaScript carries custom script code. A change to elementTypeComponentMapping can affect every element of a mapped type, rather than only one element instance.
isOmniScriptEmbeddable describes whether a process can be embedded. Within a nested element, embeddedOmniScriptKey identifies the embedded OmniScript by ID, not by developer name. The embeddability flag alone does not establish which child process is embedded.
Assessment lifecycle
Within assessmentDefinitionMetadata, approvalDateTime and lastRevisedDateTime describe approval and revision timestamps. effectiveFromDate and effectiveToDate describe the assessment definition's period of use; they are distinct from the OmniScript's isActive flag.
purpose describes the reason for the assessment. performerType identifies the type of user, role, or system qualified or intended to complete it; it is not a documented permission grant. Likewise, the task statuses in omniAssessmentTasks describe task state, not process activation.
Integration-procedure settings
The presence of integration-procedure-oriented fields does not make them universal OmniScript controls. requiredPermission describes permissions required to execute an integration procedure. responseCacheType describes that procedure's response cache, and isMetadataCacheDisabled controls its metadata cache. Do not treat these fields as general OmniScript authorization or caching settings.
Deployment and Retrieval
Metadata API components use the omniScript suffix and are stored in the omniScripts folder. In package.xml, use the metadata type name OmniScript. The type supports * in the manifest's members entry. See manifest-based deployment and retrieval.
Discovery Framework prerequisites
- Enable the Discovery Framework Metadata Enabled setting in the destination org.
- For
designerCustomizationTypeset todiscoveryframework, identify associated questions throughuniqueIndexin the metadata definition. Supply the assessment question's developer name, not its record ID. - Each associated question and its active version must exist in the destination org. Deployment fails if either the question or its active version is missing.
- Discovery Framework OmniScripts do not support IDX Workbench.
These assessment prerequisites apply to Discovery Framework OmniScripts, not to every general-purpose script in Standard OmniStudio.
Dependencies and deployment ordering
Embedded scripts, remote actions, transformation bundles, and custom LWC overrides can introduce dependencies that are visible only in nested elements or configuration strings. The presence of a configuration field does not identify a dependency by itself; its value does.
A reported Experience Cloud deployment failure was resolved by deploying the referenced OmniScript before the dependent Experience Cloud metadata. That finding supports dependency ordering for that case, not a blanket requirement to deploy all OmniScript metadata separately.
OmniStudio's export wizard has also been reported to offer related components for selection, including Integration Procedures and child OmniScripts. That is wizard-specific behavior; it does not establish automatic dependency inclusion in a Metadata API retrieval.
Relationships
Embedding connects one OmniScript to another through an ID stored on a nested element. An incoming action reference can also make an OmniScript a consumer-facing action in another configuration. These associations do not establish ownership or a universal deployment sequence.
References
-
OmniScript:embeddedOmniScriptKeyon nested elements identifies an embedded script by ID.
Referenced By
-
RecordActionDeployment:action.
Name-based and configuration associations: uniqueIndex associates a Discovery Framework element or process with an assessment question by developer name. Remote-action configuration can name classes, methods, and transformation bundles; component overrides can name custom LWCs. These associations are separate from the ID-based embedded-script reference.
OmniProcessElement, AssessmentDefinitionMetadata, and OmniAssessmentTaskMetadata describe structures contained within the OmniScript definition. Their inclusion does not make them separate OmniScript deployment identities.
Documentation Inconsistencies
-
Discovery Framework customization value: The documented usage rule specifies
discoveryframeworkfordesignerCustomizationType, but Salesforce's sample usesDiscovery Framework. The sample conflicts with the stated rule; do not treat the two spellings as documented equivalents. -
Namespace casing and version representation: Serialization definitions differ between
nameSpacewith a numericversionNumber, and Salesforce's field table, which usesnamespaceand describesversionNumberas a string. Element casing and numeric-versus-string representation should not be silently treated as interchangeable. -
Process-type enumeration: The description of
omniProcessTypementions both Integration Procedure and OmniScript, but its exposed enumeration lists onlyOmniScript. The broader description does not establish another allowed enumeration value.
Reported Issues
-
A language error can indicate a missing referenced script. In December 2023, an Experience Cloud deployment failed with
No omniscript language named 'English' foundeven though English was available. The reporter resolved it by deploying the referenced OmniScript before the dependent Experience Cloud metadata. This is a dependency-ordering finding for that deployment, not evidence that English was invalid or that all OmniScripts require separate deployments. Experience Cloud dependency report. - Duplicate parent and child element names can be worth checking when fields disappear only in the designer. An April 2024 report described fields that remained visible in preview and after activation but disappeared during design. Renaming one of two same-named elements, one in the parent script and one in the child, restored the fields. This is reported behavior, not a documented cross-script uniqueness rule or compiler guarantee. Designer field-disappearance report.
-
A Select element that becomes blank after activation may need different picklist-loading configuration or an Apex response shape. For a custom Apex-backed Select that worked while inactive, a March 2025 answer recommended enabling Fetch Picklist Values at Script Load, implementing
Callable, and returning option maps withnameandvaluekeys rather thanvalueandlabel. The answer was not reported as an accepted resolution. Activation-related Select recommendation. - Related components may need explicit selection during wizard export. A June 2024 answer reported that the OmniStudio export wizard lets users select or deselect related Integration Procedures, child OmniScripts, and other components, and that selected components are included on import. This report concerns the export/import wizard, not Metadata API dependency retrieval. Related-component export report.
Common Questions
Is OmniScript metadata only for Discovery Framework?
No. Standard OmniStudio uses OmniScript for general guided processes. Discovery Framework is a specialized use with additional feature, setting, and assessment-question prerequisites.
Why does deploying a Discovery Framework OmniScript fail when the script file is present?
The destination must have Discovery Framework Metadata Enabled enabled, and every associated assessment question and its active version must exist there. Question associations use developer names in uniqueIndex, not record IDs.
Does deploying an active element activate the whole OmniScript?
No. Nested element isActive and process-level isActive are separate. The process flag defaults to false; neither active elements nor the version number substitutes for it.
Why does an Experience Cloud deployment say no OmniScript language named English was found?
A reported cause was a referenced OmniScript that did not yet exist in the destination org. Deploying that script before the dependent Experience Cloud metadata resolved the reported failure.
Where are OmniScript validation rules and remote-action dependencies stored?
They can be inside process-level or element-level propertySetConfig JSON. Remote classes, methods, transformation bundles, and data paths can appear there, while custom LWC replacements can be named in component mappings. Inspecting only outer metadata fields can miss these changes.