What to know about MuleSoft Composer Invocable Flows

Salesforce is expanding upon its initial introduction of MuleSoft Composer in 2020, offering enhanced functionalities to use and trigger MuleSoft Composer directly within the Salesforce platform. The latest addition to MuleSoft Composer is the release of Invocable Flows.

What to know about MuleSoft Composer Invocable Flows
Table of contents

What are Invocable Flows?

Invocable Composer Flows enable seamless connections to third-party systems (like NetSuite, Jira, and Workday) directly from Flow Builder with just a few clicks.

Upon its initial release, it functioned as a one-way solution, allowing you to send data from Salesforce to an external source using variables (inputs) within the Salesforce Flow.

↔️
While this was a significant advancement, enabling data transfer from Salesforce to a third-party platform through MuleSoft – where native integration wasn't available – it still lacked a critical component necessary for optimal utilization.

For instance, you could create a contact in Salesforce and send details like first names, last names, emails, phone numbers, and addresses to the shelter software – ShelterBuddy – using an HTTP connector, creating a person record in ShelterBuddy. This component was introduced in September 2023 and allowed additional variables (outputs) to be returned into Salesforce from the initial action.

In the same example mentioned earlier, after creating the ShelterBuddy person, you can retrieve the HTTP response from ShelterBuddy, push it back into Salesforce, and update the contact with the ShelterBuddy Person ID. This functionality enables the establishment of a link between these two records.

Invocable Composer Flows offer several possibilities

  1. Automate end-to-end processes within Salesforce by directly calling Composer Flows from Flow Builder
  2. Ensure secure and protected automation by authenticating each invocation
  3. Develop API-compatible invocable actions for smooth integration with various systems and applications
  4. Create automations with built-in support for input and output parameters.

How to invoke the MuleSoft Composer Flow

  1. Open a new MuleSoft Composer Flow
  2. Select the "Invoke" option
  3. Add input fields: Include the data you want to pass from Salesforce
  4. Add output fields: Specify the data you want to push back into Salesforce.

An example of a fully completed Flow would be two input fields, 'ShelterBuddy PID' and 'ShelterBuddy Token,' and one output field, 'Do Not Adopt.'

In this use case example, we call out our ShelterBuddy API to see if this person submitting an adoption request has a 'Do Not Adopt' flag on their person record in ShelterBuddy. We are retrieving the contact information using the 'ShelterBuddy PID.'

We explicitly get the 'Do Not Adopt' field within the return data. Once the Flow is done, activate it to get the Flow credentials you need to set up everything in Salesforce.

Invoke the Composer Flow from Flow Builder

Let's explore how to trigger a Composer Flow through Flow Builder. Follow these steps to register and authenticate the Composer Flow in Salesforce:

  • Establish a named and external credential in Salesforce using the Flow URL and credentials provided by Composer
  • Register the Composer Flow as an external service, utilizing the OpenAPI Spec generated by Composer.

For example, a Screen Flow in Flow Builder initiates a callout to the Composer Flow, passing the NetSuite order ID and Slack channel name. The Composer Flow, in turn, retrieves the order status from NetSuite and notifies the fulfillment team in Slack. Finally, the Composer Flow returns the order details to Flow Builder.

There's a use case for you

Now that you have seen MuleSoft Composer Invocable Flows' capabilities, your mind should be spinning with potential use cases. Think about how you could connect this to NetSuite, look for real-time information, and then have your Flow adjust its path based on the output. That's huge!

MuleSoft Composer Invocable Flows allows Salesforce Admins to manage their work with low-code solutions that make it easier to manage and hand off to other Admins should they change companies. It also allows Salesforce Developers to focus on larger projects. It empowers you to get real-time information from external systems when needed for critical automation decisions.

👇
Do you want a no-code tool to help you with your automations with only a few clicks?