Introducing Invocable Composer Flows.

Introducing Invocable Composer Flows: Automate End-to-End Across All of Salesforce


What are Invocable Composer Flows?

MuleSoft Composer is an integration tool designed for admins, business analysts, marketers, salespeople, and team leaders. Using Composer, you can quickly and easily build flows to integrate systems and data and automate integration tasks. It’s a no-code tool you can use to build automations with only clicks.

To further supercharge the integration capabilities of Composer, we’re introducing Invocable Composer Flows. This feature allows users to call Composer flows from Flow Builder (and later from Flow Orchestration). Let’s explore more!

 Invocable flow in Composer Builder Experience.

With Invocable Composer Flows, you can now connect to third-party systems such as NetSuite, JIRA, and Workday from Flow Builder with just a few clicks! Here’s an example: Let’s say you want a JIRA issue to be generated and a Slack message to be sent to the sales team as soon as a new record (contact, lead, opportunity, etc.) is created in Salesforce. Using Invocable Composer Flows, you can now build this integration in Flow Builder without writing a single line of code!

Here are a few highlights of what’s possible with Invocable Composer Flows.

  • Automate end-to-end across Salesforce by calling Composer flows directly from Flow Builder.
  • Authenticate every invocation for a secure and protected automation experience.
  • Create application programming interface (API)-compatible invocable actions for seamless integration with diverse systems and applications.
  • Build powerful automations by leveraging the built-in support for input and output parameters.

How do you configure a Composer flow to be invoked?

Composer users will be able to configure their Composer flow so that it receives custom inputs from wherever it’s invoked and can also return outputs in response. Invocable Composer Flows will become Generally Available (GA) in two phases. Coming in July 2023, the V1 release will allow Invocable Composer Flows to accept inputs and build automations using the values passed in. The V2 release (slated for later in FY24) will allow Composer flows to return outputs back to the caller. In the case of Flow Builder, the Composer flow will be able to return values to the flow that invoked it.

In the example shown below, we have a Service Cloud customer enquiring about their order status using an Einstein Bot. We want to use the custom record ID coming from Service Cloud to retrieve the corresponding order status from NetSuite. We then want to use the order status to update the fulfillment team using Slack. And we wish to build this automation all within Salesforce!

Retrieving Order Status from Netsuite using Composer.

Build an invocable flow in Composer

We’ll begin by building a flow in Composer using the newly introduced trigger called Invoke.

Invoke Trigger in Composer.

Flows that use the Invoke trigger can be invoked from external systems and can receive inputs (V1) and return outputs (V2). Inputs can be specified using the Visual Editor (supports primitives such as String, Number, Boolean, Date, and Datetime) or via the Sample JSON Editor (supports complex inputs such as arrays, objects, and lists).

We’ll build the flow in Composer such that the Composer flow retrieves the status of the order from NetSuite (using the orderID) and sends a message to the fulfillment team via a Slack channel (specified by channelName).

In the Service Cloud use case above, let’s define a flow in Composer that takes two inputs: orderId and channelName.

Specifying Inputs to an Invocable Composer Flow.

In V2, the order status can be returned back to the caller. If invoking the Composer flow from Flow Builder, once you receive the status back from Composer, you can build your automation further to take the appropriate action based on the order status.

To ensure the flow works as intended, you can test it in Composer by providing sample values for your inputs. Now let’s move on to the next step: activation!

Activate the invocable flow in Composer

Once you test an invocable flow, you can proceed to activate it in Composer. Composer will generate a unique flow URL and a unique pair of client credentials (Client ID and Client secret) along with the OpenAPI Spec for the invocable flow. These assets, generated by Composer, can be used to securely invoke the flow from an external tool such as Flow Builder. Note that the credentials of the Composer flow can also be reset in accordance with security best practices.

Flow URL, Credentials, and OpenAPI Spec example.

Invoke the Composer flow from Flow Builder

Now that the Composer flow is active, let’s see how to invoke it from Flow Builder. In V1, you must follow these steps to register and authenticate the Composer flow in Salesforce.

  1. Create a Named and External Credential in Salesforce using the flow URL and credentials provided by Composer.
  2. Register the Composer flow as an external service using the OpenAPI Spec generated by Composer.

Now it’s time to get creative and build powerful automations leveraging the power of Flow Builder and the no-code integration capabilities of Composer!

To continue with the example above, let’s build a screen flow in Flow Builder that will make a callout to the Composer flow passing in the NetSuite order ID and Slack channel name. The Composer flow will retrieve the order status from NetSuite and notify the fulfillment team in Slack.

In V2, the Composer flow will also be able to return the order details back to Flow Builder.

Invoking a Composer flow from Flow Builder canvas.

Voila! You just built your first no-code integration with external systems (NetSuite in the example above) by seamlessly bringing Flow Builder and Composer together!

Uniquely bundled with Flow Builder and Flow Orchestration, MuleSoft Automation empowers business and IT teams to build better customer and employee experiences by:

Delivering no-code automation for Salesforce flows: Invocable Composer Flows enable Salesforce Admins to build automations involving external systems (such as NetSuite, JIRA, and Google Sheets) with only clicks and no code.

Achieving end-to-end automation at scale: Teams can integrate with external systems seamlessly with Flow Builder, Flow Orchestration (future release), and Composer to automate workflows across multiple systems and easily connect modern apps such as Slack, Stripe, and Workday.

Automating and integrating securely: Salesforce automations can benefit from securely integrating with dozens of out-of-the box connectors to important systems available in Composer. IT teams can monitor and secure any automation and integration throughout the lifecycle.

Excited to learn more about Invocable Composer Flows?

Join us at Dreamforce 2023 to learn more about building automations that combine the power of Salesforce tools and Composer.

We’re excited to see these products in the hands of our community of admins, developers, and business and IT teams. We look forward to seeing how you’ll use them to unleash innovation and bring the future of work to every team!


Max the mule standing next to text that says, "How to Configure Error Handling in MuleSoft Composer."

How to Configure Error Handling in MuleSoft Composer

MuleSoft Composer is the fastest and easiest way to connect apps and data for business teams, in partnership with IT. With the long-awaited error handling feature that Muleys are excited about, you can build more robust and resilient automation. You can further automate your flows, get real-time notifications on failures, mark failed records for reprocessing, […]

Cloudy standing near a cliff and text that says, "Easy Integrations with Flow HTTP Callouts."

Integrations Are Easier Than Ever with Flow HTTP Callouts

Are you tired of waiting for IT resources to build out an integration to your supplier? Are you frustrated that your payroll system lacks reliable application programming interface (API) documentation, leaving your IT team to weed through JSON and just hoping it’ll work? Then Flow HTTP Callout is for you! This feature does the hard […]

Best Practices for Configuring Your Integration User.

Best Practices for Configuring Your Integration User

Editor’s note: This post was updated on April 25, 2024, with the latest information and resources. As a security-minded admin, you should follow the principle of least privilege. What is the principle of least privilege, you ask? It’s the concept of limiting users’ access rights to only what is required to do their jobs. That’s […]