Resource Updated
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.
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.
Please use resource-updated as the type filter when selecting this event in the decision element in flow builder.
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.
- Resource - A lookup Field of type Resource ( cldfs_Resource )which shall contain the corresponding updated external Resource's metadata details.
- driveId - The external storage drive ID
- id- The updated Resource's unique resource ID
- library- The External Storage Library (Ex sharepoint)
- name- The Name of the File/Folder
- path- The Storage Location Path of the File/Folder (Null if the storage is Google Drive)
- type- file or folder based on the Resource Type.
- UpdatedFields - A text collection of all the updated/changed Property API Names
- RecordId - The Salesforce Record ID associated with the LWC that initiated the the update.
- UserId - The Salesforce User ID of the user who performed the update.
In this section we present some use-cases for this platform event.
- Update opportunity status when a SharePoint upload is marked as proposal.
- Create a claim object when a folder with more than five files is marked as Complete.
- Run AI to extract information when an uploaded file is marked as a resume.