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, titlefrom zendesk_triggerwhere activeorder by position;
select position, titlefrom zendesk_triggerwhere active = 1order 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 titlefrom zendesk_triggerwhere not active;
select titlefrom zendesk_triggerwhere 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_allfrom zendesk_triggerwhere conditions_all @> '[{"field":"priority","operator":"value","value":"high"}]';
select title, conditions_allfrom zendesk_triggerwhere 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
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
actions | jsonb | An array of actions describing what the trigger will do. | |
active | boolean | Whether the trigger is active | |
conditions_all | jsonb | Trigger if all conditions are met. | |
conditions_any | jsonb | Trigger if any condition is met. | |
created_at | timestamp with time zone | The time the trigger was created | |
description | text | The description of the trigger | |
id | bigint | = | Automatically assigned when the trigger is created |
position | bigint | Position of the trigger, determines the order they will execute in. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
subdomain | text | =, !=, ~~, ~~*, !~~, !~~* | The organization subdomain name of the Zendesk instance. |
title | text | The title of the trigger | |
updated_at | timestamp with time zone | The 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