If you're working with conversational interfaces or UI configuration using a schema like the one shown above, you might run into the error:

INVALID_COMPLETE_ACTION: On-click-action 'complete' can only be configured on a terminal screen.

The fix is simple: make sure you're only using the "complete" action on terminal screens.

Read the complete blog to understand:

  • What the error means

  • Why it happens

  • How to fix it

What Does the Error Mean?

In most UI or bot frameworks (such as Google's App Actions or conversational screenflows), a "terminal screen" is the last screen in a conversation or flow. This is where the system considers the user interaction to be complete.

The "complete" action is used to end the flow and optionally return data or trigger backend processing.

So when the system says:

"'complete' can only be configured on a terminal screen", it means you can only use the complete action on screens that are designed to end the flow, not on intermediate screens.

Why You're Seeing the Error?

Here's the schema causing the issue:

{
  "version": "2.1",
  "screens": [
    {
      "id": "FIRST_SCREEN",
      "layout": {
        "type": "SingleColumnLayout",
        "children": [
          {
            "type": "Footer",
            "on-click-action": {
              "name": "complete",
              "payload": {}
            }
          }
        ]
      }
    }
  ]
}

Even though this is the only screen, the system doesn’t know it’s supposed to be the final screen. You're telling it to complete the action, but you haven't marked it as a terminal screen.

How to Fix It?

To fix the error, you need to declare the screen as a terminal screen by adding a "type": "TERMINAL" property at the screen level:

Corrected Schema

{
  "version": "2.1",
  "screens": [
    {
      "id": "FIRST_SCREEN",
      "type": "TERMINAL",
      "layout": {
        "type": "SingleColumnLayout",
        "children": [
          {
            "type": "Footer",
            "on-click-action": {
              "name": "complete",
              "payload": {}
            }
          }
        ]
      }
    }
  ]
}

By setting "type": "TERMINAL" on the screen, you're telling the engine:

"This is the last step. When the user clicks this button, complete the flow."

Quick Tips

  • Use "complete" only on screens with "type": "TERMINAL".

  • For all other screens, use actions like "next", "navigate", or custom ones.

The INVALID_COMPLETE_ACTION error is a common mistake when designing flows that involve user interaction. The fix is simple: make sure you're only using the "complete" action on terminal screens.

By keeping this rule in mind, you'll avoid frustrating schema errors and build more robust conversational experiences.