Create ticket with ticket_form_id
Hello!
I want to create a generic UI form for creating Zendesk tickets. As far as I understand, I need to provide the `ticket_form_id` to be able to set the fields values and see them in the Zendesk web app.
So the idea is to let our users choose the form from the list, then request the selected form fields and show them on our UI. The issue starts here: the form `ticket_field_ids` is an array of both system and custom fields ids
1. Can we treat all the fields as custom and create / update them under the `custom_fields` property? I tried updating `priority` field in the sandbox and it works with updating it as a regular system field, but doesn't work under the `custom_fields` with `id` and `value`. Maybe the sandbox feature or lack of permissions..
2. a. If (1) is not possible, how can I distinguish custom and system fields (to update them separately via the API)? Could the `removable` property be an indicator ('false' for system fields)? Or maybe the `type` that won't be one of the 'integer', 'tagger', etc means the system field?
b. Also how can I know what is the name of the field in the API? The `type` field property maybe? There is also at least the 'assignee' field that should be set as a `assignee_id` according to the API spec but its type / titles are just 'assignee'..
-
Hi Tatsyana! Custom fields require the custom_field_id, however system fields are simply listed by their names, so you would not be able to pass them in the custom field array. There is also not a definitive way to determine if something is a system field, as the removable parameter only indicates whether the field must be present on a ticket. Since fields like Type are not required, that option won't work for you. Unfortunately, there simply isn't a way to accomplish this short of knowing which fields are definitively system fields, as we have laid out in this article.
Regarding the second question, you would use either the `raw_title` or the `raw_title_in_portal` parameter to get the name of the field.
댓글을 남기려면 로그인하세요.
1 댓글