---
schema_version: "1"
id: 8f89ff765be11bd46f4d287b3d27846e868a19a375985b2e5091edfb36556c01
title: Retrieval of Custom Component Data from an Omniscript (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_retrieve_custom_component_data_from_omniscript_vlocity.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_retrieve_custom_component_data_from_omniscript_vlocity.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: a27950f1c09c4b18ab513354c7a5bfe5529bdd151f9c4020462fc9eeb9b8743e
description: For the managed package runtime, use the omniGetSaveState() function to retrieve custom component data from an Omniscript.
products:
  - Omnistudio
release: "264"
---
# Retrieval of Custom Component Data from an Omniscript (Managed Package)

For the managed package runtime, use the `omniGetSaveState()` function to retrieve custom component data from an Omniscript.

![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).

`omniGetSaveState(key)`: The omniGetSaveState accepts a key as an optional argument. If a key is not sent, the key defaults to the name of the custom component. The key stores the data from the `omniSaveState()` function.

![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

With a key argument:

```
let key = 'customLwcKey';
const state = this.omniGetSaveState(key);
```

With no key:

```
// assumes the data is inside of the same custom component
const state = this.omniGetSaveState() 
```