npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@restackio/integrations-zendesk

v0.0.1

Published

This package provides an integration for Zendesk with Restack, allowing:

Downloads

6

Readme

Zendesk for Restack

This package provides an integration for Zendesk with Restack, allowing:

Installation

To install the package, use npm or yarn:

npm install @restackio/integrations-zendesk

Configuration

Before using the Zendesk integration you need to set up your API token. You can do this by setting an environment variable or passing it directly to the functions.

  1. Set up environment variables:
ZENDESK_SUBDOMAIN=your_zendesk_subdomain
ZENDESK_TOKEN=your_zendesk_token
ZENDESK_USERNAME=your_zendesk_username
  1. Or pass them directly when calling the functions (see Usage section).

Usage

Starting the Zendesk Service

To start the Zendesk service, use the zendeskService function:

import Restack from "@restackio/ai";
import { zendeskService } from "@restackio/integrations-zendesk";

const client = new Restack();

zendeskService({ client }).catch((err) => {
  console.error("Error starting Zendesk service:", err);
});

Using the Zendesk Create Ticket Function

This function allows for the creation of tickets.

Properties

| Name | Type | Description | --- | --- | --- assignee_email? | string | Write only. The email address of the agent to assign the ticket to assignee_id? | number | The agent currently assigned to the ticket attribute_value_ids? | number[] | Write only. An array of the IDs of attribute values to be associated with the ticket brand_id? | number | Enterprise only. The id of the brand this ticket is associated with. See Setting up multiple brands. collaborator_ids? | number[] | The ids of users currently CC'ed on the ticket comment? | TicketComment | Write only. An object that adds a comment to the ticket. See Ticket comments. custom_fields? | CustomField[] | Custom fields for the ticket. See Setting custom field values. custom_status_id? | number | The custom ticket status id of the ticket. See custom ticket statuses. due_at? | string | If this is a ticket of type "task" it has a due date. Due date format uses ISO 8601 format. email_ccs? | object | Write only. An array of objects that represent agent or end users email CCs to add or delete from the ticket. See Setting email CCs. external_id? | string | An id you can use to link Zendesk Support tickets to local records followers? | object | Write only. An array of objects that represent agent followers to add or delete from the ticket. See Setting followers. group_id? | number | The group this ticket is assigned to macro_id? | number | Write only. A macro ID to be recorded in the ticket audit organization_id? | number | The organization of the requester. You can only specify the ID of an organization associated with the requester. See Organization Memberships. priority? | Priority | The urgency with which the ticket should be addressed. Allowed values are "urgent", "high", "normal", or "low". problem_id? | number | For tickets of type "incident", the ID of the problem the incident is linked to recipient? | string | The original recipient e-mail address of the ticket. Notification emails for the ticket are sent from this address requester? | object | Write only. See Creating a ticket with a new requester. requester_id | number | The user who requested this ticket safe_update? | boolean | Write only. Optional boolean. When true and an update_stamp date is included, protects against ticket update collisions and returns a message to let you know if one occurs. See Protecting against ticket update collisions. A value of false has the same effect as true. Omit the property to force the updates to not be safe sharing_agreement_ids? | number[] | The ids of the sharing agreements used for this ticket status? | Status | The state of the ticket. If your account has activated custom ticket statuses, this is the ticket's status category. See custom ticket statuses. Allowed values are "new", "open", "pending", "hold", "solved", or "closed". subject? | string | The value of the subject field for this ticket. See Subject submitter_id? | number | The user who submitted the ticket. The submitter always becomes the author of the first comment on the ticket tags? | string[] | The array of tags applied to this ticket. ticket_form_id? | number | Enterprise only. The id of the ticket form to render for the ticket type? | Type | The type of this ticket. Editable for custom field types and only on creation. See Create Ticket Field. Allowed values are "problem", "incident", "question", or "task". updated_stamp? | string | Write only. Datetime of last update received from API. See the safe_update property via? | object | For more information, see the Via object reference. via_id? | number | Write only. For more information, see the Via object reference.

Code Example

import { createTicket } from "@restackio/integrations-zendesk/functions";
import type { CreateTicket, CustomField, Priority, Status, TicketComment, Type, Via } from "@restackio/integrations-zendesk/functions";

const result = await createTicket({
  comment, // required
  requester_id, // required
  subdomain, // optional if set in environment variables
  token, // optional if set in environment variables
  username, // optional if set in environment variables
  ...
});

console.log(result);