---
schema_version: "1"
id: bcf7f7b9d8cbc6156792ebde40e68b93c7f1b59788a0dcb16efc8093fbad9513
title: Update of the Custom Lightning Web Component Element's Data (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_update_custom_lwc_element_data_vlocity.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_update_custom_lwc_element_data_vlocity.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 06fab496212955cbcec8c6b91a622af43fad422835a190f60309b4e6586f3b7e
description: For the managed package runtime, apply the response of a Custom LWC callout to the Custom LWC element by using the omniUpdateDataJson method.
products:
  - Omnistudio
release: "264"
---
# Update of the Custom Lightning Web Component Element's Data (Managed Package)

For the managed package runtime, apply the response of a Custom LWC callout to the Custom LWC element by using the `omniUpdateDataJson` method.

![Managed Package app icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/resources-global/_corporate/images/managedpackageicon.png) This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see [Omnistudio Help](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_standard.htm&language=en_US).

Method: `omniUpdateDataJson(input, aggregateOverride = false)`

Arguments:

- `input`: The first argument, input, accepts data in an object or primitive data type. Undefined is not accepted. The input data either replaces the current value or merges with the existing data depending on the setting of the second argument, `aggregateOverride`.
- `aggregateOverride`: The second argument, aggregrateOverride, controls how the data saves to the data JSON. It is an optional argument that is set to false by default. When set to false, the input data merges with the existing data. If the data is not an object it does not merge into the data JSON. When set to true, the input data overrides any existing data in the Custom LWC element.

![Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/images/icon_example.png)

Example

- Pass the `input` argument with the default `aggregrateOverride` behavior:
    
    ```
    let myData = "myvalue" // any kind of data that is a string, object, number, etc
    
    
    this.omniUpdateDataJson(this.myData);
    ```
- Pass the the `input` argument with the `aggregateOverride` argument set to **false**:
    
    ```
    // 1. first call to omniUpdateDataJson
    // input for omniUpdateDataJson when aggregateOverride = false
    {
      "prop1" : "data1" 
    }
    
    // 2. output of data JSON after the first call
    // 
    {
    "Step1" : {
       "CustomLWC1" : {
          "prop1": "data1"
       }
    }
    
    // 3. second call to omniUpdateDataJson
    // input for omniUpdateDataJson when aggregateOverride = false
    {
      "prop2" : "data2"
    }
    
    // 4. output of data JSON after the second call
    // notice that the value of CustomLWC1 contains both prop1 and prop2 
    // because the data is merged instead of replaced when aggregateOverride is set to false
    {
    "Step1" : {
       "CustomLWC1" : {
          "prop1": "data1",
          "prop2": "data2"
       }
    }
    ```