Automate Across Multiple Salesforce Orgs with RunFlowOnAnotherOrg Action

This extension installs a new flow action called ‘Run Flow on Another Org’ that makes it easy to automate across orgs. The basic idea is:

  1. You have two different Salesforce orgs. Let’s call them Source Org and Target Org.
  2. You want to solve a problem involving the two orgs. For example, when a record gets created in Source Org, you want to create a copy in Target Org.
  3. On your Target Org, you create a flow that takes inputs and carries out work.
  4. You then create a flow on Source Org that incorporates the RunFlowOnAnotherOrg flow action. You can pass inputs in, including records and collections of records (although you’ll have to use the Serialize action to temporarily convert them to a string).
  5. When you run your Source Org flow and it reaches the RunFlowOnAnotherOrg, it will connect to your Target Org and run the specified flow there, passing in any inputs that you specify.

Setup

If you have two orgs that need this kind of integration, you probably already have them hooked up to some degree. But if not, you’ll need to create a Connected App on the Target Org that authorizes the Source Org to connect in. There’s detail on this here: Creating a Connection To Another Org That Your Flows Can Use

If you want to pass records or Apex-defined objects to the flow on the target org, you’ll need to first serialize them (turn them into a string). Then on your target flow you’ll want to deserialize them back to objects. This is easy with the Serialize/Deserialize extension, and well worth getting familiar with.

Install

This package currently requires that you first install the following packages:

  1. Flow Action Base Pack
  2. Flow Screen Components Base Pack
  3. Serialize/Deserialize

After installing the prerequisites, then install:

V 1.0 Unlocked 10/11/21

Source

source