Configuration

Routing Logic

Learn how to use Route Functions to direct data flow based on rules.

Updated 12/11/2025

Routing allows you to direct data to different functions based on specific criteria. This is handled by the Route Function.

Route Function Configuration

A Route Function (type: "route") evaluates the input against a list of configured routes.

Properties

  • routes: A list of route definitions.
    • name: Name of the route.
    • description: Optional description.
    • isErrorFallback: If true, this route is used when errors occur.
    • regex: Match input against regex patterns.
    • origin: Match based on origin (e.g., email patterns).
    • functionID: The function to route to if matched.

Example

1{
2  "type": "route",
3  "functionName": "invoice-router",
4  "routes": [
5    {
6      "name": "Urgent Invoices",
7      "regex": {
8        "patterns": ["URGENT.*"]
9      },
10      "functionID": "fn_urgent_processor"
11    }
12  ]
13}