How To Use ListAction In Integration Procedures

In OmniStudio (Vlocity) Salesforce, Integration Procedures (IP) are used to process data efficiently without writing Apex code. One of the most powerful elements inside an Integration Procedure is ListAction. ListAction allows you to loop through a list of records and perform actions on each item individually.

In this article, we will understand what ListAction is, why it is used, and how to configure it step by step inside an Integration Procedure.

What Is ListAction in Integration Procedure?

ListAction is a looping mechanism in an Integration Procedure. It iterates over an array or list of data and executes child elements (like SetValues, DataRaptor, Integration Action, or Response Action) for each item in the list.

It works similar to a FOR LOOP in Apex but is fully declarative.

Why Use ListAction?

ListAction is commonly used when:

  • You receive multiple records from a DataRaptor or Integration Action

  • You need to process each record individually

  • You want to perform calculations, transformations, or updates on each list item

  • You need to loop data before sending it to OmniScript or FlexCard

Common Use Cases of ListAction

  • Loop through a list of Accounts or Cases

  • Perform calculations on each record

  • Build a transformed response structure

  • Update multiple records using DataRaptor Post

  • Prepare formatted output for OmniScript or FlexCard

Basic Structure of ListAction

A ListAction has three key parts:

  1. Input List

  2. Loop Processing Elements

  3. Output List

All actions inside ListAction run once per item in the list.

Step 1: Create an Integration Procedure

  1. Go to OmniStudio Designer

  2. Select Integration Procedures

  3. Click New

  4. Provide:

    • Name

    • Type (Reusable or not)

  5. Save the Integration Procedure

Integration Procedure
In List Action

Step 2: Get Data That Returns a List

Before using ListAction, you need a list input.

Common sources:

  • DataRaptor Extract

  • Integration Action

  • SetValues (array creation)

Example:
A DataRaptor Extract that returns a list of Accounts:

Accounts[]

 

This list will be used as input for ListAction.

Integration Procedure
In Response Action

On the preview tab. 

Integration Procedure

Step 3: Add ListAction to Integration Procedure

  1. Drag ListAction into the Structure panel

     

  2. Place it after the step that returns list data

     

Rename it (example: Loop_Accounts)

Integration Procedure
In List Action

On the preview tab 

Integration Procedure
On preview tab

Step 4: Configure ListAction Properties

List Input Path

Specify the JSON path of the list:

Accounts

 

This tells the Integration Procedure which list to loop through.

Loop Variable

Define a variable name to represent current record:

CurrentAccount

 

This variable holds one item at a time during iteration.

Integration Procedure
Advanced Merge = true

Well Done!!! We got the result in preview tab 

Integration Procedure
On preview tab

Step 5: Add Child Actions Inside ListAction

Now add elements inside the ListAction. These will execute for each list item.

Commonly used actions:

SetValues
  • Perform calculations

  • Merge fields

  • Rename attributes

Example:

CurrentAccount.Name + ‘ – Processed’

 

DataRaptor Post

  • Update records

  • Insert child records

Example:
Update Account Status for each record.

Integration Action

  • Call external APIs per record

  • Send individual payloads

Step 6: Store Output Using ListAction Output

To collect results from each iteration:

  1. Enable Output List

  2. Define Output Path:

ProcessedAccounts

 

Each iteration’s result will be added to this output list.

Step 7: Use Response Action to Send Data

To return data to OmniScript or FlexCard:

  1. Add Response Action

  2. Enable Return Full Data JSON (optional)

  3. Or return specific node:

ProcessedAccounts

 

This makes the processed list available to the caller.

Example Scenario

Scenario:

You fetch a list of Accounts and want to:

  • Append a label to Account Name

  • Return the modified list to OmniScript

Flow:

  1. DataRaptor Extract → Accounts[]

  2. ListAction → Loop Accounts

  3. SetValues → Modify Name

  4. Response Action → Send ProcessedAccounts

Best Practices for Using ListAction

  • Always validate input list path

  • Keep ListAction logic lightweight

  • Avoid unnecessary nesting

  • Use meaningful loop variable names

  • Return only required data for performance

Common Mistakes to Avoid

  • Incorrect List Input Path

  • Using wrong JSON structure

  • Forgetting to store output

  • Returning too much data in Response Action

  • Not testing in Preview tab

Testing ListAction

  1. Open Integration Procedure

  2. Go to Preview

  3. Provide sample JSON input

  4. Click Execute

  5. Verify loop output and response

Conclusion

ListAction is a powerful feature in Integration Procedures that allows you to process arrays efficiently without Apex. It plays a critical role in data transformation, looping logic, and preparing structured responses for OmniScripts and FlexCards.

Mastering ListAction helps you build scalable, high-performance OmniStudio solutions with clean and reusable logic.

Scroll to Top