Hear from Salesforce leaders on how to create and deploy Agentforce agents.
Contact Us 1-800-596-4880

First Successful Router

The First Successful router iterates through a list of configured processing routes until one of the routes executes successfully. If any processing route fails execution (throws an error), the router executes the next configured route.

If none of the configured routes execute successfully, the First Successful router throws an error.

First Successful Router Configuration Example

The following example shows a First Successful router configured with four processing routes:

Execution behavior for the previous example is as follows:

  1. The first route executes and fails because it tries to read a file that does not exist.

  2. The second route fails because it tries to access a variable that does not exist.

  3. The third route executes successfully and sets variable successfulRoute with value 3.

  4. The fourth route is not executed because the First Successful router stops executing routes after one of them completes successfully.