# Fixing INVALID_SCREEN_DYNAMIC_DATA in WhatsApp Flows: Type Mismatch in Data Model? Here’s the Fix
Author: Prashant Jangid
Author URL: https://www.heltar.com/blogs/author/prashant-jangid
Published: 2025-05-14
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-invalidscreendynamicdata-in-whatsapp-flows-type-mismatch-in-data-model-heres-the-fix-cmansjj8y0024runb7kqo36ma

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](https://www.heltar.com/blogs).


---
This blog is powered by Superblog. Visit https://superblog.ai to know more.
---

