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.
- 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. - Log in to the NTO org’s Service Cloud, and then navigate to the Cases tab.
- 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.
- 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.
- In your Customer Support project in Jira, click Issues. Verify the Issues with installation issue is created.
- 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.
- In Service Cloud, verify the triggering case is updated with the Jira issue ID. In this example, the Jira issue ID is 10245.
- In the Sync NTO Org Cases with Jira Issues flow, click Test again.
- 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.
- 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.
- In your Customer Support project in Jira, click Issues. Verify the updated issue is Issues with installation - ongoing.
- Click Issues with installation - ongoing. Notice the issue contains the updated case details from the corresponding NTO org case.
- 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.