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,