You are here:
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
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
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
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
Create custom error messages with Omniscript's error handling framework. - 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. - View In-Progress and Completed Omniscripts
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
Users can create a VisualForce page that specifies the custom URL used for Save and Resume. - Share Omniscript Saved Session Records
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.
Note Due to a limitation, Save for Later doesn't work for edit scenarios between users accessing a form via Experience Cloud sites, even when the requisite permissions are assigned. -
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.
- From the Omniscript's Setup panel, expand the Save Options section.
- Select Allow save for later to enable the feature.
-
If needed, save the Omniscript automatically when users click Next.
Users see an auto save message when they click Next.
-
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 isSaved-Omniscript Name-RowId. -
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.
-
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. -
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.
NoteIf 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.
- 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."
-
To enable Allow save for later on a per-step basis:
- From a Step element, expand the Save Options section.
- To enable or disable save for later on the step, select or deselect Allow save for later.
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.
- From Salesforce Setup, open the Object Manager, and select the Saved Omniscript object.
- Add a new custom field that accepts URLs.
- Copy the field's API name.
- In the Save URL Patterns section, in the Field API Name field, paste the field API name.
-
In the URL Pattern field, enter a URL using these syntax
patterns:
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}
-
-
Test the Omniscript by taking these steps:
- Save and activate the Omniscript.
- Preview the Omniscript and save the instance.
- Copy the saved Omniscript link.
- Paste the link into your browser to view the saved instance.
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.
- In the Omniscript's Setup panel, expand the Error Messages section.
- Leave the Path value blank. The error message is in the Omniscript's root path.
- In the Custom Error Messages section, leave the Path value blank. The error message is in the Omniscript's root path.
- 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.
- In the Message field, enter a custom error message.
- Save and activate the Omniscript.
-
Test the Omniscript by taking these steps:
- Open the Omniscript and save an instance.
- Resume the saved Omniscript instance in two separate tabs.
- In one of the instances, add additional information and save the Omniscript.
- 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.
- In an element's Conditional View property, click Add Condition.
- In the field, enter userProfile.
- 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>

