Message Image  

Connecting App Connect to the same application using multiple accounts

 View Only
Fri July 10, 2020 10:19 AM

You can connect App Connect to an application like Salesforce using multiple different accounts, and then use those accounts in the same flow. You can also rename accounts before use to have more-meaningful names than the default names.

One example for the use of multiple accounts is in a flow that synchronizes two different Salesforce accounts. Consider the following flow for an API that uses a batch process to sync from the Salesforce account Business Partner Org to the account Sales Org Production:

Figure 1. A flow for an API to synchronize between two Salesforce accounts, with accounts yet to be selected.


Actions in the flow, from left to right:

  1. Retrieve up to 30 Account records from the Salesforce account Business Partner Org
  2. For each Account record
    1. Check if the Account exists in the Salesforce account Sales Org Production, and there either update the Account or create a new Account
    2. Retrieve the Contact records from the Salesforce account Business Partner Org
    3. For each Contact record
      1. If the Contact has an email defined, check if the Contact exists in the Salesforce account Sales Org Production, and there either update the Account or create a new Account
      2. Otherwise, report that the email is missing to a Slack channel

In the above flow (imported from a template) you can see that the Salesforce accounts are not connected, because the Salesforce accounts Sales Org Production and Business Partner Org do not already exist in App Connect. If the accounts did already exist, then they would automatically have been connected to the actions in the flow.

When you select a node in a flow, you can use the accounts drop-down menu to select an existing account or to add new accounts. New accounts are created with a default name like Account 1, and where available context information like the email address for the account; for example: Account 1 (accnt_addr@gmail.com).

You can also add new accounts through the Applications tab.

If you intend renaming your accounts, you should do so before using the account in a flow. Otherwise, before you can rename an account you must either delete all flows that use the account or edit the flows and remove the nodes that use the account.

Adding multiple accounts

Consider the preceding flow for which the company has already defined its own Salesforce account, Sales Org Production, but wants to add the Salesforce account Business Partner Org.

To add the new Salesforce account:

  1. In App Connect Designer, click the Applications tab.
  2. Scroll down to Salesforce and expand the accounts menu.
  3. Select the option Add a new account….
  4. In another window, complete the steps to authorize App Connect access to the Salesforce account.
  5. Check that the new Salesforce account has been added with the default name: Account 1 (partner_email_addr)

The Salesforce accounts menu offers the multiple accounts, which you can choose from when you select a Salesforce node in any flow:

Figure 2. The Salesforce accounts menu, showing multiple accounts, one with a default name.

Renaming an account before use in a flow

To rename the new account Account 1 to Business Partner Org, in the Salesforce accounts menu on the Applications tab:

  1. Select the account that you want to rename
  2. Click the more options menu (⋮), and there select Rename Account
  3. In the Rename Account dialog, type the new name and then click Rename Account

    The Salesforce account is shown with its new name: Business Partner Org (partner_email_addr)

Selecting different accounts in a flow

Consider the example flow that has been imported but not yet had the accounts selected.

Figure 3. A flow for an API to synchronize between two Salesforce accounts, with accounts yet to be selected.


To select an account to use on a node, you just select the node and then select the account from the accounts menu shown.

To select the two Salesforce accounts for use on actions in the flow:

  1. Select the Salesforce Retrieve Accounts action. If the account Business Partner Org is not already assigned, click the accounts menu and there select Business Partner Org.
    Figure 4. Using the Salesforce accounts menu to select one of multiple accounts.
  2. Select the Salesforce Retrieve Contacts action, and select the Business Partner Org account.
  3. Select the Salesforce Update or create Account action, and check that the account Sales Org Production is selected
    Figure 5. Salesforce action showing account selected.
  4. Select the Salesforce Update or create Contact action, and check that the account Sales Org Production is selected