Skip to content

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 admin as 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.