Edit Block is one of the most powerful components in OmniScript. It allows users to view, add, and edit multiple records directly on the screen without navigating away or using separate load actions.
In this post, we will learn how to use Edit Block in OmniScript Vlocity, how it works internally, and how to configure it step by step.
What Is an Edit Block in OmniScript?
An Edit Block enables users to add or edit multiple entries in a single array.
It is commonly used when you want to edit related records like:
- Account Contacts
- Related Addresses
- Custom child records
Edit Blocks are repeatable by default, meaning they can display multiple rows of data dynamically.
Edit Blocks also support prefilling data, which means records can be fetched first and then edited directly on the UI.
When Should You Use an Edit Block?
Use an Edit Block when:
- You need inline editing of records
- You want to update records without a Load DataRaptor
- You want a cleaner, faster user experience
- You are working with child records in an array format
Step 1: Create OmniScript and Fetch Data
To edit records, users must first see the records.
Step 1.1: Create an OmniScript
- Create a new OmniScript
- Activate it after configuration
Step 1.2: Fetch Data Using DataRaptor Extract
- Add an Extract Action
- Use a DataRaptor Extract to fetch records
- Ensure the response is returned as an array
This extracted data will later be bound to the Edit Block.


Step 2: Add and Configure the Edit Block
Step 2.1: Add Edit Block
- Drag an Edit Block into the OmniScript canvas
Step 2.2: Bind Edit Block to Extract Data
- Edit Block Name must match the Extract JSON Path
- This binding is mandatory for data to display correctly
Example:
- Extract JSON Path: Contacts
- Edit Block Name: Contacts
This is how OmniScript knows which data belongs to the Edit Block.


Step 3: Add Editable Fields Inside Edit Block
Inside the Edit Block:
- Add Text, Input, or other form elements
- Each element name must exactly match the field name coming from DataRaptor
Example:
- Field from DataRaptor: FirstName
- Element Name: FirstName
This name matching binds data automatically.

Step 4: Configure Remote Action for Edit Block
To update records without a Load Action, a Remote Action is required.
Step 4.1: Add Remote Action Inside Edit Block
- Drag a Remote Action inside the Edit Block
Step 4.2: Configure Remote Action Properties
- Remote Class: DefaultOmniScriptEditBlock
- Remote Method: edit
This standard Salesforce class handles record updates automatically.
Step 5: Configure SObject Mapping
Correct mapping ensures records are updated in Salesforce.
Required Configurations:
- Set SObject Name
- Map fields correctly in SObject Field Mappings
- Map:
- Edit Block element Id → SObject field Id
Important rules:
- Id field must be:
- Marked as Duplicate Key
- Hidden from the UI
This ensures correct record identification.
Step 6: Enable Edit Functionality
In Edit Block Properties:
- Enable Allow Edit
- Set Edit Label (for example: “Edit”)
The Edit Label must match the Remote Action Name exactly.
This connects the UI edit button with the backend update logic.
Step 7: Configure Elements Inside Edit Block
- Select all elements that should be editable
- Mark them under Elements Inside Edit Block
- This controls what fields appear when editing starts
Step 8: Test the Edit Block
Preview the OmniScript:
- Records appear in repeatable rows
- Click Edit
- Modify values
- Save updates
Changes are saved directly to Salesforce without using a Load DataRaptor.
Key Points to Remember
- Edit Block Name must match Extract JSON Path
- Field names must match exactly
- Remote Action is mandatory
- Id field mapping is required
- No Load Action is needed
Common Mistakes to Avoid
- Mismatched JSON Path and Edit Block Name
- Forgetting to add Remote Action
- Incorrect Id mapping
- Not enabling Allow Edit
- Using Load Action unnecessarily
Conclusion
Edit Blocks in OmniScript provide a powerful and efficient way to manage multiple records directly on the UI. When configured correctly, they eliminate the need for additional load actions and significantly improve performance and user experience.
Edit Blocks are especially useful in complex OmniStudio implementations where inline record updates are required.

