theapsgroup/freshservice
steampipe plugin install theapsgroup/freshservice

Table: freshservice_agent

Obtain information about Agents (operators) of the FreshService instance.

Examples

List all agents

select
*
from
freshservice_agent;

List agents that have logged in within last 10 days

select
*
from
freshservice_agent
where
last_login_at > now() :: date -10;

List agents and reporting manager name

select
a.id,
concat(a.first_name, ' ', a.last_name) as agent_name,
a.email,
a.active,
concat(m.first_name, ' ', m.last_name) as manager_name
from
freshservice_agent a
left join freshservice_agent m on a.reporting_manager_id = m.id;

Schema for freshservice_agent

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
activeboolean=True if the agent is active (enabled).
addresstextAddress of the agent.
background_informationtextBackground information of the agent.
created_attimestamp with time zoneTimestamp when the agent was created.
department_idsjsonbArray of Unique IDs of the departments associated with the agent
emailtext=Email address of the agent.
first_nametextFirst name of the agent.
has_logged_inbooleanSet to true if the agent has logged in to Freshservice at least once, and false otherwise.
idbigint=User ID of the agent.
job_titletextJob title of the agent.
languagetextLanguage used by the agent. The default language is β€œen” (English).
last_active_attimestamp with time zoneTimestamp of the agent's recent activity.
last_login_attimestamp with time zoneTimestamp of the agent's last successful login.
last_nametextLast name of the agent.
location_idbigintID of the location associated with the agent.
member_ofjsonbArray of group IDs that the agent is a member of.
mobile_phone_numbertextMobile phone number of the agent.
occasionalbooleanTrue if the agent is an occasional agent, and false if full-time agent.
reporting_manager_idbigintUser ID of the agent's reporting manager.
rolesjsonbArray of roles assigned to the agent, each individual role is a hash that contains the attributes role_id, assignment_scope & groups.
scoreboard_level_idbigintID of the level of the agent in the Arcade. 1 (Beginner), 2 (Intermediate), 3 (Professional), 4 (Expert), 5 (Master), 6 (Guru).
time_formattextAgents chosen time format (12h or 24h)
time_zonetextTime zone associated to the agent.
updated_attimestamp with time zoneTimestamp when the agent was last updated.
work_phone_numbertextWork phone number of the agent.