ODBC Driver for Zendesk

Build 24.0.9060

TicketFields

Create, update, delete, and query TicketFields in Zendesk.

Table Specific Information

Select

The following queries are processed server side while other filters are processed client side within the driver.
SELECT * FROM TicketFields WHERE Id = '123'

Insert

The Type and Title fields are required to insert. Allowed for admins.

INSERT INTO TicketFields (Type, Title) VALUES ('text', 'Age')

To insert a ticket field of type tagger (dropdown) or multiselect (dropdown), CustomFieldOptions is also required. Allowed for admins.

INSERT INTO TicketFields (Type, Title, CustomFieldOptions) VALUES ('tagger', 'TestDropdown', '[{\"name\": \"Apple Pie\", \"value\": \"apple\"}, {\"name\": \"Pecan Pie\", \"value\": \"pecan\"}]')

To insert a ticket field of type regexp, RegexpForValidation is also required. Allowed for admins.

INSERT INTO TicketFields (Type, Title, RegexpForValidation) VALUES ('regexp', 'TestRegExp', '\\b([0-9]{4})-(1[0-2]|0?[1-9])-(3[0-1]|[1-2][0-9]|0?[1-9])\\b')

You can also create Lookup Relationships. A lookup relationship field is a custom field whose type is "lookup". This type of custom field gives you the ability to create a relationship from a source object to a target object. To create a lookup relationship fields, Type and RelationshipTargetType columns are required. The Type column value must be "lookup". A suitable combination of Field, Operator and Value is required for insertion in RelationshipFilterAll and RelationshipFilterAny. Here is a list of the possible combinations: "https://developer.zendesk.com/documentation/ticketing/reference-guides/conditions-reference/#shared-conditions".

INSERT INTO TicketFieldsRelationshipFilterAll#temp(Field, Operator, Value) VALUES ('role', 'is', 'Agent')
INSERT INTO TicketFieldsRelationshipFilterAny#temp(Field, Operator, Value) VALUES ('role', 'is', 'Agent')
INSERT INTO TicketFields (Type, Title, RelationshipTargetType, RelationshipFilterAll, RelationshipFilterAny) VALUES ('lookup', 'Lookup Relationships', 'zen:user', 'TicketFieldsRelationshipFilterAll#temp', 'TicketFieldsRelationshipFilterAny#temp')

Update

You must specify the Id of the ticket field to update. All fields that are not readonly (readonly="false" in the table) are optional. Allowed for admins.

UPDATE TicketFields SET Title = 'Your age' WHERE Id = '123'

For a ticket field of type tagger (dropdown) or multiselect (dropdown), use the CustomFieldOptions column to update the options. For type regexp use RegexpForValidation to update the regular expression.

Delete

You must specify the Id of the ticket field to delete it. Allowed for admins.

DELETE FROM TicketFields WHERE Id = '123'

Columns

Name Type ReadOnly References Description
Id [KEY] Long True

Automatically assigned when the ticket is created.

Type String False

The type of the ticket field: checkbox, date, decimal, integer, regexp, tagger, text, or textarea. Type is not editable once created.

Title String False

The title of the ticket field.

RawTitle String False

The dynamic content placeholder, if present, or the 'title' value, if not.

Description String False

The description of the purpose of this ticket field, shown to users.

RawDescription String False

The dynamic content placeholder, if present, or the 'description' value, if not.

Position Integer False

A relative position for the ticket fields that determines the order of ticket fields on a ticket. Note that positions 0 to 7 are reserved for system fields.

Active Boolean False

Whether this field is available.

Required Boolean False

Whether this field is available.

CollapsedForAgents Boolean False

If this field should be shown to agents by default or be hidden alongside infrequently used fields. Classic interface only.

RegexpForValidation String False

Regular expression field only. The validation pattern for a field value to be deemed valid.

TitleInPortal String False

The title of the ticket field when shown to end users.

RawTitleInPortal String False

The dynamic content placeholder, if present, or the 'title_in_portal' value, if not.

VisibleInPortal Boolean False

Whether this field is available to end users.

EditableInPortal Boolean False

Whether this field is editable by end users.

Tag String False

A tag value to set for checkbox fields when checked.

CreatedAt Datetime True

The time the ticket field was created.

UpdatedAt Datetime True

The time of the last update of the ticket field.

SystemFieldOptions String True

Presented for a ticket field of type 'tickettype', 'priority' or 'status'.

CustomFieldOptions String False

Required and presented for a ticket field of type 'tagger'.

Removable Boolean True

If this field is not a system basic field that must be present for all tickets on the account.

Url String True

The URL for this resource.

AgentDescription String False

A description of the ticket field that only agents can see.

CustomStatuses String True

List of customized ticket statuses. Only presented for a system ticket field of type custom_status.

RelationshipFilterAll String False

A filter definition that allows your autocomplete to filter down results with Logical AND.

RelationshipFilterAny String False

A filter definition that allows your autocomplete to filter down results with Logical OR.

RelationshipTargetType String False

A representation of what type of object the field references. Options are zen:user, zen:organization, zen:ticket, or zen:custom_object:CUSTOM_OBJECT_KEY. For example zen:custom_object:apartment.

RequiredInPortal String False

If true, end users must enter a value in the field to create the request.

SubTypeId String False

For system ticket fields of type priority and status. Defaults to 0. A priority sub type of 1 removes the Low and Urgent options. A status sub type of 1 adds the On-Hold option.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060