Skip to Content Skip to Menu

CB Auto Actions isn't working in certain cases (anymore)

4 days 2 hours ago - 4 days 2 hours ago #341891 by derekkoopowitz
Hi,

I've got numerous auto actions that should fire off when a user logs into the website - essentially the auto action will look at their USA CB state code and based on that state code it will assign them a certain field value to another CB field. For instance, if my state code is CA then it will assign a value of D7 to another CB field. This used to work for many years but it seems that it isn't working any more.

 

In the above you can see which triggers are used.

 

This page checks to see if an override field is empty in the 1st condition and then the 2nd condition checks the state code. My understanding with conditions is that if the first condition is true then the 2nd condition is executed and if that is true as well then the actions are triggered.

 

In the last attachment, the 1st action sets the field to blank, and the 2nd action sets it to "D7".

As I mentioned, this used to work but for some reason it has stopped working. I have 8 of these auto actions that check the various state codes and then assigns a value to another field based on that state code.

I have some other auto actions that are similar and those seem to be working - see below - the major differences are the triggers I believe.

 
Last edit: 4 days 2 hours ago by derekkoopowitz.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 49536
  • Thanks: 8482
  • Karma: 1465
2 days 11 hours ago #341914 by krileon
The trigger you're using is for profile update. That won't and should've never worked for registrations. The following triggers are for registrations.

onAfterUserRegistration = frontend user registration
onAfterNewUser = backend user registration


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.

2 days 9 hours ago - 2 days 8 hours ago #341919 by derekkoopowitz
Thanks Kyle... I'll add those triggers for user registrations, but what trigger can I use if someone does log in at a later time or does a profile update? I have gone in myself using a test account and done a profile update to a new state code and that field doesn't get updated. I think I've tried onAfterUserLoginSuccess - should that work?-

On another note - is there a document that details when each trigger is triggered and what would trigger it?
Last edit: 2 days 8 hours ago by derekkoopowitz.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 49536
  • Thanks: 8482
  • Karma: 1465
1 day 11 hours ago #341925 by krileon
I don't recommend doing logic after login unless necessary as that'd trigger every time they login. Ideally you should only act explicitly on the triggers you need only when needed. So if this is something that depends on a field value being changed for example then registration and user update triggers should be sufficient.

onAfterUserUpdate = frontend user update
onAfterUpdateUser = backend user update
onAfterUserRegistration = frontend user registration
onAfterNewUser = backend user registration
onAfterLogin = frontend user login

On another note - is there a document that details when each trigger is triggered and what would trigger it?

No, most triggers are self explanatory. For example onAfterUpdateUser is after updating a user The act of updating a user is done from backend so that's backend user update. Variables available to each trigger are directly included in the interface as well below the triggers input.


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.

1 day 10 hours ago #341937 by derekkoopowitz
Thanks Kyle. I'll play around with these and hopefully I can get them to work.

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

21 hours 18 minutes ago #341939 by derekkoopowitz
So I've been trying to get this to work and I can't get it to work at all.  Attached are my settings for one particular auto action. Any advice/help would be much appreciated.

I've logged in as my test user and have changed the state code to NJ which when saved should modify the NSRCA District to D1. It doesn't do anything. I've changed the state code to NY and it doesn't change the NSRCA district to D1 either. See the screenshots below from the profile update page. I've also logged on the backend and changed the state codes as admin and nothing changes.

 
 

Here are my settings for this particular auto action.
 

 

 

 

I'm not sure if I should have the RELOAD USER set to YES or NO - I've tried both and it doesn't make a difference.

 

 
 

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

Moderators: beatnantkrileon
Powered by Kunena Forum