Agent Scripting API 400 Error: Migrating Zendesk Macros to GC Script Nodes

I’m curious as to why the Platform API returns a 400 Bad Request when attempting to create script nodes via the POST /v2/scripts/{scriptId}/nodes endpoint? We are in the middle of a Zendesk-to-GC migration project, trying to replicate Zendesk macro functionality using Genesys Cloud Agent Scripting. The goal is to map Zendesk ticket comments and field updates to GC script nodes that trigger API calls or set interaction attributes.

The environment is EU-West-1, using Genesys Cloud API v2. The migration script pulls Zendesk macro actions and attempts to translate them into GC script node JSON payloads. Here is the exact sequence of events leading to the failure:

  1. Extract Zendesk macro definition via Zendesk API, specifically focusing on “Add comment” and “Change field value” actions.
  2. Construct a Genesys Cloud script node payload. For a “Change field value” action, we map the Zendesk custom field ID to a Genesys Cloud Interaction Attribute.
  3. Send a POST request to /v2/scripts/{scriptId}/nodes with the JSON body containing the node type (e.g., “set-interaction-attribute”) and the attribute key/value pairs.
  4. Receive a 400 Bad Request response with the error message: “Invalid node configuration. Attribute key ‘zd_priority’ is not a valid interaction attribute type.”

The Zendesk custom field ‘zd_priority’ exists in our Zendesk instance and maps correctly to a Genesys Cloud Organization Attribute in our initial tests. However, the script node creation fails when trying to set it as an Interaction Attribute. We have verified that the script ID is valid and the user has the necessary permissions. The error suggests a mismatch in attribute types between what Zendesk provides and what Genesys Cloud expects for script nodes.

Is there a specific mapping rule for Zendesk custom fields to Genesys Cloud interaction attributes in the context of Agent Scripting? Or are we missing a step in the attribute definition process before creating the script nodes? Any guidance on how to properly structure the JSON payload for these nodes would be appreciated. We are stuck on this migration step and need to resolve it before proceeding with the rest of the workflow migration.