steampipe plugin install zendesk

Table: zendesk_user - Query Zendesk Users using SQL

Zendesk is a customer service software company that provides a cloud-based customer support platform improving the relationship between businesses and their customers. It offers a suite of support apps that helps improve customer service and having better customer engagement and relationships. The Users in Zendesk are the agents, administrators, or customers who can create and manage tickets.

Table Usage Guide

The zendesk_user table provides insights into Users within Zendesk. As a customer service manager, explore user-specific details through this table, including roles, emails, and active status. Utilize it to uncover information about users, such as their roles, email addresses, and whether they are active or not.

Examples

Basic user info

Determine the active status and last login details of users to better understand their engagement with your platform. This information could be useful in identifying patterns of usage or detecting inactive users.

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

List administrators

Explore which users in your Zendesk account have administrative privileges. This is useful for auditing account access and ensuring only the appropriate users have high-level permissions.

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

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

Determine the agents and administrators who haven't accessed the system in the last 30 days. This could be useful in assessing user engagement levels or identifying inactive accounts for potential follow-up or account management actions.

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

Number of users per organization

Explore which organizations have the most users, allowing you to understand user distribution and identify high-usage organizations. This can help in resource allocation and strategic planning.

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;
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;

Schema for zendesk_user

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
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 with 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
idbigint=Automatically assigned when the user is created
last_login_attimestamp with 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 with 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.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- zendesk

You can pass the configuration to the command with the --config argument:

steampipe_export_zendesk --config '<your_config>' zendesk_user