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 customer service cases in Salesforce with issues in Jira 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 complete 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 a customer service case that requires engineering assistance is created or updated in Service Cloud, it triggers the flow. First, prepare to create a test customer service case that requires engineering assistance in Service Cloud. 

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

  • A new issue containing relevant case details is created in the Customer Support project in Jira.
  • The case is updated with its associated Jira issue ID in Service Cloud.

Finally, if a corresponding issue exists in Jira, prepare to verify the issue is updated with relevant case details in Jira. 

Test a Flow

Follow these steps to test a flow.

  1. In the Sync NTO Org Cases with Jira Issues flow, click Test. The flow goes into a read-only mode.
    Note: While the test is running, if you want to stop it, click Stop Test
  2. Log in to the NTO org’s Service Cloud, and then navigate to the Cases tab.
  3. Click New, create a case with the following values, and then click Save.
    • Contact Name: select a contact of your choice
    • Case Reason: Installation
    • Status: New
    • Priority: Medium
    • Case Origin: Email
    • Requires Engineering Assistance: selected
    • Subject: Issues with installation
    • Description: Customer’s unable to perform the activation step of the installation process.
  4. Go back to your flow and wait for the test to complete. If steps 1, 2, and 3 show a green check mark, this indicates the flow ran successfully. The condition in the If branch of the If/Else block evaluates to true. This indicates the NTO org case doesn’t have a corresponding Jira issue, so only the two steps in the 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 with If branch of If/Else block showing condition to determine if Jira issue ID is empty.Tested flow showing a green check mark on step 2 in If branch.Tested flow showing rest of step 2 in If branch.Tested flow showing a green check mark on step 3 in If branch.Tested flow showing Else branch of If/Else block and no green check mark on step 4.Tested flow showing rest of step 4 in Else branch.
  5. In your Customer Support project in Jira, click Issues. Verify the Issues with installation issue is created.
  6. Click Issues with installation. Notice the issue contains the case details from the corresponding NTO org case, including the Salesforce case ID. In this example, the Salesforce case ID is 5001U00000zgF6DQAU.
    Customer Support project showing Issues with installation issue with associated Salesforce case ID.
  7. In Service Cloud, verify the triggering case is updated with the Jira issue ID. In this example, the Jira issue ID is 10245.
    Case details with Jira issue ID.
  8. In the Sync NTO Org Cases with Jira Issues flow, click Test again.
  9. In the NTO org’s Service Cloud, update the case with the following values, and then click Save.
    • Case Reason: Installation
    • Status: Escalated
    • Priority: High
    • Subject: append subject with - ongoing
    • Description: append description with Customer needs the installation issues resolved ASAP.
  10. Go back to your flow and wait for the test to complete. If steps 1 and 4 show a green check mark, this indicates the flow ran successfully. The condition in the Else branch of the If/Else block evaluates to true. This indicates the NTO org case has a corresponding Jira issue, so only the step in the Else branch was executed.
    Tested flow showing a green check mark on step 1.Tested flow with If branch of If/Else block showing condition to determine if Jira issue ID is empty.Tested flow showing no green check mark on step 2 in If branch.Tested flow showing rest of step 2 in If branch.Tested flow showing no green check mark on step 3 in If branch.Tested flow showing Else branch of If/Else block and a green check mark on step 4.Tested flow showing rest of step 4 in Else branch.
  11. In your Customer Support project in Jira, click Issues. Verify the updated issue is Issues with installation - ongoing.
  12. Click Issues with installation - ongoing. Notice the issue contains the updated case details from the corresponding NTO org case.
    Customer Support project showing updated issue.
  13. Repeat steps 1 through 12 to test another NTO org case 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.

Comparta sus comentarios de Trailhead en la Ayuda de Salesforce.

Nos encantaría saber más sobre su experiencia con Trailhead. Ahora puede acceder al nuevo formulario de comentarios en cualquier momento en el sitio de Ayuda de Salesforce.

Más información Continuar a Compartir comentarios