Skip to Content Skip to Menu

CB Auto Action Email Profile Owner and Activity Comments

  • drgolden
  • drgolden
  • OFFLINE
  • Posts: 23
  • Thanks: 3
  • Karma: 0
7 years 4 months ago - 7 years 4 months ago #294646 by drgolden
Joomla! 3.7.2
CB 2.1.2
CB Subs: 4.1.0
CB Auto Action: 6.3.7
CB Gallery: 2.0.1

Use Case- I manage as association with 100+ member organizations. We are setting up a certification program in which each member needs to upload policy documents, which are then reviewed and commented on by certification team members.

Each of our member organizations has the same CB Subs plan.

The Certification Team is assigned a CB Subs plan.

Two profile tabs were added to the Member Organizations User Profiles – CB Gallery and CB Activity.

CB Subs is used to hide the tabs from all but the User Profile Owner and the Certification Team

The workflow would be:
1) Our Member Organizations login and upload their policies into a CB Gallery folder.
2) An email is sent to the Certification Team members that an upload has occurred.
3) The Certification Team members login with their credentials, review the policies and make comments on the CB Activity page.
4) An email is sent to the Profile Owner of the activity comments.

I would like to use CB Auto-action to email the Profile Owner and Certification Team Members whenever comments are made. I have reviewed the forum but am still unclear how to do this.

Step 4 is my stumbling block.. specifying the email of the profile owner.
Last edit: 7 years 4 months ago by drgolden.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48438
  • Thanks: 8275
  • Karma: 1443
7 years 4 months ago #294661 by krileon
Latest CB Activity updated the triggers with the ability to determine source. The source for a CB Gallery comment is the media object so it properly has the profile owners user id. See the below example using the new trigger.

Global
Triggers: activity_onAfterCreateStreamComment
Type: Email
User: Automatic
Access: Everybody
Conditions
1: [var3_asset] Is REGEX /^gallery.\d+$/
Action
To: [var2_user_id]

That should ensure it only triggers for comments on gallery media and send the email to the gallery media owner. With the above trigger var1 is the stream object, var2 is the source, and var3 is the 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.

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

  • drgolden
  • drgolden
  • OFFLINE
  • Posts: 23
  • Thanks: 3
  • Karma: 0
7 years 4 months ago #294691 by drgolden
Here's the rub I found what appears to be beyond your charge.

We use CB Profile Pro. The [var2_user_id] returns the email of the creator of the CB Profile, not the email of the user tied to the profile.

The particular profile we use was created through CB Profile Pro by user 76

If I view the profile of User 128, [var2_user_id] returns the email of user 76 not user 128.

Anything we can do to capture the correct email address?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48438
  • Thanks: 8275
  • Karma: 1443
7 years 4 months ago #294708 by krileon
The Email action that you should be using to send the email works with user id. [var2_user_id] of that trigger should not be the viewing users user object (which doesn't even exist in that trigger), but should be the gallery media entry. This assumes you have everything up to date where all of this functionality was implemented.

Please note the above was just an example. It was not tested. I have now tested it and looks like the condition just needed to be adjusted. The below is confirmed working.

Global
Triggers: activity_onAfterCreateStreamComment
Type: Email
User: Automatic
Access: Everybody
Conditions
1: [var3_asset] Is REGEX /^gallery/
Action
To: [var2_user_id]


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.

  • drgolden
  • drgolden
  • OFFLINE
  • Posts: 23
  • Thanks: 3
  • Karma: 0
7 years 4 months ago #294741 by drgolden
It works! Thanks Very Much

One last question .. actually two :

1) In the email body I would like to include a field substition says Comments section was just updated by " xxxxxxxx"
2) Not being a programmer, I am not sure if this question is appropriate .. but is there a reference/resource/list of the appropriate variables for substitutions fo this type? Have I missed something in the documentation/tutorials?

Thanks for all your hard work and dedication

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48438
  • Thanks: 8275
  • Karma: 1443
7 years 4 months ago #294742 by krileon

1) In the email body I would like to include a field substition says Comments section was just updated by " xxxxxxxx"

Set User for the auto action to User. This will cause all field substitutions to be from the viewing user or the user making the comment in this case. You can then use [username] to substitute in the username of the person commenting for example.

2) Not being a programmer, I am not sure if this question is appropriate .. but is there a reference/resource/list of the appropriate variables for substitutions fo this type? Have I missed something in the documentation/tutorials?

The below trigger tutorial will show you what variables are available to the trigger, but it maybe a few releases out of date now and again as we've to manually update it.

www.joomlapolis.com/documentation/279-community-builder/tutorials/18358-using-cb-triggers

If you mean in regards to things like a users username see the below substitution tutorial.

www.joomlapolis.com/documentation/279-community-builder/tutorials/18353-using-substitutions-throughout-cb


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