POST /v2/users/{userId}/attributes returns a 400 Bad Request with message: “Invalid attribute key format”.
We are migrating from Zendesk to Genesys Cloud. The goal is to map Zendesk ticket custom fields (e.g., customer_tier, account_id) to Genesys Cloud user attributes for routing and reporting purposes. The migration script uses the Genesys Cloud Platform API v2. The issue arises when trying to set user attributes via the API. The attribute keys in Zendesk contain underscores and special characters, which seem to be rejected by Genesys Cloud.
Environment Details:
- Genesys Cloud Version: Latest (as of 2023-10)
- API Endpoint: POST /v2/users/{userId}/attributes
- SDK: Genesys Cloud Python SDK v3.0.1
- Zendesk Custom Fields:
customer_tier,account_id,priority_level - Genesys Cloud User Attributes: Expected to mirror Zendesk fields
The error occurs when the attribute key contains underscores or special characters. For example, setting customer_tier fails, but customerTier works. This is problematic because we want to maintain consistency with Zendesk field names for easier mapping and reporting.
Has anyone encountered this issue? Is there a workaround or a best practice for mapping Zendesk custom fields to Genesys Cloud user attributes while preserving field names?