# How to Fix INVALID_ON_CLICK_ACTION_PAYLOAD: Missing dynamic data in WhatsApp Flows
Author: Prashant Jangid
Author URL: https://www.heltar.com/blogs/author/prashant-jangid
Published: 2025-04-18
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-invalidonclickactionpayload-missing-dynamic-data-in-whatsapp-flows-cm9mvanf600d814n5kxftklmq

When building WhatsApp flows, you may encounter this error:

**INVALID\_ON\_CLICK\_ACTION\_PAYLOAD**

**Missing dynamic data '${expression}' in the data model for screen ${screenId}.**

**Data binding does not exist**

This error means you're trying to use a dynamic value like ${data.something} in your action payload, but that value is not available in the screen’s data model.

### Why This Happens

The error occurs when:

- You reference a data field in ${data.field\_name}, but that field was never defined or passed into the screen.

- Your component is expecting to use data that isn’t available at runtime.


In other words, the screen doesn’t know what ${data.not\_present} is because you haven’t provided it anywhere.

### Problem Example

```
{
  "type": "Form",
  "name": "PASS_CUSTOM_VALUE",
  "children": [
    {
      "type": "Footer",
      "on-click-action": {
        "name": "complete",
        "payload": {
          "input": "${data.not_present}"
        }
      }
    }
  ]
}
```

Here, the payload references ${data.not\_present}. But since not\_present was never defined in the screen’s data model, the system throws an error.​

### How to Fix It?

To resolve this, you have two options depending on your intent:

#### Option 1: Pass the Required Data to the Screen

If you intend to use data from a previous step, make sure it’s explicitly included in the screen’s input data.

Example screen data model:

```
{
  "screen": {
    "id": "PASS_CUSTOM_VALUE",
    "data": {
      "custom_value": "user_input"
    }
  }
}
```

Then reference it in your component:

"input": "${data.custom\_value}"

#### Option 2: Use Form Input Instead (If You Meant to Capture User Input)

If the data is supposed to come from the user via form input, you should reference ${form.input\_name} instead.

Example:

```
{
  "type": "Form",
  "name": "PASS_CUSTOM_VALUE",
  "children": [
    {
      "type": "Input.Text",
      "name": "custom_value",
      "label": "Enter a value"
    },
    {
      "type": "Footer",
      "on-click-action": {
        "name": "complete",
        "payload": {
          "input": "${form.custom_value}"
        }
      }
    }
  ]
}
```

This ensures the payload references a value the user actually provides.

### Key Differences Between ${form} and ${data}

Expression

Source

Use Case

${form.input}

User input from the current form

Collecting input from a user

${data.field}

Pre-populated data passed into the screen

Using existing data or values

The INVALID\_ON\_CLICK\_ACTION\_PAYLOAD error occurs when a payload references ${data.something} that doesn't exist in the screen’s data model. Make sure the value either exists in the screen’s input data or is collected via a form. Always double-check whether you're referencing data or form input and that the data is actually present and correctly named.

For more troubleshooting insights related to WhatsApp Business API, check out [heltar.com/blogs](http://heltar.com/blogs).


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

