Skip to content

Commit 7feb681

Browse files
byrroevantahler
andauthored
Zendesk toolkit docs (#352)
* zendesk toolkit docs * Update pages/toolkits/customer-support/zendesk.mdx Co-authored-by: Evan Tahler <evan@arcade.dev> --------- Co-authored-by: Evan Tahler <evan@arcade.dev>
1 parent c1f9fdd commit 7feb681

14 files changed

Lines changed: 512 additions & 3 deletions

pages/toolkits/_meta.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ export default {
3333
databases: {
3434
title: "Databases",
3535
},
36+
"customer-support": {
37+
title: "Customer Support",
38+
},
3639
"-- Submit your toolkit": {
3740
type: "separator",
3841
title: "Submit your toolkit",
Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
# Zendesk
2+
3+
import ToolInfo from "@/components/ToolInfo";
4+
import Badges from "@/components/Badges";
5+
import TabbedCodeBlock from "@/components/TabbedCodeBlock";
6+
import TableOfContents from "@/components/TableOfContents";
7+
import ToolFooter from "@/components/ToolFooter";
8+
9+
<ToolInfo
10+
description="Enable agents to interact with Zendesk"
11+
author="Arcade"
12+
codeLink="https://github.com/ArcadeAI/arcade-ai/tree/main/toolkits/zendesk"
13+
authType="OAuth2"
14+
versions={["0.1.0"]}
15+
/>
16+
17+
<Badges repo="arcadeai/arcade_zendesk" />
18+
19+
The Zendesk toolkit provides a set of tools for managing customer support tickets and knowledge base articles. With this toolkit, users can:
20+
21+
- List and paginate through tickets in their Zendesk account.
22+
- Retrieve all comments for specific tickets, including the original description and conversation history.
23+
- Add comments to existing tickets to facilitate communication.
24+
- Mark tickets as solved, optionally including a final comment.
25+
- Search for published Help Center articles in the knowledge base, with support for multiple filters in a single request.
26+
27+
This toolkit streamlines the process of handling customer inquiries and accessing support resources.
28+
29+
## Available Tools
30+
31+
<TableOfContents
32+
headers={["Tool Name", "Description"]}
33+
data={
34+
[
35+
["Zendesk.ListTickets", "List tickets from your Zendesk account with offset-based pagination."],
36+
["Zendesk.GetTicketComments", "Get all comments for a specific Zendesk ticket, including the original description."],
37+
["Zendesk.AddTicketComment", "Add a comment to an existing Zendesk ticket."],
38+
["Zendesk.MarkTicketSolved", "Mark a Zendesk ticket as solved, optionally with a final comment."],
39+
["Zendesk.SearchArticles", "Search for Help Center articles in your Zendesk knowledge base."],
40+
]
41+
}
42+
/>
43+
44+
<Tip>
45+
If you need to perform an action that's not listed here, you can [get in touch
46+
with us](mailto:contact@arcade.dev) to request a new tool, or [create your
47+
own tools](/home/build-tools/create-a-toolkit).
48+
</Tip>
49+
50+
## Zendesk.ListTickets
51+
52+
<br />
53+
<TabbedCodeBlock
54+
tabs={[
55+
{
56+
label: "Call the Tool Directly",
57+
content: {
58+
Python: ["/examples/integrations/toolkits/zendesk/list_tickets_example_call_tool.py"],
59+
JavaScript: ["/examples/integrations/toolkits/zendesk/list_tickets_example_call_tool.js"],
60+
},
61+
},
62+
]}
63+
/>
64+
65+
List tickets from your Zendesk account with offset-based pagination.
66+
67+
**Parameters**
68+
69+
- **status** (`Enum` [TicketStatus](/toolkits/customer-support/zendesk/reference#TicketStatus), optional) The status of tickets to filter by. Defaults to 'open'
70+
- **limit** (`integer`, optional) Number of tickets to return. Defaults to 30
71+
- **offset** (`integer`, optional) Number of tickets to skip before returning results. Defaults to 0
72+
- **sort_order** (`Enum` [SortOrder](/toolkits/customer-support/zendesk/reference#SortOrder), optional) Sort order for tickets by ID. 'asc' returns oldest first, 'desc' returns newest first. Defaults to 'desc'
73+
74+
**Secrets**
75+
76+
This tool requires the following secrets: `zendesk_subdomain` (learn how to [configure secrets](/home/build-tools/create-a-tool-with-secrets#supplying-the-secret))
77+
78+
## Zendesk.GetTicketComments
79+
80+
<br />
81+
<TabbedCodeBlock
82+
tabs={[
83+
{
84+
label: "Call the Tool Directly",
85+
content: {
86+
Python: ["/examples/integrations/toolkits/zendesk/get_ticket_comments_example_call_tool.py"],
87+
JavaScript: ["/examples/integrations/toolkits/zendesk/get_ticket_comments_example_call_tool.js"],
88+
},
89+
},
90+
]}
91+
/>
92+
93+
Get all comments for a specific Zendesk ticket, including the original description.
94+
95+
**Parameters**
96+
97+
- **ticket_id** (`integer`, required) The ID of the ticket to get comments for
98+
99+
**Secrets**
100+
101+
This tool requires the following secrets: `zendesk_subdomain` (learn how to [configure secrets](/home/build-tools/create-a-tool-with-secrets#supplying-the-secret))
102+
103+
## Zendesk.AddTicketComment
104+
105+
<br />
106+
<TabbedCodeBlock
107+
tabs={[
108+
{
109+
label: "Call the Tool Directly",
110+
content: {
111+
Python: ["/examples/integrations/toolkits/zendesk/add_ticket_comment_example_call_tool.py"],
112+
JavaScript: ["/examples/integrations/toolkits/zendesk/add_ticket_comment_example_call_tool.js"],
113+
},
114+
},
115+
]}
116+
/>
117+
118+
Add a comment to an existing Zendesk ticket.
119+
120+
**Parameters**
121+
122+
- **ticket_id** (`integer`, required) The ID of the ticket to comment on
123+
- **comment_body** (`string`, required) The text of the comment
124+
- **public** (`boolean`, optional) Whether the comment is public (visible to requester) or internal. Defaults to True
125+
126+
**Secrets**
127+
128+
This tool requires the following secrets: `zendesk_subdomain` (learn how to [configure secrets](/home/build-tools/create-a-tool-with-secrets#supplying-the-secret))
129+
130+
## Zendesk.MarkTicketSolved
131+
132+
<br />
133+
<TabbedCodeBlock
134+
tabs={[
135+
{
136+
label: "Call the Tool Directly",
137+
content: {
138+
Python: ["/examples/integrations/toolkits/zendesk/mark_ticket_solved_example_call_tool.py"],
139+
JavaScript: ["/examples/integrations/toolkits/zendesk/mark_ticket_solved_example_call_tool.js"],
140+
},
141+
},
142+
]}
143+
/>
144+
145+
Mark a Zendesk ticket as solved, optionally with a final comment.
146+
147+
**Parameters**
148+
149+
- **ticket_id** (`integer`, required) The ID of the ticket to mark as solved
150+
- **comment_body** (`string`, optional) Optional final comment to add when solving the ticket
151+
- **comment_public** (`boolean`, optional) Whether the comment is visible to the requester. Defaults to False
152+
153+
**Secrets**
154+
155+
This tool requires the following secrets: `zendesk_subdomain` (learn how to [configure secrets](/home/build-tools/create-a-tool-with-secrets#supplying-the-secret))
156+
157+
## Zendesk.SearchArticles
158+
159+
<br />
160+
<TabbedCodeBlock
161+
tabs={[
162+
{
163+
label: "Call the Tool Directly",
164+
content: {
165+
Python: ["/examples/integrations/toolkits/zendesk/search_articles_example_call_tool.py"],
166+
JavaScript: ["/examples/integrations/toolkits/zendesk/search_articles_example_call_tool.js"],
167+
},
168+
},
169+
]}
170+
/>
171+
172+
Search for Help Center articles in your Zendesk knowledge base.
173+
174+
**Parameters**
175+
176+
- **query** (`string`, optional) Search text to match against articles. Supports quoted expressions for exact matching
177+
- **label_names** (`array[string]`, optional) List of label names to filter by (case-insensitive). Article must have at least one matching label. Available on Professional/Enterprise plans only
178+
- **created_after** (`string`, optional) Filter articles created after this date (format: YYYY-MM-DD)
179+
- **created_before** (`string`, optional) Filter articles created before this date (format: YYYY-MM-DD)
180+
- **created_at** (`string`, optional) Filter articles created on this exact date (format: YYYY-MM-DD)
181+
- **sort_by** (`Enum` [ArticleSortBy](/toolkits/customer-support/zendesk/reference#ArticleSortBy), optional) Field to sort articles by. Defaults to relevance according to the search query
182+
- **sort_order** (`Enum` [SortOrder](/toolkits/customer-support/zendesk/reference#SortOrder), optional) Sort order direction. Defaults to descending
183+
- **limit** (`integer`, optional) Number of articles to return. Defaults to 30
184+
- **offset** (`integer`, optional) Number of articles to skip before returning results. Defaults to 0
185+
- **include_body** (`boolean`, optional) Include article body content in results. Bodies will be cleaned of HTML and truncated
186+
- **max_article_length** (`integer`, optional) Maximum length for article body content in characters. Set to None for no limit. Defaults to 500
187+
188+
**Secrets**
189+
190+
This tool requires the following secrets: `zendesk_subdomain` (learn how to [configure secrets](/home/build-tools/create-a-tool-with-secrets#supplying-the-secret))
191+
192+
193+
194+
<ToolFooter pipPackageName="arcade_zendesk" />
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Zendesk Reference
2+
3+
Below is a reference of enumerations used by some tools in the Zendesk toolkit:
4+
5+
## TicketStatus
6+
7+
- **NEW**: `new`
8+
- **OPEN**: `open`
9+
- **PENDING**: `pending`
10+
- **SOLVED**: `solved`
11+
- **CLOSED**: `closed`
12+
13+
## SortOrder
14+
15+
- **ASC**: `asc`
16+
- **DESC**: `desc`
17+
18+
## ArticleSortBy
19+
20+
- **CREATED_AT**: `created_at`
21+
- **RELEVANCE**: `relevance`
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { Arcade } from "@arcadeai/arcadejs";
2+
3+
const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable
4+
5+
const USER_ID = "{arcade_user_id}";
6+
const TOOL_NAME = "Zendesk.AddTicketComment";
7+
8+
// Start the authorization process
9+
const authResponse = await client.tools.authorize({tool_name: TOOL_NAME});
10+
11+
if (authResponse.status !== "completed") {
12+
console.log(`Click this link to authorize: ${authResponse.url}`);
13+
}
14+
15+
// Wait for the authorization to complete
16+
await client.auth.waitForCompletion(authResponse);
17+
18+
const toolInput = {
19+
"ticket_id": 12345,
20+
"comment_body": "This is a sample comment.",
21+
"public": true
22+
};
23+
24+
const response = await client.tools.execute({
25+
tool_name: TOOL_NAME,
26+
input: toolInput,
27+
user_id: USER_ID,
28+
});
29+
30+
console.log(JSON.stringify(response.output.value, null, 2));
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import json
2+
from arcadepy import Arcade
3+
4+
client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable
5+
6+
USER_ID = "{arcade_user_id}"
7+
TOOL_NAME = "Zendesk.AddTicketComment"
8+
9+
auth_response = client.tools.authorize(tool_name=TOOL_NAME)
10+
11+
if auth_response.status != "completed":
12+
print(f"Click this link to authorize: {auth_response.url}")
13+
14+
# Wait for the authorization to complete
15+
client.auth.wait_for_completion(auth_response)
16+
17+
tool_input = {
18+
'ticket_id': 12345, 'comment_body': 'This is a sample comment.', 'public': True
19+
}
20+
21+
response = client.tools.execute(
22+
tool_name=TOOL_NAME,
23+
input=tool_input,
24+
user_id=USER_ID,
25+
)
26+
print(json.dumps(response.output.value, indent=2))
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { Arcade } from "@arcadeai/arcadejs";
2+
3+
const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable
4+
5+
const USER_ID = "{arcade_user_id}";
6+
const TOOL_NAME = "Zendesk.GetTicketComments";
7+
8+
// Start the authorization process
9+
const authResponse = await client.tools.authorize({tool_name: TOOL_NAME});
10+
11+
if (authResponse.status !== "completed") {
12+
console.log(`Click this link to authorize: ${authResponse.url}`);
13+
}
14+
15+
// Wait for the authorization to complete
16+
await client.auth.waitForCompletion(authResponse);
17+
18+
const toolInput = {
19+
"ticket_id": 12345
20+
};
21+
22+
const response = await client.tools.execute({
23+
tool_name: TOOL_NAME,
24+
input: toolInput,
25+
user_id: USER_ID,
26+
});
27+
28+
console.log(JSON.stringify(response.output.value, null, 2));
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import json
2+
from arcadepy import Arcade
3+
4+
client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable
5+
6+
USER_ID = "{arcade_user_id}"
7+
TOOL_NAME = "Zendesk.GetTicketComments"
8+
9+
auth_response = client.tools.authorize(tool_name=TOOL_NAME)
10+
11+
if auth_response.status != "completed":
12+
print(f"Click this link to authorize: {auth_response.url}")
13+
14+
# Wait for the authorization to complete
15+
client.auth.wait_for_completion(auth_response)
16+
17+
tool_input = {
18+
'ticket_id': 12345
19+
}
20+
21+
response = client.tools.execute(
22+
tool_name=TOOL_NAME,
23+
input=tool_input,
24+
user_id=USER_ID,
25+
)
26+
print(json.dumps(response.output.value, indent=2))
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { Arcade } from "@arcadeai/arcadejs";
2+
3+
const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable
4+
5+
const USER_ID = "{arcade_user_id}";
6+
const TOOL_NAME = "Zendesk.ListTickets";
7+
8+
// Start the authorization process
9+
const authResponse = await client.tools.authorize({tool_name: TOOL_NAME});
10+
11+
if (authResponse.status !== "completed") {
12+
console.log(`Click this link to authorize: ${authResponse.url}`);
13+
}
14+
15+
// Wait for the authorization to complete
16+
await client.auth.waitForCompletion(authResponse);
17+
18+
const toolInput = {
19+
"status": "open",
20+
"limit": 10,
21+
"offset": 0,
22+
"sort_order": "desc"
23+
};
24+
25+
const response = await client.tools.execute({
26+
tool_name: TOOL_NAME,
27+
input: toolInput,
28+
user_id: USER_ID,
29+
});
30+
31+
console.log(JSON.stringify(response.output.value, null, 2));
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import json
2+
from arcadepy import Arcade
3+
4+
client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable
5+
6+
USER_ID = "{arcade_user_id}"
7+
TOOL_NAME = "Zendesk.ListTickets"
8+
9+
auth_response = client.tools.authorize(tool_name=TOOL_NAME)
10+
11+
if auth_response.status != "completed":
12+
print(f"Click this link to authorize: {auth_response.url}")
13+
14+
# Wait for the authorization to complete
15+
client.auth.wait_for_completion(auth_response)
16+
17+
tool_input = {
18+
'status': 'open', 'limit': 10, 'offset': 0, 'sort_order': 'desc'
19+
}
20+
21+
response = client.tools.execute(
22+
tool_name=TOOL_NAME,
23+
input=tool_input,
24+
user_id=USER_ID,
25+
)
26+
print(json.dumps(response.output.value, indent=2))

0 commit comments

Comments
 (0)