[SOLVED] CB Auto Actions Renewals on CBSubs

6 years 7 months ago - 6 years 7 months ago #296455 by fede312
Great!
How do I setup the CB Query Field?

I could't find the right example on the CB Query video tutorial on youtube
:)

Please Log in to join the conversation.

6 years 7 months ago #296457 by krileon
You'll need to review the _cbsubs_subscriptions and possible _cbsubs_baskets database tables and make a query that checks for baskets and subscriptions. Single payments (non-recurring) generate a new basket with each payment. Recurring do not and will just increment the regular_recurrings_used for their subscription row on renewal. It's significantly more complicated to go this approach vs just chaining a few auto actions together.


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

Please Log in to join the conversation.

6 years 7 months ago #296460 by fede312
I'm sorry but you lost me. I do not know how to do this.

Action 1
Access: CB Month 3
Groups: CB Month 4

Action 2
Access: CB Month 2
Groups: CB Month 3

Do I add these actions to the ones I already have?
Do I delete the actions I already have and make new ones?
The Access Parameter?
What type? What condition? What action?

I wish I was more well versed on this language you are speaking, but I'm not.
Can you please be more specific?

Please Log in to join the conversation.

6 years 7 months ago #296461 by krileon
Lets for example say you want this to go on for 3 months. You'd need the below actions to do this.

Action 1
Global
Triggers: onCPayUserStateChange
User: Automatic
Access: CB Month 2
Conditions
1: [var3] Equal To PLAN_ID_HERE
2: [var2] Equal To A
3: [var7] Equal To R
Action
Mode: Add Usergroups
Groups: CB Month 3

Action 2
Global
Triggers: onCPayUserStateChange
User: Automatic
Access: CB Month 1
Conditions
1: [var3] Equal To PLAN_ID_HERE
2: [var2] Equal To A
3: [var7] Equal To R
Action
Mode: Add Usergroups
Groups: CB Month 2

Action 3
Global
Triggers: onCPayUserStateChange
User: Automatic
Access: Registered
Conditions
1: [var3] Equal To PLAN_ID_HERE
2: [var2] Equal To A
3: [var7] Equal To R
Action
Mode: Add Usergroups
Groups: CB Month 1

The order of these actions is very important as they execute in order. So what will happen is when the user renews for the first time Action 3 will execute. This will give them the CB Month 1 usergroup. On their second renewal Action 3 and Action 2 will execute. Action 3 will be skipped since they already have that usergroup. Action 2 sees that they are a member of CB Month 1 usergroup thanks to the Access parameter and it then gives them CB Month 2. You can chain this for as long as you want.


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

Please Log in to join the conversation.

6 years 7 months ago #296470 by fede312
This works great!!

Now, are you sure this will work in auto renew as well?
Without having to add any other action?

Thanks,

Please Log in to join the conversation.

6 years 7 months ago #296471 by krileon
Yes, it doesn't matter if it's a single payment or recurring payment.


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

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.245 seconds

Facebook Twitter LinkedIn