Gateways and junctions

Use a gateway when you don't know which screen or state comes next: the bot tries each branch until one works. Use a junction to merge several paths into one.

Help Centre › Building Processes

A gateway lets the bot try several branches and carry on down the first one that works. A junction merges several paths back into one. Both are added from the Add step tab on the process map.

1. What a gateway does

Use a gateway when the next step depends on what is on the screen, and you can't test for it with a simple condition. For example, after signing in a website may show the dashboard, a "change your password" page, or a cookie banner.

When the run reaches a gateway, the bot:

  1. Takes the first branch and runs the first step of that branch.
  2. If that step works, the run carries on from that step, down that branch.
  3. If it fails, the bot tries the first step of the next branch, and so on.
  4. If every branch fails, the gateway fails with "All gateway branches failed". An EXCEPTION connection from the gateway catches this.

Each branch's first step gets a short time to work: the wait set on the connection into it, or 3 seconds if none is set. Keep that first step a quick check, such as "Check if element exists" or "Check if window exists", so a wrong branch fails fast.

A gateway has no AND/OR setting and no conditions to fill in. Its form only asks for a name and a description. To pick a branch by a value, use a Switch. To pick between two paths by a condition, use a Decision.

Add a gateway

  1. On the process map, open the Add step tab and drag Gateway onto the canvas.
  2. Give it a name, for example "Which page opened?", and click Add.
  3. Draw a connection from the gateway to the first step of each branch. You need at least two. Every branch connection must be DEFAULT; a gateway can't have a FALSE connection. If the map makes a new connection EXCEPTION (red), click it and change it to DEFAULT.
  4. Optionally add one EXCEPTION connection for when no branch works.

2. Junctions: merge paths into one

A junction is a pass-through point. Several connections go in and one comes out. It makes no choice; whichever path arrives, the run carries on out the other side.

Junctions keep a map readable. Without one, several steps that all lead to the same next step give you a tangle of crossing lines.

  1. Open the Add step tab and drag Junction onto the canvas.
  2. Connect the incoming paths to it, and draw one connection from it to the next step.

3. Which one to use

You want toUse
Go one of two ways, based on a conditionDecision
Go one of many ways, based on a valueSwitch
Try several ways and keep the first that worksGateway
Bring several paths back togetherJunction

Get started

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or have your first automation working in 7 days.