# Virtuoso Flow

When testing applications, sooner or later you will come across non-standard scenarios. For example:

  • Multi-system scenarios: After raising an order in application A, ensure that the order has been raised in the internal billing system in application B.
  • Cross-dependency between journeys and goals: When journey A passes, run all tests in goal Y.
  • Conditional behaviour: If journey X passes, then execute journey Y; if it fails, trigger journey Z.
  • Integration with third parties: When a certain condition occurs, notify me on slack, with this message.

Flow is an official Virtuoso app which empowers you to build such custom flows against Virtuoso events, effectively building automation on top of Virtuoso.

You can think of these custom flows as rules: "when a certain condition is satisfied, perform these actions".

Beta notice

Although Flow is an official Virtuoso app and demonstrates the power of our app ecosystem, it is made available for evaluation as is, and its features or behavior may change in the future.

# Installing flow

To use this app you need to install it as an organization owner. First create a user on your organization with write access to the projects in which you want to use flow, then you can install Flow with the new user (see Installing an app).

By having a dedicated user for the flow automations it will make it easier to control what projects have the app active without limiting the actions of existing users. You can control this by sharing, changing the access level or revoking access to projects that the flow-user can access.

Flow user permissions

The permissions you give to the app user will control what flow can do with a specific project:

  • read: you are able to set up flows, and the app will receive events, but flow will not have permission to perform executions;
  • write or manage (recommended): all operations supported by flow are enabled, and the app will receive events and start executions when the rules are matched.

# Creating a new flow

Once a project has been shared with the user associated to the Flow app, the Manage Flows option becomes visible on the project's context menu:

Flow - Project's context menu

With this option you will be able to see the existing flows and add a new one with the Add a new flow button:

Flow - Adding a flow

A flow has two main sections:

  • IF: controls the conditions to trigger the flow;
  • THEN: specifies what actions should be performed if all conditions are met.

For example, the following flow means: if the journey to test booking a demo is executed then "execute" the journey to validate the booking:

Flow - Example flow - Demo booking

# Passing variables between journeys

One of the key features of Flow is that the value of all variables in your journey will be made available to subsequent executions in your Flow.

For example, if you execute journey A which raises an order and stores the $orderId variable during the journey, when journey B is executed using Flow, $orderId will be passed automatically from the triggering journey.

Max subsequent executions with Flow

As a security measure, we have a default limit of 20 subsequent executions with Flow (see Quotas and thresholds). If the limit is reached the flow will stop and subsequent flows will not execute.

# What can I do with flow?

Flow enables you to build any combination of conditions and actions. Here is an overview of the type of conditions and actions you can set.

# Conditions

  • Journey executed, with various filters such as:
    • Journey name, number, or canonical id (depending on the scenario, you may find it easier to rely on journey numbers)
    • Goal name,
    • Journey tag,
    • Execution outcome,
    • Duration of execution,
    • Data value in the execution.
  • Extension created or updated, with filters:
    • Project name,
    • Extension name.
  • Plan execution finished, with the following filters:
    • Project name,
    • Goal name,
    • Plan name,
    • Retry if failed (only for scheduled plans with retry if journey fails enabled).

Note: when setting conditions, all filters set must apply. For example, when you set a journey name filter and goal name filter, both the journey and goal names must match.

Plan with multiple goals

When a plan includes several goals, filters are applied individually to each goal. The condition is considered met if any of the goals satisfy the filter criteria.

# Actions

  • Execute a journey
  • Execute a goal
  • Execute a plan
  • Wait for a short period (up to 15 seconds)
  • Send a slack message
  • Commit extension to github (can be only combined with extension created)
  • Trigger a webhook URL
  • Set some data to context (to be used in conjunctions with other actions, such as executing a journey, where you want to pass a specific data to the corresponding execution)

Note: you can provide multiple actions as part of each flow, and they will be executed sequentially. For example, you can execute multiple journeys, trigger a webhook message, and trigger a slack message.

# Examples and ideas

To give you some ideas on what can be done, here are some examples you can follow:

  • Executing journeys based on other journeys: When my journey Book a demo is executed, execute a subsequent journey Verify booking to verify the specific demo request has been raised. All variables used in the Book a demo journey will be automatically passed to the Verify booking journey.
  • Version control for extensions: When my extension is created or updated, commit it to my GitHub repository. If you do not use GitHub, you can use a custom webhook handler to receive the event and use internal logic to store the integration.
  • Custom Slack notification: When journey with tag Smoke testing is executed, and it has failed, then notify a Slack channel with a custom message.
  • Triggering plans: If you want to trigger cross browser or data-driven tests, you can trigger plan executions. For example, when my journey Smoke end-to-end test has executed and passed, then trigger two plans: Cross-browser checks and Data-driven tests.

If you have an idea which you are unable to accomplish using our current collection of conditions and actions, please contact the customer success team.

# Tips and FAQ

# Why is my flow action not triggered?

A common reason why a flow does not start is condition case sensitivity, or incorrect filter values.

Note that all conditions are case sensitive, and all characters must match exactly. This means that if there is a non-standard space character in your filter, it may fail to match the right goal or journey. We suggest that you use simple names (e.g., only English letters and dash or underscore), or even resort to using Journey number instead of journey names.

# Why are my variables not passed to subsequent executions?

If you have more than 1000 steps executed in your journey, Virtuoso will omit returning side effects for that execution report, causing variables to not be passed forward. To avoid this, try to run your journey individually in your execution, and avoid having more than 1000 steps in the journey itself.

Last Updated: 3/5/2024, 7:03:13 AM