---
sourceDocument: Xanadu モバイルの構成とナビゲーション
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/ja-JP/xanadu/mobile

 Release :

    - xanadu

ft:locale :

    - ja-JP

ft:publication_title :

    - Xanadu モバイルの構成とナビゲーション

ft:clusterId :

    - mobile

bundleId :

    - mobile

workflow :

    - Platform


---

# アクション可能プッシュ通知スクリプトの例

# アクション可能プッシュ通知スクリプトの例 {#ariaid-title1}

* リリースバージョン: Xanadu
* 
* 更新日 2024年08月01日
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 所要時間：1分

この JSON スクリプトの例を使用して、ServiceNow® モバイル アプリのアクション可能プッシュ通知を設定できます。

## スクリプト例 {#actionable-push-notification-1a__section_l3g_x3r_psb}

次のスクリプト例では、ユーザーがモバイルデバイスで表示できるプッシュ通知を作成します。  
重要:  
次のスクリプトのグローバル一意識別子 (`「70bbc19c87f901101ae365b83cbb3559」`) は、プッシュ通知テーブル \[sys_sg_push_notification\] にあるプッシュ通知レコードの sys_id です。システムが生成するスクリプト内の識別子がプッシュ通知の sys_id と一致していることを確認してください。

    (function buildJSON(/*GlideRecord*/ current, /*String*/ message, /*Object*/ attributes) {

         var layoutFields = {"Identifier" : "number", "Description" : "short_description", "Status" : "state" };
           return new global.ActionablePushPayloadBuilder(current, "70bbc19c87f901101ae365b83cbb3559", layoutFields).buildJSON(); 

    })(current, message, attributes);


