ServiceNow CSM
ServiceNow Customer Service Management を Squid に接続して、case の検索、作成、管理を行う
ServiceNow CSM connector の機能
ServiceNow CSM connector を使用すると、Squid AI agent がユーザーに代わって Customer Service Management の case を操作できます。
| Capability | Description |
|---|---|
| case の検索 | short description、description、または case number による case のテキスト検索。必要に応じて state でフィルタリング可能 |
| case details の取得 | caller、assignee、comments、work notes を含む完全な case details |
| Semantic search | インデックス化された case に対する自然言語検索 |
| case の作成 | short description、description、priority、category、caller を指定して新しい case を作成 |
| case への返信 | case に public comment または internal work note を追加 |
Squid は CSM case を knowledge base に自動的に同期し、10 分ごとに更新します(初回同期では過去 1 年分の case history が対象です)。これにより semantic search 機能が有効になります。
この connector は ServiceNow Customer Service Management の case(sn_customerservice_case table)に対応しています。ITSM incident は管理しません。
ServiceNow REST API token の作成
この connector は ServiceNow REST API token を使用して認証します。
-
ServiceNow instance で、System Security > REST API Token に移動します。
-
token を作成します。token に関連付けられた user には、Customer Service Management case tables へのアクセス権が必要です。
-
token value をコピーします。
ServiceNow CSM connector を Squid application に追加する
-
Squid Console の Connectors tab に移動します。
-
Available Connectors をクリックします。
-
ServiceNow - CSM connector を見つけて、Add Connector を選択します。
-
次の configuration details を入力します。
Connector ID: コード内で connector を一意に識別する文字列。
Instance Domain: ServiceNow instance の subdomain。たとえば、instance が https://mycompany.service-now.com にある場合は、mycompany と入力します。
REST API Token: ServiceNow instance で生成された REST API token。この token は Squid secret として安全に保存されます。
application で ServiceNow CSM connector を使用する
No-code Studio
-
Squid Console の Studio tab に移動します。
-
Create AI Agent をクリックします。
-
agent ID と description を入力します。例: "csm-agent"、"This agent helps the user manage ServiceNow customer service cases"。
-
Add Abilities をクリックします。
-
ServiceNow - CSM entry を展開し、先ほど作成した connector を選択します。
-
agent がこの connection をどのように使用すべきかについて説明を入力します。例: "Call this when a user wants to manage cases or customer service tasks in ServiceNow CSM."
-
Test をクリックして、agent に "What are the open cases?" と質問してみます。
Squid SDK の使用
Squid SDK で AI agent を作成している場合は、ask() function の connectedIntegrations option に追加して connector を接続します。
- TypeScript
- Python
await this.squid
.ai()
.agent('AGENT_ID')
.ask('Summarize the most recent customer cases about billing', {
connectedIntegrations: [
{
integrationId: 'SERVICENOW_CONNECTOR_ID',
integrationType: 'servicenow_csm',
description: 'Call this connector to manage ServiceNow CSM cases',
},
],
});
await squid.ai().agent('AGENT_ID').ask(
'Summarize the most recent customer cases about billing',
options={
'connectedIntegrations': [
{
'integrationId': 'SERVICENOW_CONNECTOR_ID',
'integrationType': 'servicenow_csm',
'description': 'Call this connector to manage ServiceNow CSM cases',
}
]
},
)
npm package の使用
backend または client code から programmatic(non-agent)にアクセスするには、@squidcloud/servicenow_csm-client package をインストールします。
npm install @squidcloud/servicenow_csm-client
import { SquidServiceNowCSMClient } from '@squidcloud/servicenow_csm-client';
const servicenow = new SquidServiceNowCSMClient(squid, 'SERVICENOW_CONNECTOR_ID');
// Search and inspect cases
const cases = await servicenow.searchCases('billing');
const details = await servicenow.getCase(cases[0].number);
// Create a case and reply to it
const created = await servicenow.createCase({ shortDescription: 'Billing discrepancy' });
await servicenow.replyToCase(created.number, 'We are investigating.', true);
ServiceNow では、priority(1 = Critical から 5 = Planning)および case state(1 = New、2 = In Progress、3 = On Hold、6 = Resolved、7 = Closed、8 = Canceled)に numeric codes を使用します。