Skip to main content

Test a Flow

Learning Objectives

After completing this unit, you’ll be able to:

  • Prepare to test a flow.
  • Test your flow to ensure it syncs new or updated accounts between two Salesforce orgs and Slack as expected.

Prepare to Test a Flow

After you’ve designed your flow, you must test it from end to end to ensure it syncs data as expected. 

As a best practice, test your flow using your test systems and data. After you’re done with testing, run the flow using your production systems and data. For Salesforce, this means using a sandbox org to test your flow and a production org to run your flow.

Also, as a best practice, test every possible path of your flow. For example, if your flow has an If branch and an Else branch in an If/Else block, ensure to test both branches.

In general, you have up to 10 minutes to complete a test. When the test completes or 10 minutes have passed, the test stops. As a best practice, you should get all required applications and data ready for the test before starting it. 

In this use case, when an account is created or updated in the GD org, it triggers the flow. First, prepare to log in to the GD org as an end user and create a test account. 

Next, if a corresponding account doesn’t exist in the NTO org, prepare to verify the following.

  • An NTO account containing relevant details, including its associated GD account ID, is created.
  • The GD account is updated with its associated NTO account ID.
  • A message with relevant account details appears in the account-automation channel.

Finally, if a corresponding account exists in the NTO org, prepare to verify the following.

  • The NTO account is updated with relevant details, including its associated GD account ID.
  • The GD account is updated with its associated NTO account ID.
  • A message with relevant account details appears in the account-automation channel.

Test a Flow

Follow these steps to test a flow.

  1. In the Sync Accounts - GD Org to NTO Org to Slack flow, click Test. The flow goes into a read-only mode.
    Note: While the test is running, if for some reason you want to stop it, click Stop Test.
  2. Log in to the GD org’s Sales Cloud as an end user and navigate to the Accounts tab page.
  3. Click New, create an account with the following values, and then click Save.
    • Account Name: ACME
    • Billing Street: 501 Fifth Avenue
    • Billing City: New York
    • Billing State/Province: New York
    • Billing Zip/Postal Code: 10017
    • Billing Country: United States
    • Account Phone: 212-333-4444
    • Account Rating: Warm
    • Upsell Opportunity: Maybe
  4. Go back to your flow and wait for the test to complete. If steps 1 through 5 of the flow show a green check mark, this indicates the flow ran successfully. The condition in the first If branch of the If/Else block evaluates to true. This indicates the GD account doesn’t have a corresponding NTO account, so only the steps in the first If branch were executed. Take a look at the Test Output section and see the record values you entered for the test.
    Tested flow showing a green check mark on step 1.Tested flow showing a green check mark on step 2.Tested flow showing If branch of If/Else block.Tested flow showing a green check mark on step 3 in If branch.Tested flow showing the rest of step 3 in If branch.Tested flow showing a green check mark on step 4 in If branch.Tested flow showing a green check mark on step 5 in If branch.Tested flow showing second If branch and For Each block.Tested flow showing no green check mark on step 6 in second If branch.Tested flow showing the rest of step 6 in second If branchTested flow showing no green check mark on step 7 in second If branch.Tested flow showing no green check mark on step 8 in second If branch.
  5. Log in to the NTO org’s Sales Cloud, navigate to the Accounts tab, and view all accounts. Verify an NTO ACME account matching the GD ACME account is created. The account should contain all relevant details, including a GD account ID. In this example, it’s 0016e00002zgEvmAAE.
    NTO ACME account showing GD account ID, billing address, and upsell opportunity.
  6. Return to the GD org’s Sales Cloud, and verify the GD ACME account is updated with the NTO account ID. In this example, it’s 0011U000026XRxOQAW.
    GD ACME account showing NTO account ID
  7. Open your NTO Slack workspace and verify the account notification appears in the account-automation channel. Notice that because you used \n (for new line) and asterisks (for bold) in your flow, the message is formatted as expected in Slack.
    account-automation channel showing new GD account notification.
  8. In the Sync Accounts - GD Org to NTO Org to Slack flow, click Test again.
  9. In the GD org’s Sales Cloud, edit the ACME account with the following values, and then click Save.
    • Billing Street: 495 Madison Avenue
    • Billing City: New York
    • Billing State/Province: New York
    • Billing Zip/Postal Code: 10022
    • Billing Country: United States
    • Account Phone: 212-345-6789
    • Account Rating: Hot
    • Upsell Opportunity: Yes
  10. Go back to your flow and wait for the test to complete. If steps 1, 2, 6, 7, and 8 of the flow show a green check mark, this indicates the flow ran successfully. The condition in the second If branch of the If/Else block evaluates to true. This indicates the updating user is an end user, not the Composer user, and the triggering GD account has a corresponding NTO account, so only the steps in the second If branch were executed.
    Tested flow showing a green check mark on step 1.Tested flow showing a green check mark on step 2.Tested flow showing If branch of If/Else block.Tested flow showing no green check mark on step 3 in If branch.Tested flow showing the rest of step 3 in If branch.Tested flow showing no green check mark on step 4 in If branch.Tested flow showing no green check mark on step 5 in If branch.Tested flow showing second If branch and For Each block.Tested flow showing a green check mark on step 6 in second If branch.Tested flow showing the rest of step 6 in second If branch.Tested flow showing a green check mark on step 7 in second If branch.Tested flow showing a green check mark on step 8 in second If branch.
  11. Return to the NTO org’s Sales Cloud and navigate to the Accounts tab. Verify that the ACME account is updated with all relevant details, including the GD account ID, street address, and upsell opportunity.
    NTO ACME account showing GD account ID, billing address, and upsell opportunity.
  12. Return to the GD org’s Sales Cloud and verify the account is updated with the NTO account ID. In this example, it’s 0011U000026XRxOQAW.
    GD ACME account showing NTO account ID.
  13. Open your NTO Slack workspace and verify the account notification appears and is formatted as expected in the account-automation channel.
    account-automation channel showing updated GD account notification.
  14. Repeat steps 1 through 13 to test another account of your choice. Your flow should work as expected.

Good job! In the next unit, you learn how to activate, monitor, and troubleshoot your flow in the production environment.

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