You are here:
Prefill Repeatable Blocks (Managed Package)
For the managed package runtime, prefill repeatable blocks with data by passing data to the block in an array format.
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
The data's root node name must match the name of the block element. The fields within each array instance of the data JSON node must match the name of an element within the block. Prefill data into repeatable blocks with Actions by returning data that matches the block's element name and the element's within the block using an array format.
Beginning with Vlocity Insurance and Health Winter '20 and Vlocity CME Winter '20, LWC Omniscripts support prefilling repeatable blocks.
Data JSON array format example:
"EditBlock1": [
{
"FirstName": "John",
"LastName": "Smith"
},
{
"FirstName": "Jane",
"LastName": "Smith"
}
]To map Data JSON to a Repeatable Block with a Set Values action:
- Add a Block or Edit Block to the Omniscript.
-
(Optional) When using a Block, check the Block's Repeat
checkbox property.
Note
Edit Blocks are inherently repeatable because they store entry values in an array format.
- Add Input elements to the Block.
- Add a Set Values Action to the Omniscript.
- In the Set Values Action, click Add New Value.
- In the Element Name field, enter the name of your block element.
- Click Edit as JSON in the Set Values Action element to edit the JSON directly.
-
In the elementValueMap JSON node, locate the block
element's JSON node, and enter an array of data. For example, to prefill two Text
input elements in an Edit Block element, add an array that maps to the elements in
the block.
Edit Block Element configuration:

JSON Array:
"EditBlock1": [ { "FirstName": "John", "LastName": "Smith" }, { "FirstName": "Jane", "LastName": "Smith" } ] -
Click Edit in Property Editor to convert back to the
default view of the Set Values Action.

-
Preview the Omniscript to view the nested data in the Omniscript's data JSON.


