Events
All Event Types
Resource Detached
overview the resource detached event is triggered whenever a file or folder in external storage is disconnected from a salesforce record this event fires in the following scenarios when a user manually disconnects a resource through the cloudfiles lwc widget on a salesforce record page upon successful execution of the delete attachment delete attachment flow action this event enables seamless automation for scenarios requiring actions based on resource disconnection, such as audit logging, cleanup operations, archival notifications, or cascade updates to related records how to use this event ? to use cloudfiles events, you must first setup your flow as shown in the intercepting cloudfiles events article this article will introduce you to the concepts of the event type as well as event details that are returned by the get event details docid\ cfegghvnwso7bcxyevrr flow action once you are familiar with these, you will understand how to interpret & use these as illustrated in the sections below note by default, this event is not published you must enable this in the cloudfiles app > document management > settings event type for decision filter in flow builder, use resource detached as the event type filter in decision element output fields from get event details the corresponding get event details flow action returns the resource detached sub type with useful information including attached resource's metadata details, salesforce object type and salesforce record 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 docid\ mr7u7qdhigoasucpf nlr ( cldfs resource ) which shall contain the connected/attached resource's metadata details driveid the external storage drive id id the 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 object type the salesforce object's api name (e g , account , opportunity ) where the resource is detatched from record id the salesforce record id associated with the attachment use cases in this section we present some use cases for this event maintain audit trails of all resource disconnections across your organization to track when and why attachments are removed from critical records trigger cleanup workflows to optionally delete or archive the detached files from external storage when they're no longer needed in salesforce send notifications to stakeholders when important documents are disconnected from opportunity or contract records update record status or custom fields when required attachments are removed, ensuring data integrity and process compliance create archival records in a custom object to maintain historical references to previously attached resources for compliance or reporting purposes