ServiceNow を Teamwork Graph に接続する

Teamwork Graph に接続して、必要な ServiceNow チケットと注文をすばやく見つけることができます。

何がインデックス化されますか?

ServiceNow コネクタは、次のオブジェクトをインデックス化します。

  • インシデント チケット

  • Catalog requests

  • Catalog items

  • ナレッジ記事

  • News articles

  • Strategic Portfolio Management (SPM)

    • プロジェクト

    • Demands

    • エピック

各オブジェクトについて、次の属性がインデックス化されます。

  • 名前

  • URL

  • createdDate

  • 最終更新日

  • 説明

  • アイテム タイプ

  • 担当者

  • 期限

はじめる前に

  • Teamwork Graph に接続するには、ServiceNow インスタンス管理者である必要があります。

  • Teamwork Graph では常に権限が遵守されます。ユーザーには、すでにアクセス権があるコンテンツのみが表示されます。

Set up ServiceNow OAuth

  1. Log in to ServiceNow, take note of your organization’s subdomain. For example, if your site is vitafleet.service-now.com, you’ll need the vitafleet later.

  2. 上部のナビゲーションから、[すべて] > [システム アプリ] > [利用可能なすべてのアプリ] > [すべて] の順に移動します。

  3. 次のページの上部にある検索バーで、com.snc.platform.security.oauth を検索します。

    1. 結果が [インストール済み] タブに表示されたら、次のステップに進みます。

    2. OAuth 2.0 の結果が [Available for you (ご利用可能)] の下に表示される場合は、それを選択して [インストール] を選択します。

ServiceNow で OAuth プラグインを検索しているスクリーンショット

4. 上部のナビゲーションの [ワークスペース] メニューにて、sys_properties.list でフィルタリングして (結果は表示されません)、Enter キーを押します。

5. 表示されたページで、com.snc.platform.security.oauth.is.active を検索します。

  • この結果の [] 列が true である場合は、ステップ 6 に進みます。

  • [値] 列false に設定されている場合は、[名前] 列のリンクを選択して [] を true に変更し、[更新] を選択します。ステップ 6 に進みます。

ServiceNow 内で OAuth 値をシステム プロパティとして作成する画面のスクリーンショット

 

  • com.snc.platform.security.oauth.is.active の結果がない場合は、追加する必要があります。右上の [新規] を選択し、フォームに記入します。

    1. [名前] を com.snc.platform.security.oauth.is.active に設定します

    2. [タイプ] を 真 | 偽 に設定します。

    3. true に設定します

    4. [送信] を選択します。

OAuth の新しいサービス レコードを作成しているスクリーンショット

6. 上部のナビゲーションから、[すべて] > [システム OAuth] > [アプリケーション レジストリ] の順に移動します。

ServiceNow 内でアプリ レジストリに移動するスクリーンショット

7. [アプリ レジストリ] で、テーブルの右上にある [新規] を選択します。

Service Now のアプリ レジストリ画面のスクリーンショット

8. [外部クライアント用の OAuth API エンドポイントを作成] を選択します。

9. 新しい OAuth 接続の詳細を入力します。

  • 接続に Atlassian Integration のような名前を付けます

  • アイコンの URL を追加することをお勧めします。ロック記号 () を選択して編集します。自由に設定できますが、アトラシアンのロゴを設定したい場合は、この URL を使用できます

  • [クライアント シークレット] は空白のままにする (ランダムに生成する) か、独自の値を入力できます。

  • リダイレクト URL を編集するには、鍵の記号を選択して https://id.atlassian.com/outboundAuth/finish に設定します

  • [Public Client (パブリック クライアント)] を選択します。

  • 下部の [認証スコープ] で、[Insert a new row (新しい列を挿入)] テキストをダブルクリックします。ポップアップが表示されます。「useraccount」と入力して、チェック アイコンを選択します。

"認証スコープ" フィールドをダブル クリックした後のスクリーンショット

 

  • [送信] を選択します。

10. アプリ レジストリ画面にリダイレクトされます。追加した統合の名前を選択します。

11. この統合から後ほど必要となる 2 つの値をコピーしておく必要があります。この画面で、次を確認するためにコピー (またはこのタブを開いたままに) します。

  • クライアント ID

  • クライアント シークレット。表示するには、ロック記号 () を使用する必要があります。

Install the RovoSearch web service

  1. Go to AllScripted Web ServicesScripted REST APIs

Install web service

2. Select the Add new button

3. Enter the Name, API ID and Default ACLs Scripted REST External Default
Name - Rovo Search
API ID - rovosearch
Default ACLs - Scripted REST External Default

Screenshot of field values

4. After the web service is created, in the Resources section, select New.

Screenshot of Resources section

5. Enter the following values:

  • Name - User Criteria

  • HTTP method - GET

  • Relative path - /user_criteria

  • Script - Paste the script below

Here’s the script that you can copy and paste in the Script section.

/* Resource Path: /api/{api_namepsace}/rovosearch/user_criteria * Description: This API endpoint retrieves user criteria records that match the specified user sys_id(s). */ (function process( /*RESTAPIRequest*/ req, /*RESTAPIResponse*/ res) { // Retrieve parameters from incoming request var requestParameters = req.queryParams; // Get the 'user' identifier and convert to string, defaulting to null if missing var userIds = requestParameters.user ? String(requestParameters.user) : null; // Validate that userId exists if (!userIds) { gs.warn("UserCriteriaLoader API: Missing 'user' parameter in request."); res.setStatus(400); return { "error": "User sys_id is required." }; } try { // Create new instance of UserCriteriaLoader var criteriaLoader = sn_uc.UserCriteriaLoader; var allCriteriaList = []; var results = []; var criteriaRecord = new GlideRecord('user_criteria'); criteriaRecord.addQuery('active', true); // Filter for enabled entries criteriaRecord.query(); //get ALL User Criteria records while (criteriaRecord.next()) { allCriteriaList.push(criteriaRecord.getUniqueValue()); } gs.addInfoMessage("UserCriteriaLoader API: allCriteriaList size: " + allCriteriaList.length); var userIdSplit = userIds.split(","); // Invoke API to retrieve criteria that match the user for (const user of userIdSplit) { gs.addInfoMessage("UserCriteriaLoader API: matching criteria for user " + user + "."); var matchedCriteria = criteriaLoader.getMatchingCriteria(user, allCriteriaList); var criteriaPerUserMap = new Object(); criteriaPerUserMap.userId = user; criteriaPerUserMap.userCriteria = matchedCriteria; gs.addInfoMessage("UserCriteriaLoader API: Got " + matchedCriteria.length + " results for user " + user + "."); results.push(criteriaPerUserMap); } // Send back the matched criteria collection return results; } catch (err) { // Record any exceptions encountered during execution gs.error("UserCriteriaLoader API: Failed to process criteria for user " + userIds + ". Error: " + err.message); res.setStatus(500); // Server error response return { error_message: "Failed to process criteria for user " + userIds, error_details: err.message }; } })(request, response);
Screenshot of Script section

(Optional) Enable the Employee Center Pro plugin for news articles

If News Article Ingestion hasn’t been enabled, skip this section.

More about installing Employee Center Pro

  1. Go to AllApplication Manager again.

Screenshot of application manager

2. Using the search filter, search for sn_ex_sp_pro and install the plugin.

Screenshot of Employee center pro plugin installation

3. After installation, select Load Demo Datafrom the Quick Actions section in the plugin page.

Screenshot of Quick Actions sections

4. Go to AllFix Scripts.

Screenshot of Fix Scripts

5. Search the Fix Scripts page for employee and press the Enter key.
It should show these two Employee scripts.

Screenshot of Employee Scripts

6. Select the Employee Center Easy Install script first.

7. If you cannot edit the script, select the To edit this record, click here button.

Screenshot of edit record link

8. In the script editor, change the var runManually = false to var runManually = true and select Update.

Screenshot of variable update

9. Return to the Employee Center Easy Install script and select Run Fix Script.

Screenshot of Run Fix Script

10. Back in the Fix Scripts list, select the Employee Center Pro Fix Dashboardscript

11. Select Run Fix Script for the Employee Center Pro Fix Dashboard

ServiceNow を接続する

ServiceNow で OAuth 統合をセットアップしたら、接続できます。ServiceNow のセットアップ画面を開くには、次の手順を実行します。

  1. admin.atlassian.com に移動します。複数の組織がある場合は、対象の組織を選択します。

  2. [アプリ] > [コネクタ] の順に選択します。

  3. 複数のサイトがある場合は、接続するサイトを選択してから [コネクタを追加] を選択します。

  4. [ServiceNow] を選択して [次へ] を押します。

  5. ServiceNow の接続の名前を入力します。何かと一致させる必要はありません。

  6. ServiceNow サイトのサブドメインを入力します。ServiceNow の完全な URL が vitafleet.service-now.com である場合は、「vitafleet」と入力するだけです。

  7. 上記のステップでセットアップしたクライアント ID クライアント シークレットを入力します。

  8. 免責事項を確認します。

  9. [Authorize ServiceNow (ServiceNow を承認)] を選択します。

  10. ServiceNow で新しいタブが開きます。権限を確認して同意します。[許可] を選択します。

Rovo への接続時に管理者に表示される同意画面のスクリーンショット

次のステップ

ServiceNow との接続が完了したら、次の手順を実行します。

  1. チケットと注文は、数時間かけて徐々に検索に表示されるようになります。

  2. チーム メンバーには、検索のフィルター オプションとして ServiceNow が表示されます。Atlassian アカウントから ServiceNow に接続していないチーム メンバーに対しては、結果が表示される前に接続を求められる場合があります。これは、Teamwork Graph においてチーム メイトに表示するチケットをそれぞれのアクセス権に基づいて制限するのに必要です。

  3. ServiceNow 内のチケットと注文の数によっては、すべてのコンテンツがインデックス化されて検索に表示されるまでに時間を要する場合があります。

さらにヘルプが必要ですか?

アトラシアン コミュニティをご利用ください。