Table: hubspot_ticket - Query Hubspot Tickets using SQL
Hubspot Tickets is a feature within the Hubspot Service Hub that allows users to track, prioritize, and solve customer support inquiries. It provides a centralized way to manage and respond to customer issues, ensuring efficient customer service. Hubspot Tickets helps businesses stay informed about customer issues and take appropriate actions when needed.
Table Usage Guide
The hubspot_ticket
table provides insights into tickets within Hubspot Service Hub. As a Customer Support Analyst, explore specific ticket details through this table, including status, priority, creation time, and associated contacts. Utilize it to track and manage customer issues, prioritize tasks, and ensure efficient customer service.
Examples
Basic info
Explore which tickets have been archived and their corresponding pipeline stages and priorities. This could be particularly useful for understanding the distribution of workload and identifying potential bottlenecks in your customer service process.
select id, created_at, archived, content, hs_pipeline, hs_pipeline_stage, hs_ticket_priorityfrom hubspot_ticket;
select id, created_at, archived, content, hs_pipeline, hs_pipeline_stage, hs_ticket_priorityfrom hubspot_ticket;
List high-priority tickets
Explore which tickets have been marked as high-priority in your system to focus your team's attention on the most crucial issues. This helps in efficient resource allocation and ensures timely resolution of critical matters.
select id, created_at, archived, content, hs_pipeline, hs_pipeline_stage, hs_ticket_priorityfrom hubspot_ticket;where hs_ticket_priority = 'HIGH';
select id, created_at, archived, content, hs_pipeline, hs_pipeline_stage, hs_ticket_priorityfrom hubspot_ticketwhere hs_ticket_priority = 'HIGH';
List all archived tickets
Explore which tickets have been archived to maintain an organized record and prioritize tasks based on the pipeline stage and ticket priority. This can help in tracking the progress of issues and understanding the efficiency of the ticket resolution process.
select id, created_at, archived, content, hs_pipeline, hs_pipeline_stage, hs_ticket_priorityfrom hubspot_ticketwhere archived;
select id, created_at, archived, content, hs_pipeline, hs_pipeline_stage, hs_ticket_priorityfrom hubspot_ticketwhere archived;
List tickets created in the last 30 days
Explore which tickets have been created in the last 30 days to assess recent customer issues and their priorities. This helps in identifying trends in customer concerns and managing resources effectively.
select id, created_at, archived, content, hs_pipeline, hs_pipeline_stage, hs_ticket_priorityfrom hubspot_ticketwhere created_at > now() - interval '30 days';
select id, created_at, archived, content, hs_pipeline, hs_pipeline_stage, hs_ticket_priorityfrom hubspot_ticketwhere created_at > datetime('now', '-30 days');
List tickets which are submitted via phone
Discover the segments that encompass tickets submitted through phone calls. This could be useful in understanding the nature and volume of phone-based customer interactions for strategic planning.
select id, created_at, archived, content, hs_pipeline, hs_pipeline_stage, hs_ticket_priorityfrom hubspot_ticketwhere source_type = 'PHONE';
select id, created_at, archived, content, hs_pipeline, hs_pipeline_stage, hs_ticket_priorityfrom hubspot_ticketwhere source_type = 'PHONE';
List open tickets
Explore which customer support tickets are still open. This can help prioritize tasks and manage workload effectively in a customer service setting.
select id, created_at, archived, content, hs_pipeline, hs_pipeline_stage, hs_ticket_priorityfrom hubspot_ticketwhere time_to_close is null;
select id, created_at, archived, content, hs_pipeline, hs_pipeline_stage, hs_ticket_priorityfrom hubspot_ticketwhere time_to_close is null;
Schema for hubspot_ticket
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
archived | boolean | = | Indicates whether the ticket is archived or not. |
archived_at | timestamp with time zone | The timestamp when the ticket was archived. | |
created_at | timestamp with time zone | The timestamp when the ticket was created. | |
id | text | = | The unique ID of the ticket. |
portal_id | text | =, !=, ~~, ~~*, !~~, !~~* | Unique identifier for the HubSpot portal or account. |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
title | text | Title of the resource. | |
updated_at | timestamp with time zone | The timestamp when the ticket was last updated. |
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)" -- hubspot
You can pass the configuration to the command with the --config
argument:
steampipe_export_hubspot --config '<your_config>' hubspot_ticket