Skip to Content Skip to Menu

🌟Discover the Joomla AI Plugin that wrote its own story! - CB Editor Assistant 1.1now for Joomla 3, 4 & 5!
✍️ 5-Day Free Trial, then 🎯 save up to 30% with our 🛍️ Intro Offer (First 50 users, ends Dec. 25th)
🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

CB Auto Action: please help

  • denisp
  • denisp
  • OFFLINE
  • Posts: 26
  • Thanks: 3
  • Karma: 0
4 years 7 months ago #318601 by denisp
Replied by denisp on topic CB Auto Action: please help

krileon wrote: CB Auto Actions performs actions on events. You don't have an event for it to act on. So your only options are to run your auto actions on every user on the site using Internal Users and a CRON task or acting on something like onAfterLogin to perform the action anytime a user logs in. Neither of these are perfect solutions for what you're trying to do since CB Auto Actions is not a scheduler. It just performs actions on specified events automatically.


Hi Kyle,
about the email sending solution, I need to know if a CRON task is enough to do the work.
that's because users, once registered, they no longer return on the website, nor they login in their profile.
So a CRON job can be setup and does it resolve the issue?
If yes should I setup a CRON like this one:
Code:
wget https://mydomain.com/index.php >/dev/null 2>&1

or it shoud point to a specific page of CB?

thanks again,
denis

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
4 years 7 months ago #318621 by krileon
Replied by krileon on topic CB Auto Action: please help

that's because users, once registered, they no longer return on the website, nor they login in their profile.

Then you've an engagement problem with your site that spamming them with emails isn't going to fix. Consider using a newsletter extension like AcyMailing so they can opt-in/out of your emails. They won't be able to do that with an email forced through CB Auto Actions unless you setup a checkbox field and condition against it, but at that point why put in all that effort to make a fake newsletter extension instead of using a newsletter extension. Once you've a proper newsletter setup you should work on making your site more engaging for your users and using newsletters to notify them about new/upcoming things.

So a CRON job can be setup and does it resolve the issue?

A wget CRON can be setup to execute auto actions, yes. If your auto action as the Internal Users trigger and your CRON task calls the Internal Users URL provided in CB Auto Actions > Parameters it will loop every user on your site through the auto action. I again do not recommend doing this.


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.

  • denisp
  • denisp
  • OFFLINE
  • Posts: 26
  • Thanks: 3
  • Karma: 0
4 years 7 months ago #318626 by denisp
Replied by denisp on topic CB Auto Action: please help

Consider using a newsletter extension like AcyMailing so they can opt-in/out of your emails.


Well, i don't need a newsletter extesion, because the aim is simply to inform the user - with 1 email -
that his name is no longer visible on the website.
The certifcate is expired and your Advacended search does the trick to not show him in the userlist. That's it.

But if I well understand, without user actions, the email is not sendable automatically when "today" is day that the certificate expires.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
4 years 7 months ago #318638 by krileon
Replied by krileon on topic CB Auto Action: please help
Your auto action would send them an email every time it is ran would be the issue. You'd need it to send once and never again. So you'd need 1 auto action that actually sends the email and another auto action that updates a field to condition against in the first auto action so it skips over users that have already been emailed. As I've explained CB Auto Actions isn't a scheduler so it's not really equipped for these usecases, but if you want to force it you can I guess. You'd have something like the below

Global
Triggers: Internal Users
Type: Email
User: Automatic
Access: Everybody
Conditions
Condition 1
Field: Custom > Value
Custom Value: [cb:parse function="time"][FIELD_NAME][/cb:parse]
Format Functions: SELECTED
Operator: Greater Than or Equal To
Value: [cb:parse function="time"][cb:date format="Y-m-d" /][/cb:parse]
Format Functions: SELECTED
Condition 2
Field: cb_alreadynotified
Operator: Not Equal To
Value: 1
Action
configure email as needed

Global
Triggers: Internal Users
Type: Field
User: Automatic
Access: Everybody
Conditions
Condition 1
Field: Custom > Value
Custom Value: [cb:parse function="time"][FIELD_NAME][/cb:parse]
Format Functions: SELECTED
Operator: Greater Than or Equal To
Value: [cb:parse function="time"][cb:date format="Y-m-d" /][/cb:parse]
Format Functions: SELECTED
Condition 2
Field: cb_alreadynotified
Operator: Not Equal To
Value: 1
Action
Field: cb_alreadynotified
Operator: Set
Value: 1

cb_alreadynotified should be a checkbox field. The first auto action checks if cb_alreadynotified is not set to 1 (checked). If it's not set to 1 it emails them. If it is set to 1 it skips them. The second auto action sets cb_alreadynotified to 1 if it isn't already set to 1. This will prevent the user from being notified multiple times.


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.

  • denisp
  • denisp
  • OFFLINE
  • Posts: 26
  • Thanks: 3
  • Karma: 0
4 years 7 months ago #318722 by denisp
Replied by denisp on topic CB Auto Action: please help
Hello Kyle,
here I am again. Something is not working. :-(
I have tried to register a user with certification date expire 20 may 2020
but the notification email was not sent.

I am attaching some screenshots .

krileon wrote: Your auto action would send them an email every time it is ran would be the issue. You'd need it to send once and never again. So you'd need 1 auto action that actually sends the email and another auto action that updates a field to condition against in the first auto action so it skips over users that have already been emailed. As I've explained CB Auto Actions isn't a scheduler so it's not really equipped for these usecases, but if you want to force it you can I guess. You'd have something like the below

Global
Triggers: Internal Users
Type: Email
User: Automatic
Access: Everybody
Conditions
Condition 1
Field: Custom > Value
Custom Value: [cb:parse function="time"][FIELD_NAME][/cb:parse]
Format Functions: SELECTED
Operator: Greater Than or Equal To
Value: [cb:parse function="time"][cb:date format="Y-m-d" /][/cb:parse]
Format Functions: SELECTED
Condition 2
Field: cb_alreadynotified
Operator: Not Equal To
Value: 1
Action
configure email as needed






About the sending mail funcion, 2 considerations:

1 - in my CB Configuration [CB Core], Date format is dd/mm/yyyy.
but in the Action Value I read [cb:date format="Y-m-d" /]

2 - in auto Action, the Mailer is set on "Default CB". Can be an issue about it?

krileon wrote: Global
Triggers: Internal Users
Type: Field
User: Automatic
Access: Everybody
Conditions
Condition 1
Field: Custom > Value
Custom Value: [cb:parse function="time"][FIELD_NAME][/cb:parse]
Format Functions: SELECTED
Operator: Greater Than or Equal To
Value: [cb:parse function="time"][cb:date format="Y-m-d" /][/cb:parse]
Format Functions: SELECTED
Condition 2
Field: cb_alreadynotified
Operator: Not Equal To
Value: 1
Action
Field: cb_alreadynotified
Operator: Set
Value: 1

cb_alreadynotified should be a checkbox field. The first auto action checks if cb_alreadynotified is not set to 1 (checked). If it's not set to 1 it emails them. If it is set to 1 it skips them. The second auto action sets cb_alreadynotified to 1 if it isn't already set to 1. This will prevent the user from being notified multiple times.




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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
4 years 7 months ago #318729 by krileon
Replied by krileon on topic CB Auto Action: please help
It doesn't matter what format the field is in as we're acting on raw database values and converting them to integer timestamps for comparison. Are you running the Internal Users URL? How are you testing whether this is working or not? It's recommend to configure it to act on the after user login trigger then test it by logging in with a test user, which you believe should meet the criteria, to confirm it works. When doing the login test be sure to enable debug under the parameters tab as that will output debug information if something failed.


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.

Moderators: beatnantkrileon
Powered by Kunena Forum