learning more about auto actions

4 years 11 months ago #312339 by samw
learning more about auto actions was created by samw
Hello,

This is just a general question about what is the best current way to learn about how to take advantage of all the triggers and abilities of the auto actions plugin (which is awesome, btw). I apologize in advance if I've overlooked some documentation. I did watch the auto actions videos and look at the auto actions print documentation available at the Support tab.

So, I have an auto action jumping off of onCPayUserStateChange. I found very helpful information about it posted in the forum by Kyle here:

www.joomlapolis.com/forum/255-developer-members-support/240780-add-and-remove-usergroups-based-off-subscription#311562

Among other things, Kyle explained you could use this trigger to move members into multiple usergroups upon subscription (and do other stuff) with the following inputs:

Plan Active
Global
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody
Conditions
1: [var3] Equal To PLAN_ID_HERE
2: [var2] Equal To A

My question is just: if I had wanted to figure that out for myself, where would I look? For example, while I understand -- only because of Kyle's example -- that [var3] must be the plan id and [var2] must be the status of the subscription (and have now looked and found the related fields in the #__cbsubs_subscriptions table) I don't know how I could have learned to use var3 or var2, or what "[var3]" and "[var2]" are in the context of the onCPayUserStateChange trigger, or that they are passed upon it in the first place, etc., on my own. Any suggestions?

There are so many triggers available, I'm curious how to explore what they can do and how to use them.

Thanks!

Please Log in to join the conversation.

4 years 11 months ago #312347 by krileon
Replied by krileon on topic learning more about auto actions

My question is just: if I had wanted to figure that out for myself, where would I look? For example, while I understand -- only because of Kyle's example -- that [var3] must be the plan id and [var2] must be the status of the subscription (and have now looked and found the related fields in the #__cbsubs_subscriptions table) I don't know how I could have learned to use var3 or var2, or what "[var3]" and "[var2]" are in the context of the onCPayUserStateChange trigger, or that they are passed upon it in the first place, etc., on my own. Any suggestions?

You'd need to check the documentation below to find the available variables in a trigger. You can then substitute in those variables using [var1-10]. So using the above as example variable 3 is the plan id so you'd substitute it in with [var3] while variable 2 is the state the user is changing to for that plan so you'd substitute it in with [var2].

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

The documentation for CB Auto Actions is a bit lacking admittedly, but it's mostly a tool for implementing usecases so there's not much we can document beyond usecase examples. We'll be trying to improve our trigger documentation in the future once we add phpdoc in our code for every trigger that describes them and their variables so we can more easily generate documentation for them.


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

Please Log in to join the conversation.

4 years 11 months ago #312352 by samw
Replied by samw on topic learning more about auto actions
Thank you Kyle, that is exactly what I needed!

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.180 seconds

Facebook Twitter LinkedIn