merci_notifyUserGroup() Function Documentation
A part of Merciglobal Cloud ERP π¦, the merci_notifyUserGroup() function enables seamless push notifications to users within specific groups across your organisation, over Android or iOS mobiles or tablet devices.
β Function Definition
merci_notifyUserGroup($groupname, $title, $body, $sound='');
π― Purpose
This function dispatches push notifications to the last active mobile or tablet device of all users associated with the specified user group.
Key Highlights
- Works only for users who have installed the Merciglobal Cloud ERP Mobile App and logged in at least once.
- Supports predefined notification sound profiles.
- Designed for system-wide alerts, announcements, approvals, workflow updates, reminders, etc.
- Allows notifying Admin by passing
adminas the group name.
π§© Parameters Explained
| Parameter | Description |
|---|---|
| $groupname | Name of the user group (e.g., sales, hr, operations). Use admin to notify the system Admin. |
| $title | Notification title (bold text shown on device). |
| $body | Main content/message of the notification. |
| $sound (optional) | Custom sound to be played. Leave blank for default. |
π Supported Notification Sounds
Choose from the following builtβin sound themes:
| Sound Code | Description |
|---|---|
| (blank) | Default device sound |
| alert | Highβpriority alert tone |
| reminder | Gentle reminder tone |
| warning | Critical warning tone |
π Sample Usage
Basic Notification
merci_notifyUserGroup('sales', 'New Lead Assigned', 'A new lead has been added to your pipeline.');
Notification With Custom Sound
merci_notifyUserGroup('operations', 'Stock Level Low', 'Inventory for Item X is below threshold.', 'warning');
Notify Admin
merci_notifyUserGroup('admin', 'System Alert', 'A critical system event has occurred!', 'alert');
π’ Use Cases Inside Merciglobal Cloud ERP
- Workflow approvals (Purchase Requests, Leaves, Expense Claims)
- Alerts for Sales Team (New Lead, Quotation Approved)
- Stock or Reorder Level Alerts
- HR Announcements
- System-level warnings for Admins
π Summary
merci_notifyUserGroup() is a powerful, developer-friendly utility within Merciglobal Cloud ERP enabling immediate, targeted, mobile-first communication across teams. Perfect for system alerts, workflow updates, and operational remindersβensuring users never miss important actions.