Installing Product Messaging and confirming cron is driving delivery
Requirements
- Magento Open Source or Adobe Commerce 2.4.7 - 2.4.9 (
magento/framework>=103.0.7 <103.0.10); 2.4.10 and later are blocked by a Composer conflict rule - PHP 8.2, 8.3, 8.4, or 8.5
- A working Magento cron:
bin/magento cron:runinvoked at least once a minute. Nothing is sent without it - see Set up cron
2.4.9 support was verified on Magento Open Source. The module has no edition-specific code and the Adobe Commerce package constraint was widened to match, but Adobe Commerce 2.4.9 has not been tested directly.
Install via Composer
Composer access to the package is granted with purchase through the OCMLabs Packagist repository. The license is $250 for Magento Open Source (ocmlabs/module-product-messaging) and $500 for Adobe Commerce (ocmlabs/module-product-messaging-commerce); pick the edition on the product page at checkout.
composer require ocmlabs/module-product-messagingbin/magento module:enable OCMLabs_ProductMessagingbin/magento setup:upgradebin/magento setup:di:compilebin/magento cache:flushAdobe Commerce customers instead run composer require ocmlabs/module-product-messaging-commerce. It is a metapackage that licenses the module for Adobe Commerce and pulls in ocmlabs/module-product-messaging automatically. The remaining bin/magento steps are identical, and both packages install the same module.
On a store in production mode, also deploy static content so the rule form’s admin components are current:
bin/magento setup:static-content:deploy -fbin/magento cache:flushVerify the installation
bin/magento module:status OCMLabs_ProductMessagingThe output should read Module is enabled. In the admin, check for:
- Sales > Product Messaging > Rules - rule management
- Sales > Product Messaging > Email Log - queue and delivery history
- Stores > Configuration > OCM Labs > Product Messaging - module settings
Two sample email templates, “OCM Product Warranty Information” and “OCM Product Instruction Manual”, are installed by a data patch on the first setup:upgrade. Re-running setup:upgrade never overwrites your edits to them.
The module is enabled by default (Enabled = Yes), but nothing happens until you create a rule.
Grant admin access
ACL resources live under Sales in System > Permissions > User Roles:
- OCMLabs_ProductMessaging::manage - create, edit, enable, and disable rules
- OCMLabs_ProductMessaging::manage_delete - delete rules (nested under manage)
- OCMLabs_ProductMessaging::log - view the Email Log
- OCMLabs_ProductMessaging::config - the configuration section
Without manage, the Rules menu item does not appear for that user. The rule form’s email-template quick-create also checks Magento’s own email-template permission, so a user who can manage rules cannot edit transactional templates they otherwise have no access to.
Set up cron
This is the step that matters most. Queuing an email is a cheap database write that happens when the order is placed, invoiced, or shipped. Sending it happens only in the ocmlabs_productmessaging_send cron job. If system cron is not running, queued emails sit as Pending forever with no error and no admin notice. A pile of old Pending rows in the Email Log almost always means cron, not the module.
bin/magento cron:installcrontab -l # as the web server user; should show a bin/magento cron:run lineIf your hosting runs cron another way (a container sidecar, a Kubernetes CronJob, a supervisor loop), make sure it invokes bin/magento cron:run at least once a minute. cron:install is optional if you already have that.
Both jobs are in the default cron group, so they run wherever Magento’s other default-group jobs run:
| Job | Schedule | Behavior |
|---|---|---|
ocmlabs_ | Every minute | Sends pending rows that are due, up to the configured batch size |
ocmlabs_ | Daily, 2:45 AM | Deletes sent, failed, and cancelled log rows older than the retention period |
Delayed emails need no extra job: the queue row is inserted with a future scheduled time and the per-minute job picks it up when it comes due.
Before go-live
- Confirm Stores > Configuration > OCM Labs > Product Messaging > Sending > Test Mode is No. Check it again after cloning production down to staging and back.
- Place a test order for a matched SKU and watch the row move from Pending to Sent in Sales > Product Messaging > Email Log within a minute or two.
Create your first rule
- Go to Sales > Product Messaging > Rules and click Add New Rule.
- Name it, for example “5-Year Warranty - Power Tools”, and set Status to Enabled.
- Enter SKU patterns such as
DRILL-*, or click Browse Products to pick SKUs from a grid. - Turn on Send Email, pick a trigger and the “OCM Product Warranty Information” sample template, and/or turn on Show Block on Success Page and pick a CMS block.
- Save, then use Send Test to send yourself a preview against a recent matching order.
See Rules & SKU Patterns for the full rule form.