[Trigger dev] Naming conventions for single_line_text_field

Hi there,

I’m trying to understand why my schema for a trigger is rejecting requests.

Here’s my schema for this setting:

[settings]

  [[settings.fields]]
  type = "order_reference"

  [[settings.field]]
  type = "single_line_text_field"
  key = "Check ID"
  description = "The ID check unique token. Can be used to retrieve the ID check details, or open the ID check link."

The Check ID setting is the issue. According to the Trigger dev docs, you must use spacing and alphanumeric characters. This is an external ID in this case, not referencing a Shopify resource like an order or customer.

Yet, when I attempt to initiate this trigger via a mutation, it’s rejected every time:

[
  {
    "field": [
      "body"
    ],
    "message": "Errors validating schema:\n  Invalid field: 'Check ID'.\n",
    "__typename": "UserError"
  }
]

But I know for certain that the string is passed correctly:

{
  handle: 'order-requires-id-verification',
  payload: { order_id: 111111111111, 'Check ID': 'abc123' }
}

I also tried using normal sentence case as the documentation suggests, but the same error persists:

  [[settings.field]]
  type = "single_line_text_field"
  key = "Check id"
  description = "The ID check unique token. Can be used to retrieve the ID check details, or open the ID check link."

Payload:

{
  handle: 'order-requires-id-verification',
  payload: { order_id: 111111111111, 'Check id': 'abc123' }
}

Result:

[
  {
    "field": [
      "body"
    ],
    "message": "Errors validating schema:\n  Invalid field: 'Check id'.\n",
    "__typename": "UserError"
  }
]

Is there some other validation around single_line_text_field’s in triggers that I’m missing? Maybe the keyword ID|id isn’t allowed?

Thanks,

If I leave the custom setting, yet omit the Check id or Check ID key from the payload, the mutation is accepted.

So something tells me that perhaps there’s some kind of issue within my .toml definition or perhaps Shopify Flow triggers can’t be updated once they’re initially published?

Try [[settings.fields]]

Wow, a single character makes all of the difference. I can’t believe I missed that.

Thank you so much @paul_n !!