You are here:
Upload Files and Images in Omniscripts
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.
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.
By default, File and Image elements accept a file size of up to 2GB.
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.
Add a File or Image to Omniscript
Add and configure a File or Image element to enable the upload of files and images. By default, the File and Image elements accept a file size of up to 2GB.
The Image and File elements don't work in preview because they use SFDC components. When Image and File elements are required in a Step, the Preview cannot advance past the Step. Marking File and Image elements as Required only before activating the Omniscript is recommended.
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.
- From the elements panel, drag a File or Image element to the canvas.
- Enter an a content parent object ID, or comma-separated list of object IDs, to attach the Content Document to a parent record. When left blank, the Content Document does not attach to a parent record.
- When configuring the Image element, allow uploads of multiple images, if required.
-
Use one of the JSON node names from Image and File to apply a condition to another
element:
"yourFileElementName": [ { "data": "0693g000000T1ZFAA0", "filename": "isolated-on-png.png", "vId": "0683g000000T11iAAC", "size": 8234 } ]

