Set Resource Property (Batch)
The CloudFiles: Set Resource Property (Batch) action extends the functionality of the standard Set Resource Property flow action, enabling you to process multiple resource property updates in a single action. Instead of configuring multiple individual actions in your Salesforce Flow, this batch action consolidates them, improving efficiency and simplifying flow management.
The Set Resource Property (Batch) action processes a collection of Set Resource Property update requests. Each request contains:
- A collection of Updates (key-value pairs of property names and their corresponding values).
The action applies all updates in the collection, streamlining workflows for handling multiple metadata updates.
Example: If three files need updates:
- File 1: Updates as "Document Type" to "Invoice" and "Status" to "Approved."
- File 2: Updates as "Document Type" to "Report."
- File 3: Updates as "Name" to "Project_Plan.docx" and "Category" to "Project Files."
Instead of using 3 seperate Set Resource Property flow actions, configure 3 seperate cldfs__SetResourcePropertyFlowInput entries, add them to the Inputs collection, and execute a single Set Resource Property (Batch) batch action.
A collection of Apex-defined variables of type cldfs__SetResourcePropertyFlowInput.
Each cldfs__SetResourcePropertyFlowInput includes:
- Updates: A collection of cldfs__CloudFilesVariable variables, each representing a property name and its corresponding value for the Resource.
How to Configure the "Inputs" Parameter
- Create the Inputs Collection Define a Collection variable of type cldfs__SetResourcePropertyFlowInput in Salesforce Flow to hold multiple Set Resource Property entries.
- Create Individual cldfs__SetResourcePropertyFlowInput Entries For each resource to be updated:
- Assign the Resource (metadata details such as DriveId, Id, and Library).
- Define the Updates:
- Each update is a cldfs__CloudFilesVariable object with:
- Key: The Property Name (e.g., "Document Type" or "Status").
- ValueString: The corresponding value for the property.
- Add Updates to Each Resource
- Create a Collection variable of cldfs__CloudFilesVariable to store all property-value mappings for the resource.
- Assign this collection to the Updates field of the cldfs__SetResourcePropertyFlowInput.
- Add All Inputs to the Batch Collection Add all such cldfs__SetResourcePropertyFlowInput entries to a collection variable and Input this as Inputs parameter.
This action does not produce specific outputs. To confirm execution:
- Check the updated metadata values in the external storage system (e.g., SharePoint).
- Verify changes via the CloudFiles LWC or widget.