Skip to main content

Access External Business Actions

Let’s build a flow that puts into practice what you've learned and set up so far. Ready to put your skills to the test and implement our business process? Here we go! 

Note

The Named Credential and External Services registration in the previous step make our external web actions available from Flow.

View External Services Actions in Flow

In the previous step, you registered an external service using the External Services wizard and viewed the External Services actions in the wizard. To see the actions, let’s jump into Flow Builder.

  1. From Setup, enter Flow in the Quick Find box, then select Flows.
  2. Click New Flow, and then select Screen Flow.
  3. Click Create.
  4. Change the Auto-Layout default to Free-Form.
  5. From the toolbox, with the Elements tab selected, drag Action onto the canvas.
  6. To see the actions imported by External Services based on the API spec we used in the previous step, change Filter By to Type, select External Service, and click in the search box.
  7. To see the actions grouped by an External Services registration (in this example, BankService), change Filter By to Category, select BankService, and click in the search box. When you’re done viewing the available BankService actions, we can move on.
  8. Click Cancel and return to Setup.

[New Action window with External Service highlighted.]

You can see the getAccount action that we looked at in the External Services wizard, along with addAccount, DeleteAccount, and updateAccount. These External Services actions are the API operations pertaining to our fictional bank that we can use in a flow to get information, add account records, and so forth. 

External services that you create can have many more actions. It depends on the specific service that you use and how the API spec’s schema is defined for your use case. We’re about to use these actions in a flow of our own. 

Create Custom Fields

First, let’s create two custom fields—Account Type and Account ID—on the User object. This provides fields in the user’s record to store the bank account type and bank account ID values that you retrieve from the bank service.

  1. From Setup, select Object Manager, then select User.
  2. Click Fields & Relationships, then click New.
  3. Under Data Type, select Text and click Next.
  4. For Field Label, use Account Type and for Length use 25.
  5. For Field Name, use Account_Type. Leave the rest of the defaults, and click Next.
  6. Make sure that the field-level security is set to visible for profiles you use in your org and click Next, then Save & New.
  7. Under Data Type, select Text and click Next.
  8. For Field Label, use Account ID and for Length use 25.
  9. For Field Name, use Account_ID. Leave the rest of the defaults, and click Next.
  10. Make sure that the field-level security is set to visible for profiles you use in your org and click Next.
  11. Click Save.

Create a User Record

Next, create a user record for your client, Maria Thompson.

  1. From Setup, enter Users in the Quick Find box, then select Users.
  2. Click New User.
  3. For First Name, enter Maria
  4. For Last Name, enter Thompson
  5. For User License, select Salesforce Platform.
  6. For Profile, select Standard Platform User.
  7. Since this is a test org, use your own email address.
  8. Enter a username that looks like an email address. Usernames must be unique across ALL of Salesforce. Choose a username like:
    • external.<yourlastname>@<yourcompany>.com
    • …or create a username of your choice that is unique
  9. Click Save.

If you’re curious, you can now verify that your user, Maria Thompson, has the two new custom fields in her Salesforce user account (Account Type and Account ID). As you might expect, both fields are currently empty.

Maria Thomson would like to open a checking account at your bank. You’ve created a user for her in Salesforce (a necessary step, based on our business logic). Now let’s make it easy for bank reps to complete the new account creation process and use all the power of Salesforce to track new bank accounts.

Let’s get started on our flow.

Keep learning for
free!
Sign up for an account to continue.
What’s in it for you?
  • Get personalized recommendations for your career goals
  • Practice your skills with hands-on challenges and quizzes
  • Track and share your progress with employers
  • Connect to mentorship and career opportunities