top of page
OmniStudioFactBg.png
Writer's picturePuja Kumari

File Element in an Omniscript

Updated: Apr 19, 2023

We can add and configure a File or Image element in an Omniscript to enable the upload of files and images. By default, the File and Image elements accept a file size of up to 2GB.


Let's see how to configure a File element in an Omniscript:


1. From OmniScript, under Available Components, drag the File or Image element from the Inputs section into a Step in the Structure panel.



2. In the Content Parent Id field, enter an object Id, or comma-separated list of object ids such that the uploaded file will be attached to those records. When left blank, the Content Document does not attach to a parent record.



3. Once the file is uploaded a content document and a content version records will be created in salesforce and the below JSON structure will be framed where the “data” node will hold the id of the Content Document and “vId” will hold the id of the Content Version:



4. Now suppose we want this file to be linked with the case, and the case record will get created after we upload the file.

So to link the file with the new case record we have to create the Content Document Link record.

Here, the LinkedEntityId will be the newly created Case id and ContentDocumentId will be the uploaded file’s Content Document Id which we will get from the “data” node under the uploaded file’s JSON explained in point 3 above.


References:

3,937 views3 comments

Recent Posts

See All

3 commenti


Ospite
23 ago

Is it possible to prefill File Element in Omniscript?

Mi piace

Ospite
17 gen

does it require an apex class for document to be uploaded ?

Modificato
Mi piace

Sonali Dubey
Sonali Dubey
21 apr 2023

What if we need to upload multiple documents in a new case?

Mi piace
bottom of page