Map Saved Instance URLs to Custom Fields (Managed Package)

For the managed package runtime, configure where a saved Omniscript instance launches in Salesforce by mapping URLs to custom fields on the Saved Omniscript object.

Managed Package app icon This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.

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.

Before You Begin

When using Community pages to launch saved Omniscript instances, add the Vlocity LWC Omniscript Wrapper component to the Community page.

The URLs saved to the object require different syntax depending on the type of Omniscript and where the Omniscript launches.

  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:

    LWC Omniscripts:

    Note
    Note

    LWC Omniscripts must use the LWC Omniscript Wrapper URL patterns to launch saved Omniscript instance URLs.

    • Community Pages:

      Using the Community 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}
                           
      Note
      Note

      The Community page that opens the saved instance must have the LWC Omniscript Wrapper component present.

    • 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}
                           

    Angular Omniscripts:

    Enter the Resume link for the Omniscript, replacing the Instance Id with {0}:

    https://myDomain.force.com/apex/OmniScriptUniversalPage?layout=lightning#/OS/{0}/scriptState/saveAndResume/true/true
  6. (Optional) 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. If the link does not work, ensure your URL format and any Community page names are correct.