turbot/zendesk

steampipe plugin install zendesksteampipe plugin install zendesk

Table: zendesk_user

Zendesk Support has three types of users: end users (your customers), agents, and administrators.

Examples

Basic user info

select
id,
name,
email,
active,
last_login_at
from
zendesk_user;

List administrators

select
name,
email
from
zendesk_user
where
role = 'admin';

Agents and admins (paid seats) who have not logged in for 30 days

select
name,
email,
role,
last_login_at
from
zendesk_user
where
role in ('admin', 'agent')
and
last_login_at < current_date - interval '30 days';

Number of users per organization

select
o.name,
count(*)
from
zendesk_user as u,
zendesk_organization as o
where
u.organization_id = o.id
group by
o.id,
o.name
order by
count desc;

.inspect zendesk_user

Zendesk Support has three types of users: end users (your customers), agents, and administrators.

NameTypeDescription
activebooleanFalse if the user has been deleted
aliastextAn alias displayed to end users
chat_onlybooleanWhether or not the user is a chat-only agent
created_attimestamp without time zoneThe time the user was created
custom_role_idbigintA custom role if the user is an agent on the Enterprise plan
default_group_idbigintThe id of the user's default group
detailstextAny details you want to store about the user, such as an address
emailtextThe user's primary email address. *Writeable on create only. On update, a secondary email is added.
external_idtextA unique identifier from another system. The API treats the id as case insensitive. Example: "ian1" and "Ian1" are the same user
idbigintAutomatically assigned when the user is created
last_login_attimestamp without time zoneThe last time the user signed in to Zendesk Support
localetextThe user's locale. A BCP-47 compliant tag for the locale. If both "locale" and "locale_id" are present on create or update, "locale_id" is ignored and only "locale" is used.
locale_idbigintThe user's language identifier
moderatorbooleanDesignates whether the user has forum moderation capabilities
nametextThe user's name
notestextAny notes you want to store about the user
only_private_commentsbooleantrue if the user can only create private comments
organization_idbigintThe id of the user's organization. If the user has more than one organization memberships, the id of the user's default organization
phonetextThe user's primary phone number.
photo_content_typetextThe content type of the image. Example value: "image/png"
photo_content_urltextA full URL where the attachment image file can be downloaded
photo_deletedtextIf true, the attachment has been deleted
photo_file_nametextThe name of the image file
photo_idbigintAutomatically assigned when created
photo_inlinebooleanIf 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
photo_sizebigintThe size of the image file in bytes
photo_thumbnailsjsonbAn array of attachment objects. Note that photo thumbnails do not have thumbnails
report_csvbooleanWhether or not the user can access the CSV report on the Search tab of the Reporting page in the Support admin interface.
restricted_agentbooleanIf the agent has any restrictions; false for admins and unrestricted agents, true for other agents
roletextThe user's role. Possible values are "end-user", "agent", or "admin"
role_typebigintThe user's role id. 0 for custom agents, 1 for light agent, 2 for chat agent, and 3 for chat agent added to the Support account as a contributor (Chat Phase 4)
sharedbooleanIf the user is shared from a different Zendesk Support instance. Ticket sharing accounts only
shared_agentbooleanIf the user is a shared agent from a different Zendesk Support instance. Ticket sharing accounts only
shared_phone_numberbooleanWhether the phone number is shared or not.
signaturetextThe user's signature. Only agents and admins can have signatures
suspendedbooleanIf the agent is suspended. Tickets from suspended users are also suspended, and these users cannot sign in to the end user portal
tagsjsonbThe user's tags. Only present if your account has user tagging enabled
ticket_restrictiontextSpecifies which tickets the user has access to. Possible values are: "organization", "groups", "assigned", "requested", null
timezonetextThe user's time zone.
two_factor_auth_enabledbooleanIf two factor authentication is enabled
updated_attimestamp without time zoneThe time the user was last updated
urltextThe user's API url
user_fieldsjsonbValues of custom fields in the user's profile.
verifiedbooleanAny of the user's identities is verified.