Install

For arlanix/notification 1.0.0

Install

This page is for the developer who installs Arlanix Notifications. It takes you from Composer to a test email, in about twenty minutes. Everything after the installation is done in the admin by the store; the manual is theirs. To upgrade or remove the module later, see Upgrade and remove.

1. Add the packages

In the Magento root:

composer require arlanix/notification

arlanix/notification is a metapackage: it installs every package at matching versions, email, Telegram, Slack, Discord, the store's events and monitoring. To leave one out, require the others instead, such as:

composer require arlanix/module-notification-smtp arlanix/module-notification-event

2. Upgrade the installation

bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:flush

In developer mode the setup:di:compile and setup:static-content:deploy lines can be left out. setup:upgrade declares the queue arlanix.notification.deliver on the store's queue connection: RabbitMQ when app/etc/env.php configures it, the MySQL queue otherwise. On RabbitMQ, if it stops with Error while checking if topic "arlanix.notification.deliver" is synchronous, the cache holds the config from before the install: see Troubleshooting.

3. Check the consumer and the cron

Deliveries are sent by the consumer arlanix_notification_deliver, and retried by a cron job in the group arlanix_notification, where monitoring's check runs too.

bin/magento queue:consumers:list | grep arlanix
bin/magento cron:run

On most stores the cron's consumer runner starts the consumer when messages wait, and nothing more is needed. If app/etc/env.php sets cron_consumers_runner → cron_run to false, set it to true, or run the consumer under supervisor instead: see Queue, cron and command line. If deliveries wait anyway, see Troubleshooting.

4. Set up the ways of delivery

  • Email goes through Magento's own mail by default: if the store's order emails arrive, there is nothing to do. To send through an SMTP server of its own instead, see Email.
  • Telegram needs the store's bot token in Stores > Configuration > Arlanix > Notifications > Telegram, or a bot of each subscription's own: see Telegram, Slack and Discord.
  • Slack and Discord need nothing here: each subscription brings its channel's webhook.

For the store's health, set a Health check key under Monitoring and point your uptime monitor at it: see Monitoring.

5. Send a test

  1. In Arlanix > Notifications > Topics, make a topic, such as Feed alerts.

  2. In its row, Select > Add subscription: your own address, delivered by Email. Save.

  3. On the subscription's form, Send test message. It arrives at once.

  4. Then publish through the queue, as a module would:

    bin/magento arlanix:notification:publish "Feed alerts" "Installed" --severity=info
    

    It arrives within a minute or so, and Arlanix > Notifications > Message Log shows it as Sent.

6. Admin roles

An admin role sees what it is allowed in System > Permissions > User Roles:

Resource Allows
Arlanix > Notification Topics Topics, test messages
Arlanix > Notification Subscriptions Subscriptions and their test messages, on their grid and on a topic's page
Arlanix > Notification Rules Rules, their preview and test messages
Arlanix > Notification Log The Message Log, Retry now, and the warning that deliveries wait
Stores > Configuration > Arlanix Notifications The settings: email, Telegram, monitoring

7. Hand back to the store

Tell the store owner it is installed and which ways of delivery work, and send them Your first rule.