---
schema_version: "1"
id: 87f84c435c78e9716bffa849435d7b5d3854b06519d2f3d747010e2d75fd057f
title: Embed an Omniscript in Another Omniscript (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_embed_an_omniscript_in_another_omniscript.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_embed_an_omniscript_in_another_omniscript.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 79546891b824ae29bfe766b44d6fa86db2161b992c1f50bcc77bbaae8eeccff0
description: 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.
products:
  - Omnistudio
release: "264"
---
# Embed an Omniscript in Another Omniscript (Managed Package)

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.

![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).

![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 A reusable Omniscript cannot contain another reusable Omniscript. Additionally, no element in a reusable Omniscript can have the same name as an element in the parent script. Reusable Omniscripts adopt the script configuration of the parent script.

![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.

1. In the Omniscript you want to reuse, click Setup, and check the **Reusable** checkbox.
2. Activate the reusable Omniscript.
3. Navigate to the Omniscript that will host the reusable Omniscript.
4. In your Omniscript's Build panel, expand the **Omniscripts** section.
5. Locate the reusable Omniscript and drag it into the canvas.
6. Preview your Omniscript to test the behavior.

What’s next: [Activate and Deactivate Embedded Omniscripts (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_activate_and_deactivate_embedded_omniscripts.htm&release=264.0.0&type=5 "For the managed package runtime, when you activate or deactivate an embedded script, Vlocity updates all activated parent scripts to reflect the change.").

- **[Embedding a Reusable Omniscript (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_embedding_a_reusable_omniscript.htm&release=264.0.0&type=5)**  
    For the managed package runtime, you can embed active reusable Omniscripts in other Omniscripts. For example, if you have an Omniscript that updates a case, you might want to add that reusable script component at the end of an Omniscript form used for troubleshooting.
- **[Activate and Deactivate Embedded Omniscripts (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_activate_and_deactivate_embedded_omniscripts.htm&release=264.0.0&type=5)**  
    For the managed package runtime, when you activate or deactivate an embedded script, Vlocity updates all activated parent scripts to reflect the change.
- **[Conditionally Run Embedded Omniscripts (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_conditionally_run_embedded_omniscripts.htm&release=264.0.0&type=5)**  
    For the managed package runtime, using the Conditional View property in the parent Omniscript, you can run an embedded Omniscript only under certain conditions.