{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":32392,"path":"it-service-management/digital-end-user-experience-dex/customizing-da-notifications-api.md","title":"Customizing Desktop Assistant notifications using API parameters","bundle":null,"doc_type":null,"release":"australia","body":"\n# Customizing Desktop Assistant notifications using API parameters\n\nAdministrators can send customized Desktop Assistant notifications to specific users by using the `DesktopAppNotificationUtils` script include with a set of notification parameters.\n\nDesktop Assistant notifications are sent using the sendDANotification\\(\\) method of the `DesktopAppNotificationUtils` script include in the sn\\_dex\\_desktop application scope. This method runs server-side and can be called from business rules, background scripts, scheduled jobs, Flow Script Steps, or Flow Designer actions. It is not exposed as a REST endpoint or Notify API. The Desktop Assistant client displays these notifications on the user's device, alerting employees to time-sensitive events such as major incidents affecting their services or software licenses nearing expiration.\n\nBy default, Major Incident Management \\(MIM\\) and Proactive Engagement \\(PE\\) send notifications through Desktop Assistant without invoking this API. For more information, see [Desktop Assistant notifications](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-service-management/digital-end-user-experience-dex/da-push-notifications.md). Use the `DesktopAppNotificationUtils` API to send notifications from additional sources.\n\n**Note:** Desktop Assistant notifications require the Desktop Assistant client to be installed and running on the user's endpoint device.\n\n## Desktop Assistant notification delivery process\n\n1.  Server-side trigger: A server-side component such as a business rule, Flow Designer action, or Scheduled Job initiates the notification delivery process by calling the sendDANotification\\(\\) method on the `DesktopAppNotificationUtils` script include.\n2.  Validation and record creation: The script include validates the input parameters and inserts a record into the Desktop Assistant notification \\(sn\\_dex\\_desktop\\_assistant\\_notification\\) table if validation succeeds. This record stores the notification title, message body, recipient list or device list, source, and expiry date.\n3.  Asynchronous background processing: Creating the notification record triggers the desktop\\_assistant\\_notification\\_call background flow. This flow runs asynchronously, allowing the original caller to continue without waiting for delivery processing to complete.\n4.  Notification preparation and queuing: The background flow calls the internal DesktopNotificationAPI.sendNotification\\(\\) method, which prepares the notification for delivery and inserts rows into the Desktop Assistant Notification Queue \\(sn\\_dex\\_desktop\\_notify\\_queue\\) table. Each row in this table represents one delivery attempt for one device token.\n5.  Notification delivery to the endpoint: The Agent Client Collector \\(ACC\\) running on the end user's device retrieves pending entries from the queue and delivers the notification to the Desktop Assistant client.\n\n    By default, notification delivery is event-driven. The platform triggers the **sn\\_dex\\_desktop.triggerCheckdef** event, which signals the ACC agent to check for new notifications.\n\n\n## How notifications appear in the Desktop Assistant client\n\nEach Desktop Assistant notification appears as a card in the Desktop Assistant notification panel. The notification card displays the title, message body, and a timestamp indicating when the notification was sent.\n\nIf a notification is associated with a ServiceNow record, the card includes a deep link that opens the linked record directly. When the user's device is active at notification delivery time, a brief system tray toast notification also appears. The toast disappears automatically, while the notification card remains available in the Desktop Assistant panel for later reference.\n\n## Notification visibility duration\n\nThe **sn\\_dex\\_desktop.sn\\_desktop\\_assistant.notification\\_time\\_to\\_live** system property controls notification visibility duration in the Desktop Assistant client. You can set this value from **1** to **7** days, with a default of **7** days. If a value greater than **7** days is configured, the visibility period is limited to seven days. After the notification reaches its expiry date, it is automatically removed from the Desktop Assistant notification panel.\n\n**Related topics**  \n\n\n[Setting up DEX Desktop Assistant](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-service-management/digital-end-user-experience-dex/config-dex-desktop-exp.md)\n\n[Desktop Assistant notifications](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-service-management/digital-end-user-experience-dex/da-push-notifications.md)\n\n[Send a Desktop Assistant notification from server-side script](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-service-management/digital-end-user-experience-dex/send-da-notifications-from-script.md)\n\n[Examples of Desktop Assistant notifications using DesktopAppNotificationUtils](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-service-management/digital-end-user-experience-dex/examples-da-notifications-script-include.md)\n\n[API parameters to configure Desktop Assistant notifications](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-service-management/digital-end-user-experience-dex/api-parameters-to-customize-desktop-assistant-notifications.md)\n\n[Digital End-User Experience properties and settings](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-service-management/digital-end-user-experience-dex/dex-properties-settings.md)\n\n"}}