Skip to main content
Free Agentforce workshops and AI Certifications: Learn more. Terms and conditions apply.
Time Estimate

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.
  3. Make sure Start from Scratch is selected, and click Next.
  4. Select Screen Flow and click Create.
  5. In the button bar, change the Auto-Layout setting to Free-Form.
  6. From the toolbox, with the Elements tab selected, drag Action onto the canvas.
  7. 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.
  8. 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.
  9. 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, enter Account Type.
  5. For Length, enter 25.
  6. For Field Name, enter Account_Type.
  7. Leave the rest of the defaults, and click Next.
  8. Make sure that the field-level security is set to visible for profiles you use in your org and click Next, then Save & New.
  9. Under Data Type, select Text and click Next.
  10. For Field Label, enter Account ID.
  11. For Length, enter 25.
  12. For Field Name, enter Account_ID.
  13. Leave the rest of the defaults, and click Next.
  14. Make sure that the field-level security is set to visible for profiles you use in your org and click Next.
  15. 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
  1. 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 Thompson 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.

Share your Trailhead feedback over on Salesforce Help.

We'd love to hear about your experience with Trailhead - you can now access the new feedback form anytime from the Salesforce Help site.

Learn More Continue to Share Feedback