Freshdesk
Freshdesk support desk を Squid に接続して、チケットの検索、作成、管理を行う
Freshdesk connector の機能
Freshdesk connector により、Squid AI agents はユーザーに代わって support tickets を操作できます。
| 機能 | 説明 |
|---|---|
| チケットの検索 | チケットのテキスト検索、または最近更新されたチケットの一覧表示 |
| チケット詳細の取得 | 会話履歴を含む完全なチケット詳細。必要に応じて関連チケットも含む |
| Semantic search | インデックス化されたチケットに対する自然言語検索。指定したチケットに類似するチケットの検索も含む |
| チケットの作成 | 件名、説明、リクエスターのメールアドレス、優先度、ステータスを指定してチケットを作成 |
| チケットの更新 | チケットの件名、説明、優先度、またはステータスを更新 |
| 返信とメモの追加 | チケットに公開(または非公開)の返信を投稿、または非公開の内部メモを追加 |
Index Tickets が有効になっている場合、Squid はチケット履歴を 10 分ごとに knowledge base に同期し、semantic search と類似チケット機能を有効にします。
Freshdesk API key の確認方法
この connector は Freshdesk API key を使用して認証します。Freshdesk API key は Freshdesk の profile settings の Your API Key で確認できます。詳細については、Freshdesk の API key の確認方法 に関するドキュメントを参照してください。
Freshdesk connector を Squid アプリケーションに追加する
-
Squid Console の Connectors タブに移動します。
-
Available Connectors をクリックします。
-
Freshdesk connector を見つけて、Add Connector を選択します。
-
次の設定情報を入力します。
Connector ID: コード内で connector を一意に識別する文字列。
Subdomain: Freshdesk instance の subdomain。たとえば、instance が https://mycompany.freshdesk.com にある場合は、mycompany と入力します。
API Key: Freshdesk API key。この key は Squid secret として安全に保存されます。
Index Tickets: Freshdesk tickets の semantic search と類似性機能を有効にします。
Ticket History Days: インデックス化のために同期するチケット履歴の日数。デフォルトは 30 です。
Semantic search と類似チケット機能を使用するには、Index Tickets を有効にする必要があります。有効にした後、初回同期が完了するまでしばらくお待ちください。
アプリケーションで Freshdesk connector を使用する
No-code Studio
-
Squid Console の Studio タブに移動します。
-
Create AI Agent をクリックします。
-
"support-agent" や "This agent helps the user manage Freshdesk tickets" などの agent ID と description を入力します。
-
Add Abilities をクリックします。
-
Freshdesk の項目を展開し、先ほど作成した Freshdesk connector を選択します。
-
"Call this when a user wants to look up or manage support tickets." など、この接続を agent がどのように使用すべきかの説明を入力します。
-
Test をクリックし、agent に "What are my most recent tickets?" と質問してみます。
Squid SDK の使用
Squid SDK で AI agent を作成している場合は、ask() 関数の connectedIntegrations オプションに Freshdesk connector を追加して接続します。
- TypeScript
- Python
await this.squid
.ai()
.agent('AGENT_ID')
.ask('Find tickets about login problems and summarize them', {
connectedIntegrations: [
{
integrationId: 'FRESHDESK_CONNECTOR_ID',
integrationType: 'freshdesk',
description: 'Call this connector to look up and manage Freshdesk tickets',
},
],
});
await squid.ai().agent('AGENT_ID').ask(
'Find tickets about login problems and summarize them',
options={
'connectedIntegrations': [
{
'integrationId': 'FRESHDESK_CONNECTOR_ID',
'integrationType': 'freshdesk',
'description': 'Call this connector to look up and manage Freshdesk tickets',
}
]
},
)
npm package の使用
backend または client code から programmatic(非-agent)アクセスを行うには、@squidcloud/freshdesk-client package をインストールします。
npm install @squidcloud/freshdesk-client
import { FreshdeskClient } from '@squidcloud/freshdesk-client';
const freshdesk = new FreshdeskClient(squid, 'FRESHDESK_CONNECTOR_ID');
// Search and inspect tickets
const tickets = await freshdesk.searchTickets('login problems');
const details = await freshdesk.getTicketDetails(tickets[0].id);
// Create, reply, and resolve
const ticket = await freshdesk.createTicket('Login issue', 'User cannot log in.', 'user@example.com');
await freshdesk.replyToTicket(ticket.id, 'We are looking into this.');
await freshdesk.resolveTicket(ticket.id);
Freshdesk では、priority(1 = Low、2 = Medium、3 = High、4 = Urgent)と status(2 = Open、3 = Pending、4 = Resolved、5 = Closed)に数値を使用します。