# Fixing INVALID_ROUTING_MODEL: Following screens are not connected in WhatsApp Flow JSON
Author: Prashant Jangid
Author URL: https://www.heltar.com/blogs/author/prashant-jangid
Published: 2025-04-08
Category: Troubleshoot
Category URL: https://www.heltar.com/blogs/category/troubleshoot
Tags: WhatsApp Flows Error
Tag URLs: WhatsApp Flows Error (https://www.heltar.com/blogs/tag/whatsapp-flows-error)
URL: https://www.heltar.com/blogs/fixing-invalidroutingmodel-following-screens-are-not-connected-in-whatsapp-flow-json-cm98jv8t7001o9eyzbklex2ui

When building data-channel-less WhatsApp Flows (where navigation is driven by UI actions, not a routing\_model), you may run into this error:

**INVALID\_ROUTING\_MODEL**

**Following screens are not connected to any of the screens: (screenIDs). A connection is formed by the navigate screen action.**

Let’s look at what this means and how to fix it.

## What This Error Actually Means

This error is triggered when a screen exists in the screens array, but:

- It is not connected to any other screen via a navigate action.

- And you haven’t specified a routing\_model manually (as is standard in data-less flows).


In this flow type, WhatsApp builds the routing graph implicitly, based on on-click-action → navigate references.

If a screen is never navigated to (or from), WhatsApp considers it an orphan, and throws the error.

## Structure Overview (Data-Channel-Less Flow)

```
{
  "screens": [
    {
      "id": "FIRST_SCREEN",
      "layout": {
        "children": [
          {
            "type": "Footer",
            "on-click-action": {
              "name": "navigate",
              "parameters": {
                "target_screen_id": "SECOND_SCREEN"
              }
            }
          }
        ]
      }
    },
    {
      "id": "SECOND_SCREEN",
      ...
    }
  ]
}
```

In this structure:

- No routing\_model is defined.

- WhatsApp analyzes each navigate action to understand how screens connect.

- If a screen is not the target of any navigate, it’s flagged as unconnected.


Invalid Example

```
{
  "screens": [
    {
      "id": "FIRST_SCREEN",
      "layout": {
        "children": [
          {
            "type": "Footer",
            "on-click-action": {
              "name": "data_exchange",
              "parameters": { ... }
            }
          }
        ]
      }
    },
    {
      "id": "SECOND_SCREEN",
      ...
    }
  ]
}

```

Issue:

- SECOND\_SCREEN is defined.

- But no screen navigates to it.

- data\_exchange is not a navigation action.


​So WhatsApp throws:

**INVALID\_ROUTING\_MODEL**

**Following screens are not connected to any of the screens: SECOND\_SCREEN**

## Fixed Example

Update your button or footer to include a navigate action that links to SECOND\_SCREEN:

```
{
  "screens": [
    {
      "id": "FIRST_SCREEN",
      "layout": {
        "children": [
          {
            "type": "Footer",
            "on-click-action": {
              "name": "navigate",
              "parameters": {
                "target_screen_id": "SECOND_SCREEN"
              }
            }
          }
        ]
      }
    },
    {
      "id": "SECOND_SCREEN",
      ...
    }
  ]
}
```

Now:

- FIRST\_SCREEN links to SECOND\_SCREEN via navigation.

- Both screens are connected in the inferred routing graph.

- Error resolved.


How WhatsApp Infers Routing Without routing\_model

In data-less flows, WhatsApp constructs the flow graph like this:

1. Parses all on-click-action: { name: "navigate", ... }

2. Connects source → target screen via target\_screen\_id

3. If a screen is never targeted, it’s considered unconnected → Error


No navigate = no link in routing.

## Testing Tips

- Every screen must be reachable via at least one navigate action.

- You can still use other actions (e.g., data\_exchange, submit\_form) — but they won’t create navigation links.

- Validate by following the full screen flow from the entry point.


For more troubleshooting insights related to WhatsApp Business API, check out [heltar.com/blogs](http://heltar.com/blogs).


---
This blog is powered by Superblog. Visit https://superblog.ai to know more.
---

