---
schema_version: "1"
id: 1c0538c8d6501416db3000bb62a5117fade8cc8a8a186e44fc6f783d655964fc
title: Conditionally Run Embedded Omniscripts (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_conditionally_run_embedded_omniscripts.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_conditionally_run_embedded_omniscripts.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: b87cfddd343d62c4b7a75a0626159299140ecfd48e9aeee957a9802c2227d64a
description: For the managed package runtime, using the Conditional View property in the parent Omniscript, you can run an embedded Omniscript only under certain conditions.
products:
  - Omnistudio
release: "264"
---
# Conditionally Run Embedded Omniscripts (Managed Package)

For the managed package runtime, using the Conditional View property in the parent Omniscript, you can run an embedded Omniscript only under certain conditions.

![Managed Package app icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/resources-global/_corporate/images/managedpackageicon.png) This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see [Omnistudio Help](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_standard.htm&language=en_US).

Learn how to embed an Omniscript in other Omniscripts. See [Embed an Omniscript in Another Omniscript (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_embed_an_omniscript_in_another_omniscript.htm&release=264.0.0&type=5 "For the managed package runtime, an Omniscript can be reused in one or more existing Omniscripts. Reusing Omniscripts enables you to build a variety of smaller scripts and then piece them together into one or more parent scripts. Embedded Omniscripts behave just like other Omniscript elements.").

1. From the Properties section of the Reusable Omniscript element of the parent script, expand **Conditional View**.
2. Click the **Show Element If True** link. The Edit Show Hide Rules window opens.
3. Create conditions as described in [Use the Conditional View Property to Conditionally Display Elements (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_conditionally_display_elements_using_the_conditional_view_property.htm&release=264.0.0&type=5 "For the managed package runtime, every step, block, or element supports at least one Conditional View. Conditional Views allow you to hide the element or the group of elements contained in a block or step based on certain conditions. Elements contain up to three conditional view options depending on the type of element. For example, an Action outside of a Step doesn’t have a Read-Only option since the action isn’t visible.").
4. Click **Save**.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/images/icon_note.png)

Note Elements in the embedded Omniscript run only if the conditions are true for those elements. If the conditions change while the embedded Omniscript is running, subsequent embedded Omniscript elements don't run. If the conditions are false for any embedded Omniscript elements, those elements are skipped.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/images/icon_note.png)

Note Make sure that each embedded Omniscript defines unique **Element Name** JSON nodes in its Set Values elements. If two child Omniscripts of the same parent set values for the same JSON nodes, only values from the first child Omniscript are set, even if both children run conditionally.