Looking for advice on custom data action validation errors during automated deployment.
Running Terraform apply to update a custom data action in our AU-1 BYOC environment. The plan succeeds, but the apply step fails with a 422 Unprocessable Entity error. The error message indicates that the expression field is invalid, specifically citing a syntax error in the JSON path logic. I have verified the JSON structure against the Genesys Cloud schema validator and it passes locally. The issue seems specific to the API endpoint /api/v2/analytics/datadefinitions when used via the GC CLI wrapper.
Here is the relevant HCL snippet:
resource "genesyscloud_routing_dataaction" "my_action" {
name = "CalculateScore"
description = "Calculates customer score based on interaction history"
expression = "json.path('$', 'interaction.score') > 80"
attributes {
key = "score"
value = "json.path('$', 'interaction.score')"
}
}
The CLI output shows:
Error: API returned 422 Unprocessable Entity
Validation Error: The expression field contains invalid syntax.
This works fine in our dev environment (US-1). Is there a known discrepancy in how AU-1 BYOC handles JSON path expressions in data actions? Or is this a caching issue with the schema validator? Any insights would be appreciated.