Running into this error?
INVALID_SCREEN_DYNAMIC_DATA
Expected '${dataModelPointer}' to be of type '${expectedPropertyType}'.
You're referencing dynamic data correctly, but the value's type doesn't match what the component expects.
The Fix (TLDR):
Make sure the data you're binding has the correct type for the component. If your component expects a string, you can’t bind a boolean.
Example Fix:
Convert your boolean to a string in the data model:
"target": {
"type": "string",
"const": "true"
}
Or change the reference to work in a component that supports boolean logic (like conditional rendering), not in plain text.
The Problem Explained
Here’s what you have:
"text": "${data.top.secondLevel.target}"
But your schema defines target as:
"target": {
"type": "boolean"
}
The TextHeading component expects text to be a string, but you're giving it a boolean — which leads to the error.
Corrected Example
Option 1: Change target to a string if you want to render it directly.
"target": {
"type": "string",
"const": "true"
}
Option 2: Use the boolean value in a condition, not as text.
{
"type": "Conditional",
"condition": "${data.top.secondLevel.target}",
"child": {
"type": "TextHeading",
"text": "Target is true"
}
}
Best Practices
Match types exactly. If a component needs a string, don't give it a boolean, number, or object.
Avoid over-nesting. Deep objects are harder to debug when something breaks.
Use Conditional components for booleans instead of trying to render them directly as text.
This error is all about data types — not structure. Get that right, and you’re good to go. For more troubleshooting insights related to WhatsApp Business API, check out heltar.com/blogs.