---
schema_version: "1"
id: 7c1f820226484cdf5dd9d2bd906aaa6cb88ed5dd1b2476dea5965fab5d1eed17
title: Save and Resume an Omniscript
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_save_and_resume_an_omniscript_9465.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_save_and_resume_an_omniscript_9465.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 3b27459c1350b85818f39fd70f9be0398594178ef26924509cf496c79326b45b
description: Enable users to save and resume Omniscripts by using Omniscript's Save Options property. Users can bookmark links, launch a saved instance from an object page, or email the link. Configure custom URLs to resume saved Omniscript instances in different domains. For example, a customer can initiate an Omniscript inside of an Experience Cloud page, and then a customer service representative can resume the Omniscript inside of the Service Console.
products:
  - Omnistudio
release: "264"
---
# Save and Resume an Omniscript

Enable users to save and resume Omniscripts by using Omniscript's Save Options property. Users can bookmark links, launch a saved instance from an object page, or email the link. Configure custom URLs to resume saved Omniscript instances in different domains. For example, a customer can initiate an Omniscript inside of an Experience Cloud page, and then a customer service representative can resume the Omniscript inside of the Service Console.

- **[Restrictions and Limitations for Save and Resume](https://help.salesforce.com/s/articleView?id=xcloud.os_save_and_resume_an_omniscript_9465.htm&release=264.0.0&type=5)**  
    Restrictions and limitations exist for saving and resuming Omniscripts. Some configurations don't support save and resume. Some users don't have permissions to perform save and resume, and some users require certain permissions to use the feature.
- **[Configure Save Options](https://help.salesforce.com/s/articleView?id=xcloud.os_save_and_resume_an_omniscript_9465.htm&release=264.0.0&type=5)**  
    Enable your users to save and resume Omniscripts by configuring the save for later functionality. To save only a step in the Omniscript, select or deselect **Allow save for later** in the Step properties.
- **[Map Saved Instance URLs to Custom Fields](https://help.salesforce.com/s/articleView?id=xcloud.os_save_and_resume_an_omniscript_9465.htm&release=264.0.0&type=5)**  
    Configure where a saved Omniscript instance launches in Salesforce by mapping URLs to custom fields on the Saved Omniscript object.
- **[Customize the Save for Later Error Message](https://help.salesforce.com/s/articleView?id=xcloud.os_save_and_resume_an_omniscript_9465.htm&release=264.0.0&type=5)**  
    Create custom error messages with Omniscript's error handling framework.
- **[Conditionally Display Elements in Saved Omniscripts for Different User Profiles](https://help.salesforce.com/s/articleView?id=xcloud.os_save_and_resume_an_omniscript_9465.htm&release=264.0.0&type=5)**  
    Control which Omniscript elements display to different profile users in a saved Omniscript instance by using conditions.
- **[View In-Progress and Completed Omniscripts](https://help.salesforce.com/s/articleView?id=xcloud.os_view_in_progress_and_completed_omniscripts_9722.htm&release=264.0.0&type=5)**  
    Enable users to view in-progress Omniscripts that have been saved for later by using Visualforce pages and the Vlocity Omniscript Workbench.
- **[Specify a Resume Link in a Visualforce Page](https://help.salesforce.com/s/articleView?id=xcloud.os_save_and_resume_an_omniscript_9465.htm&release=264.0.0&type=5)**  
    Users can create a VisualForce page that specifies the custom URL used for Save and Resume.
- **[Share Omniscript Saved Session Records](https://help.salesforce.com/s/articleView?id=xcloud.os_save_and_resume_an_omniscript_9465.htm&release=264.0.0&type=5)**  
    As an authenticated standard or admin user, share Omniscript Saved Session records directly from the record page.

## Restrictions and Limitations for Save and Resume

Restrictions and limitations exist for saving and resuming Omniscripts. Some configurations don't support save and resume. Some users don't have permissions to perform save and resume, and some users require certain permissions to use the feature.

These scenarios don't support save for later:

- _Embedded Omniscripts._ When a custom Lightning Web Component (LWC) includes an Omniscript, the outer Omniscript does not save the inner Omniscript.
- _Child (reusable) Omniscripts._ When a parent Omniscript includes a child Omniscript, Omnistudio copies only the steps and actions from the child Omniscript to the parent Omniscript. All configurations, such as save for later and custom styles, are based on the parent Omniscript. They are not copied from the child Omniscript to the parent Omniscript.
- _Set error._ Because set error is not saved in the JSON data, it is not saved in the Saved Session (**OmniScriptSavedSession**) object.
- _Email options._ When your Omniscript is saved for later, you see an option to email the link to yourself. This option only works when you have an email client installed on your device. It doesn't work on web-based email clients. For instance, if your device has, say, Microsoft Outlook installed and configured with your email, the button works as expected. However, if you use Google Mail via a web browser, this option won't work for you.

The save for later feature requires specific permissions in these cases:

- If a user updates an Omniscript and saves it for later, another user can’t access the saved Omniscript unless that user is granted the necessary permission.
- Users must have access to the **File Based Omniscript Name** field of an Omniscript Saved Session object to use save for later. Without this access, they can't save an Omniscript for later or resume an Omniscript that was previously saved for later.

## Configure Save Options

Enable your users to save and resume Omniscripts by configuring the save for later functionality. To save only a step in the Omniscript, select or deselect **Allow save for later** in the Step properties.

1. From the Omniscript's Setup panel, expand the Save Options section.
2. Select **Allow save for later** to enable the feature.
3. If needed, save the Omniscript automatically when users click Next.
    
    Users see an auto save message when they click Next.
4. In the **Save Name Template** field, enter a template name format with which to save the Omniscript.
    
    This field supports merge fields. For example, `%LastName%, %FirstName% - Application`. If the field is blank, the default is `Saved-Omniscript Name-RowId`.
5. Enter the number of days for which the Omniscript is to remain usable before it expires.
    
    If a user attempts to resume the Omniscript after it expires, the Omniscript restarts.
6. Set the object ID to attach the saved Omniscript to a record.
    
    The default value is `%ContextId%`. This field supports merge fields. For more information, see [Access Omniscript Data JSON with Merge Fields](https://help.salesforce.com/s/articleView?id=xcloud.os_access_omniscript_data_json_with_merge_fields_22053.htm&release=264.0.0&type=5 "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.").
7. If needed, enable users to merge data into an updated Omniscript by selecting **Merge Saved Data JSON into updated Omniscript**.
    
    If **Merge Saved Data JSON into updated Omniscript** is selected, the Omniscript merges the data from the saved instance into the updated Omniscript when a saved instance launches. However, if you used the Set Value action in a step of your Omniscript, that step takes precedence over the saved value, and Omnistudio doesn’t retain any previously saved value.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_note.png)
    
    Note
    
    If an Omniscript is deactivated or activated, a new instance of the Omniscript is always created. Multiple instances of forms are created, and saved instances are no longer available. Selecting **Merge Saved Data JSON into updated Omniscript** prefills a form of the new instance of the Omniscript with saved data.
    
    To use saved fields in the new version of the Omniscript, first select either **Merge Saved Data JSON into updated Omniscript** or set the **ContextId** field. Then ensure that the value of the **Save Object Id** field is the same in both Omniscripts. These steps map JSON data from the saved version of the Omniscript into the new version of the Omniscript that is created.
8. In the Save URL Patterns section, map the Omniscript URL to a custom field in an object. See "Map Saved Instance URLs to Custom Fields."
9. To enable **Allow save for later** on a per-step basis:
    
    1. From a Step element, expand the Save Options section.
    2. To enable or disable save for later on the step, select or deselect **Allow save for later**.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_note.png)
    
    Note When a saved session expires, the Omniscript restarts from scratch and no saved data loads. Set the expiration period based on how long users are likely to need between sessions. You can add an expiry period in your Omniscript's Setup panel via the Expire in Days field.

## Map Saved Instance URLs to Custom Fields

Configure where a saved Omniscript instance launches in Salesforce by mapping URLs to custom fields on the Saved Omniscript object.

Configure **Save URL Patterns** to control the URL format that maps to any custom fields. You must create a custom field in the Saved Omniscript object for every additional URL that you save to an Omniscript instance.

1. From Salesforce Setup, open the **Object Manager**, and select the **Saved Omniscript** object.
2. Add a new custom field that accepts URLs.
3. Copy the field's **API name**.
4. In the **Save URL Patterns** section, in the **Field API Name** field, paste the field API name.
5. In the **URL Pattern** field, enter a URL using these syntax patterns:
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_note.png)
    
    Note Omniscripts must use the LWC Omniscript Wrapper URL patterns to launch saved Omniscript instance URLs.
    
    - Experience Cloud Pages:
        
        Using the Experience Cloud LWC Omniscript Wrapper URL pattern, add the parameter c\_\_instanceId , and set it to {0}. Set the c\_\_target parameter to {1}.
        
        ```
        https://myDomain.force.com/CommunityName/s/CommunityPage/c__layout=lightning&c__instanceId={0}&c__target={1}
                             
        ```
    - Lightning Pages:
        
        Using the Lightning LWC Omniscript Wrapper URL pattern, add the parameter c\_\_instanceId and set it to {0}. Set the c\_\_target parameter to {1}.
        
        ```
        https://myDomain.force.com/lightning/cmp/namespace__vlocityLWCOmniWrapper?c__layout=lightning&c__instanceId={0}&c__target={1}
        ```
6. Test the Omniscript by taking these steps:
    
    1. Save and activate the Omniscript.
    2. Preview the Omniscript and save the instance.
    3. Copy the saved Omniscript link.
    4. Paste the link into your browser to view the saved instance.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_note.png)
    
    Note If the link doesn't work, make sure your URL format and any Experience Cloud page names are correct.

## Customize the Save for Later Error Message

Create custom error messages with Omniscript's error handling framework.

When multiple users are updating the same saved Omniscript instance, the first user that saves the Omniscript becomes the owner of that instance. The user that is unable to save the Omniscript receives an error that informs them that they need to refresh the Omniscript. Customize the error message users receive by using the **Error Messages** property. For more information, see [Customize Omniscript Error Messages](https://help.salesforce.com/s/articleView?id=xcloud.os_customize_omniscript_error_messages_10378.htm&release=264.0.0&type=5 "The error message handler enables you to replace default error messages from remote apex calls with more user-friendly error messages when errors occur in Omniscript. The Error Messages handler property is available in File elements, Image elements, all Action elements, and Setup.").

1. In the Omniscript's Setup panel, expand the **Error Messages** section.
2. Leave the **Path** value blank. The error message is in the Omniscript's root path.
3. In the **Custom Error Messages** section, leave the **Path** value blank. The error message is in the Omniscript's root path.
4. In the **Value** field, enter this default error message text: This saved Omniscript has been updated since resuming. To see the latest updates, exit and resume the saved Omniscript again.
5. In the **Message** field, enter a custom error message.
6. Save and activate the Omniscript.
7. Test the Omniscript by taking these steps:
    1. Open the Omniscript and save an instance.
    2. Resume the saved Omniscript instance in two separate tabs.
    3. In one of the instances, add additional information and save the Omniscript.
    4. In the other instance, try to add information and save the instance to view the custom error.

## Conditionally Display Elements in Saved Omniscripts for Different User Profiles

Control which Omniscript elements display to different profile users in a saved Omniscript instance by using conditions.

When the Omniscript resumes, it uses the profile of the current user. Conditions on elements can determine whether the user has access to the element. For example, an agent may see data that does not display to customers.

1. In an element's Conditional View property, click **Add Condition**.
2. In the field, enter userProfile.
3. In the value field, enter the name of a user profile. For example, System Administrator.

## Specify a Resume Link in a Visualforce Page

Users can create a VisualForce page that specifies the custom URL used for Save and Resume.

Create a new Visual ForcePage and enter this code. Replace the FieldAPIName variable with the Field API Name specified under the **Save URL Patterns**.

```
<apex:page standardStylesheets="false" showHeader="true" standardController="Account" extensions="VFPageControllerBase" sidebar="true" docType="html-5.0" >
<c:OmniScriptInstanceComponent standardController="{!stdController}" resumeFieldName="FieldAPIName"/>
</apex:page>
```

## Share Omniscript Saved Session Records

As an authenticated standard or admin user, share Omniscript Saved Session records directly from the record page.

With the sharing option on the Omniscript Saved Sessions page, you can directly provide standard and Experience Cloud users with read or read/write permissions for a specific record.

1. From App Launcher, find and select **Omniscript Saved Sessions**.
2. Open the saved session that you want to share.
3. From the dropdown menu on the page, next to New Case, select **Sharing**.
4. From the resulting window, search for a user, user role, or any option from the available list.
5. Select a value for Omniscript Saved Session Access Level.
6. Save your changes.