請求書数量検証拡張ポイントの構成

  • リリースバージョン: Australia
  • 更新日 2026年02月27日
  • 所要時間:4分
  • 請求書数量チェック拡張ポイントを実装して、請求書異議申し立ての取り込みアシスタント AI エージェントが、エンタープライズリソースプランニング (ERP) またはインベントリシステムからの納入数量データと照合することで、顧客の数量異議申し立て請求を検証できるようにします。

    始める前に

    アプリケーションスコープは [請求書操作の管理] に設定する必要があります。統一ナビゲーションバーのアプリケーションピッカー を使用して、アプリケーションスコープを変更できます。

    必要なロール:admin

    このタスクについて

    請求書オペレーションの管理アプリケーションのデモデータには、sn_inv_ops_aias.invoiceQuantityCheckEP 拡張ポイントの一部として、invoiceQuantityCheckDemo と呼ばれるサンプル実装が含まれています。外部 ERP システムまたはインベントリ配送レコードに対する数量異議申し立てを実際に検証できるようにするには、デモ実装を独自のカスタムロジックに置き換えます。

    手順

    1. ServiceNow インスタンスにログインします。
    2. 移動先 すべて > システム拡張ポイント > スクリプト化済みの拡張点.
    3. [API 名] フィールドで sn_inv_ops_aias.invoiceQuantityCheckEP スクリプト拡張ポイントを検索します。
    4. [ sn_inv_ops_aias.invoiceQuantityCheckEP] を選択して、デモデータに含まれるサンプルスクリプトを表示します。
    5. [ 実装を作成 ] 関連リンクを選択して、拡張ポイントの独自の実装を作成します。
    6. [スクリプトインクルード] フォームのフィールドに入力します。
      スクリプトインクルードフォームフィールドの説明については、「 Script includes」を参照してください。
    7. スクリプト内の関数を上書きして、顧客の数量異議申し立て請求を検証するためのロジックを実装します。
      関数名 説明 入力と出力
      checkInvoiceQuantityWithInvoiceCase

      上書きされるプレースホルダー関数。このプレースホルダーを使用して、請求書ケースに関連付けられた複数の請求書明細にわたる数量異議申し立てを検証するロジックを実装します。

      入力:
      {
          "invoiceNumber": <Invoice number of the customer invoice record>,
          "verifiedInvoiceLineDetails": <Array of invoice line details>
      出力:
      {
      “invoiceLineNumber”: <Invoice line number against which the dispute was raised>,
      “disputedQuantity”: <Disputed quantity claimed by the customer, as available in the invoice case line>
      }
      checkInvoiceQuantity

      上書きされるプレースホルダー関数。このプレースホルダーを使用して、顧客の請求された数量を ERP またはインベントリ配送レコードと調整することで数量異議申し立てを検証するロジックを実装します。

      入力:
      {
          "invoiceNumber": <Invoice number of the customer invoice record>,
          "invoiceLineNumber": <Invoice line number of the customer invoice line record against which the dispute was raised>,
          "userEnteredQty": <Disputed quantity claimed by the customer>
      }
      出力:
      {
          "invoiceLineNumber": <Invoice line number against which the dispute was raised>,
          "invoiceQty": <Actual quantity on the invoice line record>,
          "deliveredQty": <Integer representing the disputed quantity claimed
                            by the customer>,
          "qtyMatch": <Boolean; true if the customer's dispute claim is valid, false if the invoiced and claimed quantities match>,
          "isError": <Boolean; true if the API call failed, false if the API call was successful>,
          "errorMessage": <Error message string to handle failure scenarios>
      }
    8. [Update (更新)] を選択します。
    9. オプション: Now Assist 仮想アシスタントを使用してビジネスポータルから請求書異議申し立てを送信し、実装を検証します。
      詳細については、「仮想アシスタントを使用した請求書問題 Now Assist 異議申し立て」を参照してください。