Skip to Content Skip to Menu

🌟 CB Editor Assistant 1.0.0 is here! Discover our new AI Joomla Plugin that wrote its story! (and this banner!)
Start at just $12.50/month* or 💸 save 30% with our 🛍️ Intro Black Friday Offer for a lifetime*

Auto Actions Behavior

4 years 11 months ago #315945 by billraydrums
Auto Actions Behavior was created by billraydrums
Heya!

I'm slowly making progress on my project here. What I need to do with Auto actions is when someone checks a box that states they have their "certification" for CPR or First Aid training, it automatically begins counting down to an annual "expiration" date, and sends them emails a couple of weeks before expiry, the week of expiry, two days, one day, then "Expired".

The goal is to keep the user engaged so that they are able to stay current within their licensing. They're looking after kids, after all. :D

How would I use Auto Actions to accomplish this?

Thanks!

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48551
  • Thanks: 8291
  • Karma: 1445
4 years 11 months ago #315951 by krileon
Replied by krileon on topic Auto Actions Behavior
CB Auto Actions does not have a scheduler. So it's really not ideal for what you're trying to do. If you still want to give it a shot it's a very complicated process. You'd need a means of keeping track of the date they checked that box., which could be an auto action acting on the after user update trigger to save current date in the database (e.g. to a datetime field using field action).

Next you'd need an auto action that emails them, but you'd need it to check against that date you just stored to determine if they're at the interval which should be emailed; for that you can probably use a Code condition which lets you supply custom PHP as a condition for an auto action. You'd need to do your datetime comparisons here to see if the datetime stored for them is within an interval to be emailed.

Next you'd need to make sure this runs against every user on your site every day. To do this use the Internal Users trigger. Now you'll need a CRON task to run the Internal Users URL found within CB Auto Actions > Parameters every day. This can be a heavy operation, but it has batch processing built in so you may need the CRON to run this URL multiple times per day.

I don't honestly recommend trying to force CB Auto Actions to be a scheduler. It may have such functionality eventually, but its original intend was to perform automated actions on CB triggers and not for scheduling things like this. This would be significantly easier to do with CBSubs where they'd just subscribe to a plan (could be free) and CBSubs Mailer would have no issues handling those emails.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

4 years 10 months ago #316113 by billraydrums
Replied by billraydrums on topic Auto Actions Behavior
The need for the timer would be to remind them to re-up certain features for their licensure such as CPR certificates and whatnot.

Bummer, that would be a nice thing to have in this instance.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum