steampipe plugin install zendesk

Table: zendesk_trigger - Query Zendesk Triggers using SQL

Zendesk Triggers are automated actions that occur when tickets meet predefined conditions. Triggers are used to streamline customer support workflows by automatically updating ticket properties and sending notifications to customers and agents. They play a crucial role in the automation and efficiency of ticket handling within the Zendesk Support Suite.

Table Usage Guide

The zendesk_trigger table provides insights into triggers within Zendesk Support Suite. As a support manager or system administrator, explore trigger-specific details through this table, including conditions, actions, and associated metadata. Utilize it to uncover information about triggers, such as those with specific conditions or actions, the order of triggers, and the verification of trigger effectiveness.

Examples

List triggers in order

Identify the sequence of active triggers to understand their order of execution. This is useful for troubleshooting and optimizing workflow processes.

select
position,
title
from
zendesk_trigger
where
active
order by
position;
select
position,
title
from
zendesk_trigger
where
active = 1
order by
position;

List all inactive triggers

Explore which triggers are currently inactive in your Zendesk account. This can be useful for cleaning up your configuration and reactivating or deleting unused triggers to improve system performance.

select
title
from
zendesk_trigger
where
not active;
select
title
from
zendesk_trigger
where
not active;

Find triggers that only work on high priority tickets

Explore which triggers are set to activate only on high-priority tickets, allowing you to prioritize and manage your customer service resources efficiently. Additionally, gain insights into the specific actions each trigger initiates, helping you understand and optimize your automated support processes. Triggers include both all (conditions_all) and any (conditions_any) fields. Read more here.

This test checks if conditions_all requires the ticket to be in a high priority for the trigger to run. We rely on JSON submatching in postgres to find the condition among the array.

select
title,
conditions_all
from
zendesk_trigger
where
conditions_all @> '[{"field":"priority","operator":"value","value":"high"}]';
select
title,
conditions_all
from
zendesk_trigger
where
json_extract(conditions_all, '$[0].field') = 'priority'
and json_extract(conditions_all, '$[0].operator') = 'value'
and json_extract(conditions_all, '$[0].value') = 'high';

Expand the actions for each trigger

select
title,
jsonb_path_query(actions, '$[*].field') as actions,
jsonb_path_query(actions, '$[*].value')
from
zendesk_trigger;
select
title,
json_extract(actions, '$[*].field') as actions,
json_extract(actions, '$[*].value')
from
zendesk_trigger;

Schema for zendesk_trigger

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
actionsjsonbAn array of actions describing what the trigger will do.
activebooleanWhether the trigger is active
conditions_alljsonbTrigger if all conditions are met.
conditions_anyjsonbTrigger if any condition is met.
created_attimestamp with time zoneThe time the trigger was created
descriptiontextThe description of the trigger
idbigint=Automatically assigned when the trigger is created
positionbigintPosition of the trigger, determines the order they will execute in.
titletextThe title of the trigger
updated_attimestamp with time zoneThe time of the last update of the trigger

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_trigger