Skip to Content Skip to Menu

Selective Auto Action Email for various Activity

  • sysopcrew
  • sysopcrew
  • OFFLINE
  • Posts: 74
  • Thanks: 14
  • Karma: 3
7 years 4 months ago #294983 by sysopcrew
I've got all current versions of CB, Auto Actions, and Activity.

But I'm using Activity in multiple ways to do multiple things... essentially, multiple streams. This is on an intranet where vendors are applying for a booth at a craft fair. We have fair staff.

1. Vendors have a "Vendor Support Channel" to post questions to staff. Staff get an email (Auto Actions). Field type "Activity".
2. Staff have a restricted "Vendor Questions" tab that show questions from all vendor "Vendor Support Channel" streams. Field type "Activity".
3. We have a "Staff Notes" tab on each vendor profile for staff to keep private/confidential notes for each vendor. Field type "Comment".

When staff respond to vendor questions, an Auto Action email is sent to the vendor.

All is well, except "Staff Notes" is triggering the notification emails for 1 and 2. The Auto Action triggers for #1 and #2 are activity_onAfterCreateComment and activity_onAfterCreateStreamComment.

Is there a way to divide or separate out activity on 1 and 2 from activity on 3. I don't want notifications to go for "Staff Notes".

I had to scour the forum to find out about [var2_user_id] to send to the vendor when staff posted a reply. Is there a way to detect an activity field ID or something to use in an Auto Action condition?

--
David Riviera

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

  • sysopcrew
  • sysopcrew
  • OFFLINE
  • Posts: 74
  • Thanks: 14
  • Karma: 3
7 years 4 months ago #294984 by sysopcrew
Replied by sysopcrew on topic Selective Auto Action Email for various Activity
I'm thinking it's going to tie in with Assets; there's not much info on all the options yet. Asset: profile.%.field.84 or similar?

--
David Riviera

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48448
  • Thanks: 8280
  • Karma: 1443
7 years 4 months ago #294995 by krileon
Asset is the only thing determining location for an activity or comment. So you'll want to be sure the asset you're using for your extra streams is unique enough that you can filter it out. If it's an activity field then it probably has an asset of profile.USER_ID.field.FIELD_ID. In CB Auto Actions you'll need to use REGEXP to condition against it so something like the below should work fine.

[var3_asset] Is REGEXP /profile\.\d+\.field\.FIELD_ID_HERE/

Be sure to replace FIELD_ID_HERE with the field if of your comment field (#3). That should prevent comments from #1 and #2 from sending that notification. Additionally see the below for the variables available to the comment create/upgrade triggers.

activity_onAfterUpdateStreamComment
var1 = stream object
var2 = source object (likely the activity or field object in this case)
var3 = comment object
var4 = previous comment object (before updates applied)

activity_onAfterCreateStreamComment
var1 = stream object
var2 = source object (likely the activity or field object in this case)
var3 = comment object


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: sysopcrew

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

Moderators: beatnantkrileon
Powered by Kunena Forum