JDBC Driver for Zendesk

Build 22.0.8462

Users

Create, update, delete, and query Users 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 Users

SELECT * FROM Users WHERE Id = '123'

SELECT * FROM Users WHERE Id IN ('123', '456')

SELECT * FROM Users WHERE GroupId = '123'

SELECT * FROM Users WHERE OrganizationId = '123'

SELECT * FROM Users WHERE Role = 'agent'

SELECT * FROM Users WHERE PermissionSet = 'roleid'

You can turn off the client-side execution of the query by setting SupportEnhancedSQL to false in which case any other search criteria will be ignored and an unfiltered response will be returned.

Insert

The Name field is required to insert. Allowed for agents, with restrictions on certain actions.

INSERT INTO Users(Name, Email) VALUES('Roger Wilco', '[email protected]')

To insert multiple users, see Batch Processing for an example.

If you need to create agents with a specific role, the Role parameter only accepts three possible values: "end-user", "agent", and "admin". Therefore, set the Role to "agent" as well as add a new parameter called "custom_role_id" and give it the actual desired role Id from your Zendesk Support account. This applies to the built-in "light-agent" role of Zendesk Support as well.

INSERT INTO Users(Name, Email,Role,CustomRoleId) VALUES('Roger Wilco', '[email protected]', 'agent', '123456')

The user can also be added to a named organization.

INSERT INTO Users(Name, Email,Organization) VALUES('Roger Wilco', '[email protected]', 'VIP Customers')

Update

You must specify the Id of the user to update. All fields that are not readonly (readonly="false" in the table) are optional. Allowed for agents, with restrictions on certain actions. Agents can only update end users. Administrators can update end users, agents, and administrators.

UPDATE Users SET Name='Roger Wilco II' WHERE Id='123'

To make the same change to multiple users, use the following SQL statement:

UPDATE Users SET OrganizationId='1' WHERE Id IN ('123','456')

To make different changes to multiple users, see Batch Processing for an example.

Delete

You must specify the Id of the user to delete it. Allowed for agents, with restrictions on certain actions.

DELETE FROM Users WHERE Id='123'

You can delete many tickets simultaneously by providing their Ids:

DELETE FROM Users WHERE Id IN ('123','456')

Columns

Name Type ReadOnly References Description
Id [KEY] Long True

Automatically assigned when the ticket is created.

Email String False

The primary email address of the user. Writeable on create only. On update, a secondary email is added.

Name String False

The name of the user.

Role String False

The role of the user. Possible values are end-user, agent, or admin.

Active Boolean True

False if the user has been deleted.

OrganizationId Long False

Organizations.Id

The id of the organization the user is associated with.

Alias String False

An alias displayed to end users.

Verified Boolean False

If the identity of the user has been verified or not.

ChatOnly Boolean True

Whether or not the user is a chat-only agent.

CreatedAt Datetime True

The time the user was created.

UpdatedAt Datetime True

The time the user was last updated.

CustomRoleId Long False

A custom role if the user is an agent on the Enterprise plan.

RoleType String True

The role id of the user. 0 for custom agents, 1 for light agent and 2 for chat agent.

DefaultGroupId Long False

The id of the default group of the user. Can only be set on create, not on update.

Details String False

Any details you want to store about the user, such as an address.

ExternalId Long False

A unique identifier from another system.

LastLoginAt Datetime True

The last time the user signed in to Zendesk Support.

Locale String True

The locale of the user.

LocaleId Long False

The language identifier of the user.

Moderator Boolean False

Designates whether the user has forum moderation capabilities.

Notes String False

Any notes you want to store about the user.

OnlyPrivateComments Boolean False

True if the user can only create private comments.

Phone String False

The primary phone number of the user.

Photo String True

photo attachment.

PhotoThumbnails String True

photo thumbnails.

PhotoInline Boolean True

If true, the attachment is excluded from the attachment list and the attachment's URL can be referenced within the comment of a ticket. Default is false.

RestrictedAgent Boolean False

If the agent has any restrictions; false for admins and unrestricted agents, true for other agents.

Shared Boolean True

If the user is shared from a different Zendesk Support instance. Ticket sharing accounts only.

SharedAgent Boolean True

If the user is a shared agent from a different Zendesk Support instance. Ticket sharing accounts only.

Signature String False

The signature of the user. Only agents and admins can have signatures.

Suspended Boolean False

If the agent is suspended. Tickets from suspended users are also suspended, and these users cannot sign in to the end user portal.

Tags String False

The tags of the user. Only present if your account has user tagging enabled.

TicketRestriction String False

Specifies which tickets the user has access to. Possible values are: organization, groups, assigned, requested, null.

TimeZone String False

The time zone of the user.

TwoFactorAuthEnabled Boolean True

If two factor authentication is enabled.

Url String False

The API url of the user.

Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
GroupName String

Organization String

The name of the organization the user is associated with.

GroupId String

The name of the group the user belongs to.

PermissionSet String

Used for custom roles in the Enterprise plan. You can only filter by one role id per request.

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462