# Fixing INVALID_ROUTING_MODEL: Following screens are not connected with the rest of the screens 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-with-the-rest-of-the-screens-in-whatsapp-flow-json-cm98k91t8001p9eyzz8d867dz

When building WhatsApp Flows using a routing\_model, you might run into this error:

**INVALID\_ROUTING\_MODEL**

**Following screens are not connected with the rest of the screens: (screenIDs). All screens should be connected.**

This happens when a valid screen exists in both screens and routing\_model, but is isolated — meaning it can’t be reached from the main flow.

## What This Error Actually Means

WhatsApp validates the entire routing model as a connected graph.

If a screen:

- Exists in screens.

- Is listed in routing\_model.

- But is not reachable from any other screen.


Then it is treated as disconnected — causing this error.

This is different from missing or invalid screen references. The screen itself is valid — it's just logically unreachable.

## What a Connected Flow Looks Like

A connected flow has a single unified path where:

- Every screen can be reached from an entry point (typically the first screen).

- All routing paths connect directly or indirectly.


For example:

```
"routing_model": {
  "FIRST_SCREEN": [
    { "target": "SECOND_SCREEN" }
  ],
  "SECOND_SCREEN": [
    { "target": "THIRD_SCREEN" }
  ],
  "THIRD_SCREEN": []
}
```

All screens are linked → No error.

## Invalid Example (Disconnected Routing)

```
{
  "routing_model": {
    "FIRST_SCREEN": [
      { "target": "SECOND_SCREEN" }
    ],
    "THIRD_SCREEN": []
  },
  "screens": [
    { "id": "FIRST_SCREEN", ... },
    { "id": "SECOND_SCREEN", ... },
    { "id": "THIRD_SCREEN", ... }
  ]
}
```

Problem:

- THIRD\_SCREEN is never linked from any screen.

- It's in routing\_model and screens, but is orphaned.


WhatsApp throws:

**INVALID\_ROUTING\_MODEL**

**Following screens are not connected with the rest of the screens: THIRD\_SCREEN.**

## Fixed Example

```
{
  "routing_model": {
    "FIRST_SCREEN": [
      { "target": "SECOND_SCREEN" }
    ],
    "SECOND_SCREEN": [
      { "target": "THIRD_SCREEN" }
    ],
    "THIRD_SCREEN": []
  },
  "screens": [
    { "id": "FIRST_SCREEN", ... },
    { "id": "SECOND_SCREEN", ... },
    { "id": "THIRD_SCREEN", ... }
  ]
}
```

Now all screens are connected in a single flow → Error resolved

## How to Fix It (Step-by-Step)

**1\. Read the Error Message:** Following screens are not connected with the rest of the screens: SCREEN\_X

**2\. Check the routing\_model Graph:**

- Is SCREEN\_X linked from any other screen?

- If not, it's disconnected.


**3\. Fix It by:**

- Linking to the screen from a previous step.

- Or removing the screen if it’s not supposed to be in the flow.


Graph Validation Tips

- Start from entry screen (e.g. FIRST\_SCREEN).

- Trace all reachable screens using target.

- Any screen not part of this trace is considered disconnected.

- A flow is valid only if it forms a single connected graph.


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.
---

