Routes
A route is a name for a page of your application: shop for /shop, book-a-repair for /repairs/book. A step goes to a route by name.
Go to the shop page.Routes belong to the project and are shared by all its workflows. When a page’s path changes, you change the route once, and the next run of every workflow that uses it goes to the new path. Nothing is saved again.
Add and change routes
Section titled “Add and change routes”Choose Routes in the sidebar, under Workflows. The routes open in a panel over the page you are on, so you can add one while you write a step. Open as a page gives them a page of their own.
- Name: starts with a letter, then letters, digits,
-, and_. Choose a name that reads well in a sentence, since steps say “the shop page”. - Path: starts with
/. It is added to the environment’s base URL.
The list shows how many workflows use each route; hover the number to see which.
A step that goes to a page no route names, such as “Go to the rentals page” with no rentals route, needs a route. The editor offers Add the rentals route under the step, which opens Routes with the name filled in, ready for the path. Once the route is added, the step is read again. Adding a route needs permission to manage projects; anyone else sees that someone who manages the project can add it.
A route that a saved workflow’s steps go to cannot be deleted. Belay names the workflows; change those steps or delete those workflows first.
An agent uses list_routes, save_route, and delete_route.
Going somewhere without a route
Section titled “Going somewhere without a route”A step can give a path or a full address instead.
Go to /repairs/book.Go to https://example.com/pricing.A path works on every environment. A full address goes to that address whatever the environment, so use one only for a page outside your application.
The start page
Section titled “The start page”Every run opens a page before its first step. By default that is the environment’s base URL. To start somewhere else, choose a route as the Start page above the route list. The choice appears once the project has a route.
The start page lets a workflow begin with an action:
Click the Sign in link.If a workflow’s first step goes to a page itself, the run goes there and the start page is not opened.
In a run, a line above the steps says which page the run started on. If the start page did not open, step 1 does not run, and says why.
The route chosen as the start page cannot be deleted until you choose another, or go back to the base URL.
An agent sets it with set_start_page, or with save_route and start: true.