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 in Salesforce with customers in NetSuite 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 flows using your test systems and data. After you’re done with testing, run the flows using your production systems and data. For Salesforce, this means using a sandbox org to test your flows and a production org to run your flows.

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 Sales Cloud, it triggers the flow. First, be prepared to create a new test account in Sales Cloud. 

Next, if a corresponding customer doesn’t exist in NetSuite, prepare to verify the following.

  • A new customer containing relevant account information, including its associated account ID, is created in NetSuite.
  • The account is updated with its associated customer’s internal ID in Sales Cloud.

Finally, if a corresponding customer exists in NetSuite, prepare to verify the customer is updated with its associated account details in NetSuite.

Test a Flow

Follow these steps to test a flow.

  1. In the Sync Salesforce Accounts to NetSuite Customers 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 NTO org’s Sales Cloud and navigate to the Accounts tab page.
  3. Click New, create a new account with the following values, and then click Save. Note that in the Billing Country field, Argentina appears as _argentina. The NetSuite convention for country names is that the name must begin with an underscore and its first letter must be lowercase. Another NetSuite convention is that the website URL must start with http:// or https://.
    • Account Name: Malbec Wines
    • Billing Street: Avenida de Acceso Este 2600
    • Billing City: Cuyo
    • Billing State/Province: Mendoza
    • Billing Country: _argentina
    • Billing Zip/Postal Code: M5500
    • Phone: 542614382609
    • Website: https://www.malbecwines.com
    • Account Description: Premium account
  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. 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 a green check mark on step 3.Tested flow showing If branch of If/Else block.Tested flow showing a green check mark on step 4 in If branch.Tested flow showing the rest of step 4 in If branch.Tested flow showing a green check mark on step 5 in If branch.Tested flow showing Else branch of If/Else block and no green check mark on step 6 in Else branch.Tested flow showing more fields of step 6 in Else branch.Tested flow showing the rest of step 6 in Else branch.
  5. Access your customer in NetSuite and verify that a new customer called Malbec Wines matching the Salesforce account has been created. Malbec Wines should contain all relevant account details, including a Salesforce account ID. In this example, it’s 0011U000022HpBkQAK, which is the ID of the Salesforce account.
    Malbec Wines customer showing Salesforce account ID.
  6. In the NTO org’s Sales Cloud, verify the account has been updated with the NetSuite customer ID. In this example, it’s 1128661, which is the internal ID of the NetSuite customer.
    Salesforce account showing NetSuite customer ID.
  7. In the Sync Salesforce Accounts to NetSuite Customers flow, click Test again.
  8. In the NTO org’s Sales Cloud, edit the Malbec Wines account with the following values, and then click Save.
    • Billing Street: Tabanera 1173
    • Billing City: Valle De Uco
    • Billing State/Province: Mendoza
    • Billing Country: _argentina
    • Billing Zip/Postal Code: M5539
    • Phone: 5492622618965
    • Website: https://www.topmalbecwines.com
    • Account Description: Most valuable account in Argentina
  9. Go back to your flow and wait for the test to complete. If steps 1, 2, 3, and 6 of the flow show a green check mark, this indicates the flow ran successfully. This is because the List of Customer condition in the If block evaluates to false, indicating the new account has a corresponding customer in NetSuite. So steps 4 and 5 of the flow weren’t executed.
    Tested flow showing a green check mark on step 1.Tested flow showing a green check mark on step 2.Tested flow showing a green check mark on step 3.Tested flow showing If/Else block and If branch and no green check mark on step 4 in If branch.Tested flow showing more fields of step 4.Tested flow showing the rest of step 4 in If branch.Tested flow showing no green check mark on step 5 in If branch.Tested flow showing Else branch and For Each block and green check mark on step 6 in For Each block of Else branch.Tested flow showing more fields of step 6 in For Each block.Tested flow showing the rest of step 6 in For Each block.
  10. Reload the Malbec Wines customer page in NetSuite and verify the customer has been updated with relevant account details.
    Malbec Wines customer in NetSuite showing updated account details.
  11. Repeat steps 1 through 10 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