If you've run into this error:
INVALID_SCREEN_DYNAMIC_DATA: ... is invalid as 'items' is defined in an array schema in the data model.
You're trying to bind a UI element to a schema definition instead of real data. It usually happens when the data model is an array of objects, and you're referencing items.properties directly.
Quick Fix
If you're using a binding like ${screen.ROOT.data.products.items.properties.title} in a TextSubheading, you're referencing a schema definition, not actual data. TextSubheading.text expects a string, not a schema object or an array. To fix this, bind to a specific item in the array like:
"text": "${screen.ROOT.data.products[0].title}"
This gives the widget an actual string value at runtime.
The Problem
This is invalid:
"text": "${screen.ROOT.data.products.items.properties.title}"
Here, products is an array. The path.items.properties.title points to the schema for each item in the array, not the actual title of any product.
But the TextSubheading.text property expects a string, not a schema or array.
The Solution
To get real data, bind to an actual index:
"text": "${screen.ROOT.data.products[0].title}"
This expression pulls the title from the first product in the array at runtime. You can also loop over the array with components like List, if you want to show multiple titles.
Use items.properties.title only in data model definitions, not in runtime bindings. At runtime, refer to actual array elements.
For more troubleshooting insights related to WhatsApp Business API, check out heltar.com/blogs.