Individual (SMS) notifications

Created on 31 July 2023, over 1 year ago
Updated 3 August 2023, over 1 year ago

Problem/Motivation

Hi,

I'm fighting a use case that seemed straightforward but as it turns out there is no working solution in the drupalverse for Drupal 9/10. In Drupal 7 I could use Rules to send SMS messages for commerce order notifications critical to same-day rider delivery via SMS Framework and Twilio. I need the same for Drupal 10, and of course, hopefully using ECA instead of Rules.

I've tried SMS Framework with various patches; I've tried the Twilio module with various patches. Turns out they neither integrate with Rules nor ECA, if they work at all at the moment. I've tried Push Framework together with pf_onesignal (I tried pf_twilio first) but then found that I can only push to a channel and I can't select a recipient in my ECA models.

If I understand correctly, installing DANSE would add recipient selection to the process. However, the DANSE module page states it can select either all users or all users in a role. But reading through the issue queue it seems like it might(?) be possible to generate a notification that is then sent to a single recipient using DANSE => Push framework + ECA + ECA Onesignal => Onesignal => Twilio.

After a full day of installing and patching and uninstalling modules, DANSE is the last hope for sending text messages to individual Drupal users (which is really a fantastic feature) so any guidance is much appreciated, thanks in advance.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

💬 Support request
Status

Active

Version

2.2

Component

Code

Created by

🇹🇭Thailand AlfTheCat

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @AlfTheCat
  • 🇩🇪Germany jurgenhaas Gottmadingen

    Thanks for this issue @AlfTheCat, it triggered me to have a look into the available options as well and I figured, that the notify action plugin in the push framework was broken. I've just fixed it in 📌 Fix the issues reported by phpcs Fixed and if you wanted to try this out, please use the latest dev release. The next official release will follow later this week.

    When using the notify action plugin there, you get a config form like this:

    The important pieces are the channel and the entity. If you leave the entity empty, it defaults to the current user; otherwise, you can provide a token which holds the recipient user entity for that action. The channel plugin is then in charge of finding the contact details in the given user entity so that it can push the notification to those.

  • 🇹🇭Thailand AlfTheCat

    This is great news! Very happy to give this a try. And thanks a lot as well for the guidance on the channel and entity, I would not have figured that out.

    I will implement this in my setup today and tomorrow and report back.

Production build 0.71.5 2024