---
schema_version: "1"
id: 7174d64321d66c1574c4f1695cf5a7dd4ac679e81e20d2e355b5729d77e49849
title: Create Stateful LWC Omniscripts (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_create_stateful_lwc_omniscripts.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_create_stateful_lwc_omniscripts.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 172a55f60a3b9f3e6098b3b79e4e332be2e7bc9d38f2762592b6f73081654f28
description: For the managed package runtime, beginning with Vlocity Insurance and Health Spring '20, enable LWC Omniscripts to store the state of an Omniscript in the URL.
products:
  - Omnistudio
release: "264"
---
# Create Stateful LWC Omniscripts (Managed Package)

For the managed package runtime, beginning with Vlocity Insurance and Health Spring '20, enable LWC Omniscripts to store the state of an Omniscript in the URL.

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

Omniscripts store the state of an Omniscript in the URL by setting the c\_\_step parameter to the name of an active Step automatically. Direct users to a specific step in the Omniscript by setting the c\_\_Step parameter in the URL to a Step name in the Omniscript. Refreshing the page does not cause the Omniscript to begin at the first step because the Step is stored in the c\_\_step parameter. Include additional parameters to store the state of elements, insert data into the Omniscript's data JSON, prefill elements, or conditionally fire Omniscript Actions. Beginning with Vlocity Insurance and Health and Vlocity CME Summer '20, storing the state enables a user to navigate to previous or next steps using their browser's back and forward buttons.

1. In the Omniscript's Setup section, check **Enable SEO**. The Omniscript automatically adds the c\_\_step parameter to store the state of a Step.
    
    ![image](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/omnistudio_for_managed_packages/images/seo_url_step.png)
2. (Optional) Store the state of elements in your Omniscript, prefill elements, or pass data into the Omniscript's data JSON using Additional SEO URL Parameters.
    
    1. In the **Additional SEO URL Parameters** field, enter a parameter with the prefix c\_\_. When storing an element's state or prefilling an element, use the name of the element as your parameter. For example, the parameter for an element named **Text1** is c\_\_Text1.
    2. Set the parameter equal to an element in the Omniscript using merge field syntax or a static value. If there is more than one parameter present, separate the parameters with an & symbol. See [Access Omniscript Data JSON with Merge Fields (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_access_omniscript_data_json_with_merge_fields.htm&release=264.0.0&type=5 "For the managed package runtime, enable Omniscript elements and element properties to access data JSON using merge fields. A merge field is a variable that references the value of a JSON node. For example, if a JSON node is \"FirstName\": \"John\", then the merge field %FirstName% returns John."). For example, to store the state of the Text1 element, set the c\_\_Text1 parameter equal to %Text1%.
        
        ![image](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/omnistudio_for_managed_packages/images/owc_seo.png)
3. Activate the Omniscript, and add it to a Lightning or Community Page.
4. (Optional) Beginning with Vlocity Insurance and Health and Vlocity CME Summer '20, test the Omniscript's forward and backward navigation using a browser's forward and back buttons.