When working with WhatsApp’s Flow Builder or sending custom Flow JSON, you might come across this error:

INVALID_ROUTING_MODEL  

Invalid screens found in the routing model: (screenIDs)

This error happens when your routing_model includes screen IDs that are not defined in the screens array.

Root Cause

In WhatsApp Flow JSON, the routing_model defines how users move between screens. Each key in the routing_model must reference a valid screen ID declared in the screens array. If any key (i.e., source screen) in routing_model doesn’t match a defined screen, WhatsApp throws this error.

JSON Structure Breakdown

screens

This is the list of all UI screens in your flow.

"screens": [
  {
    "id": "FIRST_SCREEN",
    "type": "FORM",
    ...
  }
]

routing_model

Defines the flow logic between screens — each key must match a screen.id.

"routing_model": {
  "FIRST_SCREEN": []
}

Invalid Example

Here’s a broken flow:

{
  "routing_model": {
    "ABC": []
  },
  "screens": [
    {
      "id": "FIRST_SCREEN",
      "type": "FORM"
    }
  ]
}

Issue:

  • ABC is defined as a routing key (source screen).
  • But there's no screen with id: "ABC" in the screens array.

So WhatsApp throws:

INVALID_ROUTING_MODEL  

Invalid screens found in the routing model: ABC

Fixed Example

{
  "routing_model": {
    "FIRST_SCREEN": []
  },
  "screens": [
    {
      "id": "FIRST_SCREEN",
      "type": "FORM"
    }
  ]
}

Now:

  • routing_model uses FIRST_SCREEN, which exists in screens.
  • All keys in the routing model are valid.
  • Flow is deployable.

How to Fix This Error

  1. Check the Error Message: Invalid screens found in the routing model: SCREEN_X

  2. Compare Routing Keys vs Screen IDs: Each key in routing_model must exist in screens.

  3. Fix One of the Following: Rename the routing key to match an existing screen ID. Add the missing screen to the screens array


WhatsApp Flow JSON is strict. Every screen ID in routing_model — whether it's a source or a target — must exist in screens. If it doesn’t, the API throws INVALID_ROUTING_MODEL.

Before deploying:

  • Validate your flow

  • Cross-check all screen references

  • Keep routing logic and screen definitions in sync

For more troubleshooting insights related to WhatsApp Business API, check out heltar.com/blogs.