Signature

global static void processDocument(
  List<Types.ProcessDocumentPayload> payloads,
  String runAs
)
Parameters
ParameterDescription
payloads requiredA list of Types.ProcessDocumentPayload, one entry per document to process.
runAs
String
requiredUsername to attribute the operation to; usually a static value such as 'integrationUser'.

Return Type

void — after CloudFiles finishes processing the document it fires the Document Processed platform event.

Example

List<cldfs.Types.ProcessDocumentPayload> payloads = new List<cldfs.Types.ProcessDocumentPayload>{
  new cldfs.Types.ProcessDocumentPayload(
    'fileId',
    'driveId',
    'library',
    'context'
  )
};

cldfs.Client.processDocument(payloads,'integrationUser');
TestingUse ClientFactory with default mock values to get coverage without callouts. See How to get test coverage of code that uses Client methods.