Can I Add an Edit Block Inside Another Edit Block in OmniScript?
This article is for Salesforce OmniStudio users building guided flows with OmniScript. You’re likely working with complex forms or repeatable records and wondering:
Can I put an Edit Block inside another Edit Block?
Yes — and this article explains when, how, and why you might do that. It covers what nesting Edit Blocks means, how they behave, and how to use them the right way in Salesforce.
What Is OmniScript and What Does an Edit Block Do?
OmniScript is a no-code tool in Salesforce’s OmniStudio platform. It’s used to create interactive flows like service requests, guided form wizards, and data entry processes.
An Edit Block is a visual component in OmniScript that displays and edits a list of records. It works like a table that can show multiple rows and lets users add, edit, or delete entries. It pulls data from Repeat elements or DataRaptor outputs.
Can You Nest an Edit Block Inside Another Edit Block?
Yes, you can add one Edit Block inside another.
This is possible when you want to show nested data structures. For example:
- A list of Orders (outer Edit Block), each with a list of Products (inner Edit Block)
- A group of Contacts (outer), each with their own Phone Numbers (inner)
This setup is used in parent-child or master-detail data use cases.
Both blocks must be connected to their part of the JSON data. The outer block handles the main list, and the inner block works inside each item of that list.
How Does Nested Edit Block Behavior Work?
In a nested setup, the outer Edit Block loops through the top-level records, such as a list of accounts or orders. Inside each of these records, the inner Edit Block is responsible for reading and displaying sub-records—like contacts under an account or items within an order.
Both Edit Blocks can include interactive controls. Users can see and use buttons like Add Row, Edit, or Delete at each level, making it easy to manage records in a structured way. Each block also supports specific actions, such as pre-filling fields, applying validation rules, or triggering API calls based on user input or system events.
Importantly, every block connects to its own section in the OmniScript JSON data model. This separation ensures that data collected from nested blocks stays organized and accurate during processing.
Best Practices When Using Nested Edit Blocks
To avoid layout or data issues:
- Make sure each Edit Block has a separate and correct data JSON path
- Use meaningful labels and titles to avoid user confusion
- Keep the UI light — too many nested levels can slow performance
- Test how nested records load and save across environments
- Use Preview mode to catch layout errors early
When Should You Use Nested Edit Blocks?
You should use this layout when:
- Your data has repeatable children inside repeatable parents
- You need to show related records clearly in the UI
- The user needs to edit multiple levels of data at once
Avoid nesting if your use case doesn’t need it. Sometimes, breaking up steps is easier to manage.
Final Advice: Use Nested Edit Blocks When It Makes Sense
Nested Edit Blocks work well in master-detail forms or hierarchical record management. But keep it clean. Use clear labels, test your data paths, and don’t go overboard with complexity.
If you’ve built a nested form in OmniScript, what worked best for you? Share your tips or feedback so others can build better experiences too.