You are here:
InsTrailingDocumentService:uploadContentDocuments
Add this service as remote properties within File and Image inputs to upload documents that satisfy requirements set up as placeholders for specific objects.
Class: InsTrailingDocumentService
Method: uploadContentDocuments
This service is supported on the following objects:
-
Quote
-
Policy (asset)
-
Claim
-
Contract
-
Case
How It Works
-
Takes the document(s) uploaded by the user.
-
Reads the list of content Ids uploaded in the OmniScript. The OmniScript creates an input JSON that includes the filename and size of the uploaded document(s).
-
Finds the placeholder record with the same
categoryNamethe user entered in the OmniScript. If the service doesn't find a placeholder record, it creates one with thatcategoryNameand creates a content document link with that placeholder record. -
Return the trailing document placeholder Ids and a list of content document link Ids created under the placeholder.
Remote Options
Option |
Description |
|---|---|
|
The Id of the object that the trailing documents will attach to. |
|
The name of the folder in the file hierarchy where this trailing file will be stored. |
Input JSON
This service gets an input JSON created by the OmniScript.
In this example, the input JSON includes the filename and file size. The name of the record array is the vlcFileKey, which pulls the name of the input object. The vlcFileKey = damageImages, which is the name of the Input component in a sample OmniScript.
{
"damageImages": [{
"filename": "accidentphoto1.jpg",
"size": 77337,
"data": "753039b5-d626-4413-8ad3-b0a7b06855b0"
}]
}Output JSON
The service returns Ids content document links and the trailing document placeholder (requirements for the documents). You can use these Ids to locate these documents in Vlocity.
{
"result": {
"contentDocLinkIds": [
"06Af4000004SBL1EAO"
],
"trailingDocPlaceholderId": "a51f4000000XocEAAS"
},
"error": "OK"
}

