From Salesforce Flow (6 min)
Completion requirements
01 Getting Started
This tutorial covers triggering a Flow from Salesforce.
02 Setup
In Salesforce, a merge files checkbox field exists for each contact. When this checkbox is marked as true, all attachments for the contact must be merged into one file.
![Example of a Salesforce contact](https://academy.titandxp.com/pluginfile.php/2869/mod_custompage/topics/527775835/1_SF.png)
![Example of a Salesforce contact](https://academy.titandxp.com/pluginfile.php/2869/mod_custompage/topics/527775835/1_SF.png)
03 Flow
A Flow project was configured:
![Flor example](https://academy.titandxp.com/pluginfile.php/2869/mod_custompage/topics/86082587/2_flow.png)
- A Salesforce Action to retrieve all the attached documents associated with the contact.
- A Merge Files action to merge all the files into one.
- A Salesforce Action to push the merge files back to Salesforce.
![Flor example](https://academy.titandxp.com/pluginfile.php/2869/mod_custompage/topics/86082587/2_flow.png)
04 Flow in Salesforce
1. Navigate to the Setup window in Salesforce, search for Flows, and click New Flow.
![Create a new Salesforce flow](https://academy.titandxp.com/pluginfile.php/2869/mod_custompage/topics/670493682/3_flows.png)
2. Select Record-Triggered Flow and click Create.
![New flow window with Record-Triggered Flow selected](https://academy.titandxp.com/pluginfile.php/2869/mod_custompage/topics/670493682/4_record.png)
3. Configure the following:
![Object configuration](https://academy.titandxp.com/pluginfile.php/2869/mod_custompage/topics/670493682/5_objectconfig.png)
4. Click the + icon in the flow builder.
![Add new action to the flow](https://academy.titandxp.com/pluginfile.php/2869/mod_custompage/topics/670493682/6_flow.png)
5. Select Action.
![Add Action](https://academy.titandxp.com/pluginfile.php/2869/mod_custompage/topics/670493682/7_actions.png)
6. Configure the following and click Done:
![Publish project window showing where to retrieve your hash](https://academy.titandxp.com/pluginfile.php/2869/mod_custompage/topics/670493682/8_hash.png)
![Create a new Salesforce flow](https://academy.titandxp.com/pluginfile.php/2869/mod_custompage/topics/670493682/3_flows.png)
2. Select Record-Triggered Flow and click Create.
![New flow window with Record-Triggered Flow selected](https://academy.titandxp.com/pluginfile.php/2869/mod_custompage/topics/670493682/4_record.png)
3. Configure the following:
- Object - Contact
- Trigger the Flow when - A record is updated
- Condition Requirements - All Conditions Are Met (AND)
- Field - Merge_Files_c
- Operator - Equals
- Value - True
![Object configuration](https://academy.titandxp.com/pluginfile.php/2869/mod_custompage/topics/670493682/5_objectconfig.png)
4. Click the + icon in the flow builder.
![Add new action to the flow](https://academy.titandxp.com/pluginfile.php/2869/mod_custompage/topics/670493682/6_flow.png)
5. Select Action.
![Add Action](https://academy.titandxp.com/pluginfile.php/2869/mod_custompage/topics/670493682/7_actions.png)
6. Configure the following and click Done:
- Action - Form-Builder__TitanFlow
- Label - Call Titan Flow
- ftFormHash - This is retrieved from the publish window in your flow.
![Publish project window showing where to retrieve your hash](https://academy.titandxp.com/pluginfile.php/2869/mod_custompage/topics/670493682/8_hash.png)
- recordId - {!$Record.Id }
05 Preview
When the Merge Files checkbox is marked as true, all files associated with the contact are merged and saved.
![Preview of how the flow is invoked from Salesforce](https://academy.titandxp.com/pluginfile.php/2869/mod_custompage/topics/592645840/10_preview.png)
![Preview of how the flow is invoked from Salesforce](https://academy.titandxp.com/pluginfile.php/2869/mod_custompage/topics/592645840/10_preview.png)