Record-Triggered Flows
- Navigate to Salesforce Setup > Process Automation > Flows.

- From the Flows page, click New Flow.

- Select Record-Triggered Flow, then click Create.

- You will be prompted to set up your starting node's criteria (how the flow will be initiated), as well as configure the Salesforce object the action will take place on. You can go back to this screen by editing the Start node of the flow. For more information on building out your flow, please see the Salesforce documentation on Defining Conditions in a Flow.

- Below the Start node, select the Add Element node, then select Action. This will auto-display the Action section to the right.

- In the Action field, search and select Automate Merge (apex-mergeconnect__AutomateMerge).

- Fill out the required fields for Label and API Name, by default the operation New File from Template is selected. This is currently the only operation available.

- Next you will see a few additional options. Below is a list of the available settings to configure:
-
Publish Results Event — By default, it is not enabled. Publishes a platform event on completion of this operation with its results in JSON format, including data such as the ID of a Generated File.
-
Template — By default, it is set to From Merge Connect which will allow users to select a template created through Template Builder for the set Object. However this can be changed to From a Text Variable. Users can create a variable resource type with the data type of text that will contain a template ID (taken from templates created through template builder) as the value.
-
Generated File Format — By default, it is set to Microsoft Format (only .docx and .pptx files are currently supported). However, this can be changed to be a PDF Document (.pdf).
-
Template Name — The Select a Template button will open up the Select Templates Modal.

-
-
If the Template field is set to "From Merge Connect", clicking "Select a Template" will open the Select Templates modal. Here, users can choose a single published template. Templates can be searched by name or description. Once a template is selected, click Select to confirm your choice.

-
Additionally, users can add a child operation by clicking on + Add Child Operation. By default the child operation is set to Update Record Field, which is currently the only child operation available. Next you will see a couple of additional options:
-
Field — By default, no value is set. However this can be changed to any field on the object your flow is set to trigger on that you would like to update with the selected value.
-
Value — By default, no value is set. However, this can be changed to the following values:
-
Salesforce Content Document ID
-
Salesforce Content Version ID

-
-
- Now that your Flow is completed, you can enter the required fields for Flow Label and Flow API Name, then click Save.

- Click Activate.

- To test your Flow, go back to your Salesforce object/record and trigger your Flow. Once triggered, the component will display a state of automation in progress.
