trying to understand why importing zendesk custom fields via api returns 400 bad request
we are in the middle of migrating our support desk from zendesk to genesys cloud. the team is very excited about the unified platform but the initial data sync is giving us headaches. specifically, we are trying to map our zendesk ticket custom fields to genesys cloud interaction attributes using the /api/v2/attributes endpoint.
the goal is to preserve the historical data context. in zendesk, we have a custom field cf_priority_level which is a dropdown. we want to create a corresponding attribute in genesys cloud so that when the ticket data is ingested, the priority is correctly mapped to the interaction object.
here is the json payload we are sending:
{
"key": "priority_level",
"name": "Priority Level",
"type": "string",
"description": "Migrated from Zendesk custom field cf_priority_level",
"scope": "interaction"
}
we are getting a 400 Bad Request error. the response body says:
{
"errors": [
{
"code": "invalid_request",
"message": "Attribute key must be unique within the scope."
}
]
}
this is confusing because we checked the existing attributes via the get all attributes endpoint (/api/v2/attributes?scope=interaction) and there is no attribute with the key priority_level. we are using the genesys cloud python sdk version 2.15.0. our environment is in the eu-west-1 region.
is there a naming convention we are missing? in zendesk, the keys are often prefixed with cf_. should we keep that prefix? also, are there any restrictions on attribute names coming from the migration context? we tried removing the prefix and it still failed.
any help would be great. we want to make sure the agents see the correct priority when they pull up the interaction in the agent desktop. thanks!