For arlanix/notification 1.0.1
Install
This page is for the developer who installs Multichannel Store Notifications. It takes about twenty minutes, from Composer to a test email. After the installation, store staff do everything else in the admin. The manual is written for them. To upgrade or remove the modules later, see Upgrade and remove.
1. Add the packages
In the Magento root, run the following command:
composer require arlanix/notification
arlanix/notification is a metapackage. It installs every package at matching versions: email, Telegram, Slack, Discord, store events and monitoring. To leave a module out, require only the packages you need. For example:
composer require arlanix/module-notification-smtp arlanix/module-notification-event
2. Upgrade the installation
Run the following commands:
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:flush
In developer mode, you can skip setup:di:compile and setup:static-content:deploy.
setup:upgrade declares the queue arlanix.notification.deliver on the store's queue connection. The connection is RabbitMQ when app/etc/env.php configures it. Otherwise it is the MySQL queue.
On RabbitMQ, setup:upgrade can stop with the error Error while checking if topic "arlanix.notification.deliver" is synchronous. This error means that the cache still holds the configuration from before the installation. See Troubleshooting.
3. Check the consumer and the cron
The consumer arlanix_notification_deliver sends deliveries. A cron job in the cron group arlanix_notification retries them. The monitoring check runs in the same cron group.
To see the consumer and run the cron once, run the following commands:
bin/magento queue:consumers:list | grep arlanix
bin/magento cron:run
On most stores, the cron's consumer runner starts the consumer when messages are waiting. You do not need to do anything else.
If app/etc/env.php sets cron_consumers_runner → cron_run to false, do one of the following:
- Set it to
true. - Run the consumer under supervisor. See Queue, cron and command line.
If deliveries still wait on the queue, see Troubleshooting.
4. Set up the ways of delivery
Each way of delivery needs the following setup:
- Email uses Magento's own mail by default. If the store's order emails arrive, you do not need to do anything. To send through a separate SMTP server, see Email.
- Telegram needs the store's bot token in Stores > Configuration > Arlanix > Notifications > Telegram. A subscription can also use a bot of its own. See Telegram, Slack and Discord.
- Slack and Discord need no setup here. Each subscription stores its own channel webhook.
To watch the store's health from outside, set a Health check key in the Monitoring group, and point your uptime monitor at the health check URL. See Monitoring.
5. Send a test
To check that delivery works, send yourself a test email:
Go to Arlanix > Notifications > Topics.
Click Add topic and enter a Name, such as Feed alerts.
Click the arrow beside Save, then Save & Close.
In the topic's row, click Select > Add subscription.
Enter a Name, such as your own name. In Delivered by, choose Email, and enter your email address in Email. Click Save.
Click Send test message. The email arrives at once.
Publish a message through the queue, the same way a module does. Run the following command:
bin/magento arlanix:notification:publish "Feed alerts" "Installed" --severity=infoThe message arrives within about a minute. Arlanix > Notifications > Message Log shows it as Sent.
6. Admin roles
An admin user sees only what their role allows. You set roles in System > Permissions > User Roles. The following resources control access:
| Resource | Allows |
|---|---|
| Arlanix > Notification Topics | Topics and their test messages |
| Arlanix > Notification Subscriptions | Subscriptions and their test messages, in the Subscriptions grid and on a topic's page |
| Arlanix > Notification Rules | Rules, their preview and their test messages |
| Arlanix > Notification Log | The Message Log, Retry now, and the warning that deliveries are waiting |
| Stores > Settings > Configuration > Arlanix Notifications | The settings: email, Telegram and monitoring |
7. Hand back to the store
Tell the store owner that the modules are installed and which ways of delivery work. Send them the link to Your first rule.