[SOLVED] Triggering an email message based on a field change status

3 years 7 months ago - 3 years 7 months ago #320473 by eciudad
I have a comprofiler field that stores emails which are entered during the registration (additionally to the registrant email). The goal is that when the profile is saved, to sent a message to that that email. I Would like to do this every time the email changes. Could this be done in auto actions or or is there any other function that could do this? Thank you.

Thank you in advance.

Please Log in to join the conversation.

3 years 7 months ago #320476 by krileon
Yup that can be done with CB Auto Actions. See the below regarding the initial setup. Note the below can work with any action type to perform something when a field value changes and in your case use Email action type.

Global
Triggers: onAfterUserUpdate, onAfterUpdateUser
User: Automatic
Access: Everybody
Conditions
Field: Custom > Value
Custom Value: [var1_FIELD_NAME]
Operator: Not Equal To
Value: [var3_FIELD_NAME]

This compares the new value in var1 with the old value in var3 to see if the field changed values. If you also want to make sure the field even has a value then add the below condition as well.

Field: Custom > Value
Custom Value: [var1_FIELD_NAME]
Operator: Not Empty

Be sure to change FIELD_NAME to the actual name of your field.


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.
The following user(s) said Thank You: eciudad

Please Log in to join the conversation.

3 years 7 months ago #320511 by eciudad
Will try. Thank you for the information Kyle!

Please Log in to join the conversation.

3 years 7 months ago #320529 by eciudad
It does work great. Thank you!
The following user(s) said Thank You: krileon

Please Log in to join the conversation.

3 years 4 months ago #322017 by bascherz
I've got an auto action setup exactly like this with var1 vs var3 compares on several fields:
  • cb_mobile
  • cb_phone
  • cb_zip
  • email

The idea is to have an email sent when any of the above change. Problem is, I am getting an email when this profile is saved, even if nothing changed.

Yes, I have checked to make sure all the fields are spelled correctly. But I was wondering if [var1_email] and [var3_email] work the same as the comprofiler fields in this regard. I haven't started the process of elimination part yet. Figured I'd ask here first.

Thanks in advance.

______________________
Bruce S - Vienna, VA

Please Log in to join the conversation.

3 years 4 months ago #322018 by krileon
When acting on onAfterUserUpdate or onAfterUpdateUser for field value changes you need to compare the var1 value against the var3 value. That's basically it as instructed in my reply above. It's not possible for CB Auto Actions to send an email if those conditions are not met. Maybe you're using OR conditions and not AND conditions if you've multiple conditions?


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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.222 seconds

Facebook Twitter LinkedIn