Invoking Messaging with a Flow
You can use Salesforce Flows to invoke messaging for the declarative automation you have built. This action can be specified to execute an Apex action on an object, and you can define criteria associated with the object to determine when the action must be performed.
Using Record-Triggered Flows for Sending FDN Messages
In most cases, you opt for a record-triggered flow when sending FDN (Flow-Driven Notification) messages. Follow these steps to set up your flow:
- Navigate to Setup | Process Automation | Flows and click New Flow to open the Flow Builder.
- Select the Record-Triggered Flow.
- Select the Trigger Object. Typically, you will choose the object from which the message will originate. This is often the source object in your message.
- Configure the Trigger.
- Click Done.
- Add an Action Element. For more information, see the Salesforce Help.
- Add the Action element to your flow.
- Configure the Action.
- In the search area, type
deliver
, this will narrow down the search options to the two we provide:- Send FDN Messages Asynchronously: This is used with a scheduled job to define when messages are sent. For more information, see Scheduling Message Delivery.
- Send FDN Messages Synchronously: Sends messages as soon as the record is triggered.
- Specify a name for your Action.
- Populate the Publication Field. For more information see, Publication and Subscription Fields.
- Specify the Record ID. As a standard flow-building behavior, specify the record ID from where your flow is initiated. This ensures that the flow operates on the correct record.
- Click Done.
- Connect your flow then Save, Test and Activate accordingly. For more information on how to view your newly created flow in Messaging, see Relationship Activation Overview.
Using Screen Flows for Sending FDN Messages
Using Screen Flows to send FDN Messages enables you to share records between a source object and a target object. To create a Screen Flow:
- Navigate to Setup | Process Automation | Flows and click New Flow to open the Flow Builder.
- Select Screen Flow and click Create..
- Click Freeform.
- From the Toolbox panel Manager tab in Flow Builder, click New Resource.
- Configure the flow and click Done.
- From the Toolbox panel Elements tab in Flow Builder, add an Action to your flow.
- Configure the action with the following details:
- In the search area, type deliver, this will narrow down the search options to the two we provide:
- Send FDN Messages Asynchronously: used with a scheduled job to define when messages are sent. For more information, see Scheduling Message Delivery.
- Send FDN Messages Synchronously: sends messages as soon as the record is triggered.
- Label the action, and check the API name.
- [Optional] In the Description field, enter a description.
- Search for or enter a publication identifier.
- Toggle on Record IDs so they are included and select the variable created when configuring the flow.
- Click Done
- In the search area, type deliver, this will narrow down the search options to the two we provide:
- Connect your flow, then click Save.
- Enter a label for the flow and review the API name.
- [Optional] In the Description field, enter a description.
- Click Save.
- Click Activate and test accordingly.
Add the Screen Flow button to your list view pages. For more information on updating list view pages, see Page in the Salesforce Help.