OmniScript is a powerful declarative tool in Salesforce Industries (Vlocity) that helps create guided user experiences. One of its most useful features is the ability to embed one OmniScript inside another OmniScript, making processes reusable, modular, and easier to maintain.
In this article, we will explore how to embed an OmniScript in another OmniScript, understand the concept of Reusable OmniScripts, and walk through the step-by-step implementation.
What Is a Reusable OmniScript?
A Reusable OmniScript is an OmniScript that is designed to be called or embedded inside another OmniScript. Instead of building the same logic repeatedly, you can create one OmniScript and reuse it across multiple parent OmniScripts.
Benefits of Reusable OmniScripts
- Reduces duplicate development
- Improves consistency across processes
- Simplifies maintenance and updates
- Speeds up OmniScript development
Once an OmniScript is marked as reusable, it becomes callable from other OmniScripts.
Use Case for Embedding an OmniScript
Embedding OmniScripts is useful when:
- You have common data collection sections (e.g., address, contact info)
- You want to reuse validation or business logic
- Multiple OmniScripts follow the same sub-process
- You want a modular and scalable OmniScript design
Step 1: Create a Reusable OmniScript
The first step is to create the OmniScript that you want to reuse.
Steps to Create a Reusable OmniScript
- Go to Setup in Salesforce.
- Search for OmniScript.
- Click New OmniScript.
- Fill in required details such as:
- Type
- Subtype
- Language
- In the Setup section, check the Reusable checkbox.
- Save the OmniScript.

Step 2: Design the Reusable OmniScript
After creating the reusable OmniScript, design its structure.
Best Practices
- Add a Text Block, Input Field, or any component to identify the OmniScript
- Keep it focused on a single responsibility
- Avoid unnecessary navigation elements
For example, you may add a Text Block with a value like:
“This is Reusable/Child OmniScript”
This helps identify the reusable OmniScript when it is embedded.

Step 3: Activate the Reusable OmniScript
Activation is mandatory before the OmniScript can be used elsewhere.
Activation Steps
- Go to the Build section of the reusable OmniScript.
- Validate the OmniScript to ensure there are no errors.
- Click Activate.
Once activated, the OmniScript becomes available to embed in a parent OmniScript

Step 4: Create the Parent OmniScript
Now, create the OmniScript where you want to embed the reusable OmniScript.
Steps to Create Parent OmniScript
- Go to Setup → OmniScript.
- Click New OmniScript.
- Enter the required details.
- Save and open the OmniScript in Build mode.
This OmniScript will act as the Parent OmniScript.
Step 5: Embed the Reusable OmniScript
This is the key step where the reusable OmniScript is embedded into the parent OmniScript.
Steps to Embed OmniScript
- Open the Build section of the Parent OmniScript.
- Scroll down to the Reusable OmniScript section.
- Locate the reusable OmniScript by its Name.
- Drag and drop the reusable OmniScript onto the canvas.
Once dropped, the child OmniScript becomes part of the parent OmniScript flow.
Step 6: Map and Use Data from Child OmniScript
When a reusable OmniScript is embedded:
- All data collected in the child OmniScript becomes available to the parent OmniScript
- Data is automatically passed up to the parent data JSON
You can now:
- Display child OmniScript values in the parent OmniScript
- Use the data for integration procedures
- Apply validations or conditions based on child data
Step 7: Activate and Preview the Parent OmniScript
After embedding the reusable OmniScript:
- Validate the Parent OmniScript.
- Click Activate.
- Click Preview.
In preview mode, you will see the embedded OmniScript content displayed inside the parent OmniScript.
For example, if the child OmniScript contains the text:
“This is Reusable/Child OmniScript”
It will appear within the parent OmniScript, confirming that embedding was successful.
Key Points to Remember
- Reusable OmniScript must be activated before embedding
- Child OmniScript data automatically flows to the parent
- Keep reusable OmniScripts simple and focused
- Avoid navigation elements like Next/Previous in child OmniScripts
- Test both child and parent OmniScripts thoroughly
Conclusion
Embedding one OmniScript inside another OmniScript is a powerful feature that promotes reusability, modular design, and efficiency in Salesforce Industries. By creating reusable OmniScripts and embedding them into parent OmniScripts, you can build scalable guided processes with minimal effort.
This approach not only saves development time but also ensures consistency across business workflows. With proper design and activation, reusable OmniScripts become an essential building block for advanced OmniScript implementations.
