ftos.messaging.sendMobileNotifications

IMPORTANT!  
Starting with v24.3.0, this is renamed from sendMobileNotifications to ftos.messaging.sendMobileNotifications.

Sends a notification to subscribed user devices using the Azure Notifications Hub push engine.

IMPORTANT!  
This function requires a valid connection to a preconfigured Azure Notifications Hub. For details, see the Platform documentation and the Azure Notifications Hub documentation.

This is suitable for business logic modules of business service components.

Syntax

function ftos.messaging.sendMobileNotifications(appName: string, {message: string, mqsubject: string, roles: string[], users: string[]}): void
 
Parameter Description
appName Name of the mobile application. Determines which notification hub will handle the notifications.
message Contents of the text notification delivered to users.
mqsubject Contents saved in the Subject column of the FTOS_DPA_MessageQueue log. Does not affect the notification received by recipients.
roles Array of strings containing the user roles of the recipients.
If the parameters match both the user name and user role for the same recipient, only one notification will be sent.
users Array of strings containing the user account names of the recipients.
If the parameters match both the user name and user role for the same recipient, only one notification will be sent.

Examples