Error Event
overview the event is triggered when a cloudfiles flow action fails, giving users real time insights into the failed action this event provides specific details about which file or resource caused the failure, empowering users to set up custom error handling workflows the error event is currently configured for the copy salesforce file https //help cloudfiles io/salesforce/xaoz copy salesforce files action, process document using ai docid 31ujx1ligtkwfkjuanbzt action, set resource property docid\ tqdwxfgpgtqijeymsaa2h action, and the document mapper docid\ zhnizzremyqxf2lpedkkt action with this feature, users can automate how they handle errors for example, when a document processing action fails, you’ll receive details about the file that didn’t process correctly from there, you can create flows to automatically track failed files or move them to a designated folder for manual intervention how to use this event? to use cloudfiles events, you must first setup your flow as shown in the intercepting cloudfiles events docid\ a1veefugb sg3o1d7vzhp 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 event type for decision filter use error event as the type filter when setting up a decision element in flow builder this ensures that any error caused by cloudfiles actions, such as a failed document process, is captured and ready for handling output fields from get event details the corresponding get event details https //help cloudfiles io/salesforce/get event details flow action returns the error event sub type with useful information including error event type, error reason etc for further use refer to the image below for a list of outputs and descriptions of the parameters returned in this sub type documentprocessederror this contains corresponding details of the document for which process document using ai docid 31ujx1ligtkwfkjuanbzt flow action failed it includes file https //help cloudfiles io/salesforce/salesforce file and context of the document salesforcefilecopiederror this contains corresponding details of the document for which copy salesforce file https //help cloudfiles io/salesforce/xaoz copy salesforce files flow action failed it includes the following details destination the resource of the destination to which files were supposed to be copied contentversionid content version id of the file that was supposed to be copied record id record id of the record to which the file belongs resourceupdateerror this contains corresponding details of the resource for which set resource property docid\ tqdwxfgpgtqijeymsaa2h flow action failed it includes the following details resource the resource docid\ mr7u7qdhigoasucpf nlr file or folder that failed to update its metadata payload the json payload string showing which field you attempted to update and the value ( e g , " {"name" "value"}") documentmapperrunerror this contains details of the file and context for which the document mapper operation failed it includes information such as file id the (internal or external) file that was processed to extract information from during the mapping config id the document mapper configuration that was used in the run record id the record id if the document mapper was run in "update" mode erroreventtype the specific nature of the error it is the corresponding platform event of the flow action which is failed (e g , salesforce file copied, https //help cloudfiles io/salesforce/salesforce file copied document processed https //help cloudfiles io/salesforce/document processed , resource updated https //help cloudfiles io/salesforce/resource updated , document mapper run docid\ rxirigallb7pu3ym3sfj5 ) errorreason an error prompt which is a description of an error (e g , "something went wrong") datasetcreatederror this contains the details od the resources, context for which the create dataset failed it includes information such as resource the resource docid\ mr7u7qdhigoasucpf nlr file that failed to create the dataset name name of the datset for which the action failed use cases here are some practical use cases for leveraging the error event to handle errors in cloudfiles workflows track failed ai document processing automatically detect when a document fails to process using ai and move it to a specific folder for manual review and reprocessing automate failed file handling set up flows to track files that failed to copy, triggering automatic retries or alerts to team members for immediate action custom error reporting create a flow that tracks all failed actions and generates a report on error types, resources, and associated records to streamline troubleshooting