Upload Files and Images in Omniscripts (Managed Package)

For the managed package runtime, to upload files in an Omniscript, add a File input element. To upload an image, add an Image input element. Details about uploads are added to the Files node of the Omniscript's Data JSON.

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

By default, files are uploaded to Salesforce Content Documents directly. To associate one or more Salesforce objects with the uploaded file, specify a comma-separated list of object Ids in the Content Parent Id field. In Salesforce, the uploaded files are listed in the sObject detail page's Content section.

To specify a Vlocity Open Interface to be run after the file or image is uploaded, set the Remote Action section's Remote Class and Remote Method fields. As input, the specified method receives a Map<String, Object> list containing the File data from the Data JSON. The options contain the remoteOptions and the filesMap, which contains the Ids of any Content documents that were created.

Beginning with Vlocity Insurance and Health Winter '20 and Vlocity CME Winter '20, LWC Omniscripts support the File and Image elements. By default, the LWC File and LWC Image elements accept a file size of up to 2GB.

Note
Note

In Angular Omniscripts, the standard file size attachment limit is 4 MB per remote action. For instructions on how to increase this limit, see File and Image Upload Size Limits in Omniscript (Managed Package). Note that file uploads over 5 MB consume an API call.

Omniscripts and Flexcards support all image file types by default. If set, the lightning-file-upload accept attribute filters file types in the user's file browser. If set, the Don't allow HTML uploads as attachments or document records security setting disallows .svg image files. See Lightning Web Component File Upload.