While building WhatsApp flows using a data channel-less JSON format, you might see this error:
INVALID_ROUTING_MODEL: Number of branches exceeds the max limit of 10 for screen: (screenId). Reduce navigate actions for the screen.
This usually pops up when your screen layout contains too many navigation buttons. Here’s what’s going wrong—and how to fix it.
What This Error Means?
Each screen is allowed to have a maximum of 10 navigate actions—these are actions like buttons or clickable elements that take the user to another screen.
Once you exceed 10 navigation paths, WhatsApp considers the screen too complex and throws an INVALID_ROUTING_MODEL error.
Example That Triggers the Error
{
"screens": [
{
"id": "FIRST_SCREEN",
"layout": {
"children": [
{
"type": "Footer1",
"on-click-action": {
"name": "navigate",
"next": {
"type": "screen",
"name": "1"
}
}
},
{
"type": "Footer2",
"on-click-action": {
"name": "navigate",
"next": {
"type": "screen",
"name": "2"
}
}
},
...
{
"type": "Footer11",
"on-click-action": {
"name": "navigate",
"next": {
"type": "screen",
"name": "11"
}
}
}
]
}
}
]
}
This screen has 11 navigate actions, which is one over the allowed limit → error triggered.
How to Fix It?
You need to reduce the number of navigate actions per screen to 10 or fewer.
Option 1: Split Into Multiple Screens
Group your actions and move some to a secondary screen.
{
"screens": [
{
"id": "FIRST_SCREEN",
"layout": {
"children": [
{ "type": "Footer1", "on-click-action": { "name": "navigate", "next": { "name": "1" } } },
...
{ "type": "Footer9", "on-click-action": { "name": "navigate", "next": { "name": "9" } } },
{ "type": "More Options", "on-click-action": { "name": "navigate", "next": { "name": "SECOND_SCREEN" } } }
]
}
},
{
"id": "SECOND_SCREEN",
"layout": {
"children": [
{ "type": "Footer10", "on-click-action": { "name": "navigate", "next": { "name": "10" } } },
{ "type": "Footer11", "on-click-action": { "name": "navigate", "next": { "name": "11" } } }
]
}
}
]
}
Option 2: Use Menus, Pagination, or Scrollable Lists
If supported in your UI, consider:
Grouping items into a carousel or menu
Showing fewer options per screen
Using "Next" buttons to reveal more
For more troubleshooting insights related to WhatsApp Business API, check out heltar.com/blogs.