# Fixing INVALID_ROUTING_MODEL: No entry screen found 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-no-entry-screen-found-in-whatsapp-flow-json-cm98klgbl001y9eyz75bf5wax

When building WhatsApp Flows using a routing\_model, you may encounter this error:

**INVALID\_ROUTING\_MODEL**

**No entry screen found in the routing model. Expected a screen with no inbound edges as the entry screen.**

This error appears when no screen qualifies as a valid starting point for the user journey — i.e., there’s no screen with zero inbound routes.

## What’s an Entry Screen?

In any flow with a routing\_model, the entry screen is the screen where the conversation starts.

### Technically:

It’s the screen that:

- Is listed in the routing\_model.

- Does not appear as a target of any other screen.


The routing model forms a directed graph. The entry screen is the root node — it has no inbound edges.

## Problem Example

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

 **### Issue:**

- FIRST\_SCREEN → SECOND\_SCREEN

- SECOND\_SCREEN → FIRST\_SCREEN

- There is no screen with zero incoming connections

- WhatsApp has no idea where the flow starts


## Fixed Example

Break the loop and define a proper starting point:

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

Now:

- FIRST\_SCREEN has no inbound link → entry screen.

- SECOND\_SCREEN is routed to from FIRST\_SCREEN → all good.

- Flow can start at FIRST\_SCREEN as expected.


## How to Fix This Error

Step

What to Do

Identify all screen IDs in routing\_model

List both sources and targets

Find screen(s) with no inbound edges

These are potential entry screens

If none found, you likely have a circular flow or broken graph

Fix by removing cycles or adding a starting node

One screen must not be referenced as a target by any other screen

## Example: Valid vs Invalid

### Invalid (Loop):

```
"routing_model": {
  "A": [{ "target": "B" }],
  "B": [{ "target": "C" }],
  "C": [{ "target": "A" }]
}
```

No entry point. Every screen is a target.

### Valid (Tree):

```
"routing_model": {
  "A": [{ "target": "B" }, { "target": "C" }],
  "B": [],
  "C": []
}
```

A has no inbound edges → becomes the entry screen.

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

