Platform Events
All Event Types

Resource Updated

Overview

This event is published when metadata Property values of a Resource (file or folder) is updated or changed from Salesforce using CloudFiles.

For example, updating Sharepoint Resource's Metadata column value through CloudFiles widget.

Document image


How To Use This Event ?

To use CloudFiles Platform Events, you must first setup your platform event triggered flow as shown in the CloudFiles Event Handler Flow Template. This article will introduce you to the concepts of the event type in the CloudFiles Event Object as well as event details that are returned by the Get Event Details flow action.

Once you are familiar with these, you will understand how to interpret & use these as illustrated in the sections below.

Document image


Event Type For Decision Filter

Please use resource-updated as the type filter when selecting this event in the decision element in flow builder.

Output Fields From Get Event Details

The corresponding Get Event Details flow action returns the Updated Resource Details sub-type with useful information including file resource, record Id and user id for further use. Refer to the image below for a list of outputs and descriptions of the parameters returned in this sub-type.

Document image

  1. Resource - A lookup Field of type Resource ( cldfs_Resource )which shall contain the corresponding updated external Resource's metadata details.
    1. driveId - The external storage drive ID
    2. id- The updated Resource's unique resource ID
    3. library- The External Storage Library (Ex sharepoint)
    4. name- The Name of the File/Folder
    5. path- The Storage Location Path of the File/Folder (Null if the storage is Google Drive)
    6. type- file or folder based on the Resource Type.
  2. UpdatedFields - A text collection of all the updated/changed Property API Names
  3. RecordId - The Salesforce Record ID associated with the LWC that initiated the the update.
  4. UserId - The Salesforce User ID of the user who performed the update.

Use Cases

In this section we present some use-cases for this platform event.

  1. Update opportunity status when a SharePoint upload is marked as proposal.
  2. Create a claim object when a folder with more than five files is marked as Complete.
  3. Run AI to extract information when an uploaded file is marked as a resume.