0.0.1 • Published 12 months ago

@restackio/integrations-zendesk v0.0.1

Weekly downloads
-
License
-
Repository
-
Last release
12 months ago

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

NameTypeDescription
assignee_email?stringWrite only. The email address of the agent to assign the ticket to
assignee_id?numberThe 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?numberEnterprise 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?TicketCommentWrite 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?numberThe custom ticket status id of the ticket. See custom ticket statuses.
due_at?stringIf this is a ticket of type "task" it has a due date. Due date format uses ISO 8601 format.
email_ccs?objectWrite 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?stringAn id you can use to link Zendesk Support tickets to local records
followers?objectWrite only. An array of objects that represent agent followers to add or delete from the ticket. See Setting followers.
group_id?numberThe group this ticket is assigned to
macro_id?numberWrite only. A macro ID to be recorded in the ticket audit
organization_id?numberThe organization of the requester. You can only specify the ID of an organization associated with the requester. See Organization Memberships.
priority?PriorityThe urgency with which the ticket should be addressed. Allowed values are "urgent", "high", "normal", or "low".
problem_id?numberFor tickets of type "incident", the ID of the problem the incident is linked to
recipient?stringThe original recipient e-mail address of the ticket. Notification emails for the ticket are sent from this address
requester?objectWrite only. See Creating a ticket with a new requester.
requester_idnumberThe user who requested this ticket
safe_update?booleanWrite 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?StatusThe 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?stringThe value of the subject field for this ticket. See Subject
submitter_id?numberThe 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?numberEnterprise only. The id of the ticket form to render for the ticket
type?TypeThe 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?stringWrite only. Datetime of last update received from API. See the safe_update property
via?objectFor more information, see the Via object reference.
via_id?numberWrite 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);
0.0.1

12 months ago