wallet points for CB Subs automation - revisited

2 months 3 weeks ago - 2 months 1 week ago #337022 by webiedesign
During testing this worked, the reality did not work with the "real" subscriptions.
Clarification on a couple of things mentioned in an earlier posts.

In this post -
www.joomlapolis.com/forum/professional-members-support/245893-wallet-points-for-cb-subs-automation

"I don't see the point of subtracting points though if they're just going to be completely wiped out on payment and maybe you should use a YES/NO flag system instead."

Can you expand on this? Maybe this will solve my problem, but I don't know where/how to do this.

Here I just need clarification, since i feel like I have tried every possible combination of settings:

www.joomlapolis.com/forum/professional-members-support/246123-wallet-points-for-cb-subs-automation-stopped-working-solved

"If still not working try moving the management of that field to CB Auto Actions"
So move the field condition from the CB Paid Subscriptions auto action to this new Field auto action, correct?

and "This should be ran before the renewal auto action so be sure the order is correct."
this is just the order of the 2 auto actions- correct? and is not related to the plan settings, correct?

Mary
webie-design.com

Please Log in to join the conversation.

2 months 3 weeks ago #337023 by krileon

During testing this worked, the reality did not work with the "real" subscriptions.

What about it doesn't work?

"I don't see the point of subtracting points though if they're just going to be completely wiped out on payment and maybe you should use a YES/NO flag system instead."

The idea was that if points aren't being accumulated and used like a wallet then just use a yes/no flag to determine access.

So move the field condition from the CB Paid Subscriptions auto action to this new Field auto action, correct?

Yes, you can use the below to perform whatever action you want based off plan status.

Plan Active
Global
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody
Conditions
Condition 1
Field: Custom > Value
Custom Value: [var3]
Operator: Equal To
Value: PLAN_ID_HERE
Condition 2
Field: Custom > Value
Custom Value: [var2]
Operator: Equal To
Value: A

Plan Expired
Global
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody
Conditions
Condition 1
Field: Custom > Value
Custom Value: [var3]
Operator: Equal To
Value: PLAN_ID_HERE
Condition 2
Field: Custom > Value
Custom Value: [var2]
Operator: Not Equal To
Value: A

Replace PLAN_ID_HERE with the plan id of the plan you want to act on or remove the condition to act on all plans.

this is just the order of the 2 auto actions- correct? and is not related to the plan settings, correct?

Correct, it's just for the order of the 2 auto actions.


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.

2 months 2 weeks ago #337078 by webiedesign
Replied by webiedesign on topic wallet points for CB Subs automation - revisited

"I don't see the point of subtracting points though if they're just going to be completely wiped out on payment and maybe you should use a YES/NO flag system instead."

The idea was that if points aren't being accumulated and used like a wallet then just use a yes/no flag to determine access.
Sorry to be dense, but I just don't get it- can you explain this like I am a toddler please?

Mary
webie-design.com

Please Log in to join the conversation.

2 months 2 weeks ago #337090 by krileon
Basically instead of adding and subtracting points flip a switch. That switch could be a checkbox field. So you'd set its value to 1 if they're allowed to access the plan. If they're not you'd set it to 0. Then condition the plan based off that checkbox value.

From your previous topic you weren't really using an actual wallet. An actual wallet would add/subtract appropriately as if a fake currency, but you were resetting the wallet each time so it'd be easier to just do a yes/no flag.


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.

2 months 2 weeks ago #337109 by webiedesign
Replied by webiedesign on topic wallet points for CB Subs automation - revisited
I tried a number of things without success.

I want to recap the the scenario.
The user subscription is initially manually added by staff. I am thinking that because of this, I don't need any workflows or conditions on the plan itself - right?
Through the subscription period, staff manually keeps track of "points" in a field in each users profile.
When the plan expires, an "auto action" should renew the plan if there are 60 points and remove all the points in that field. If the field has less than 60 points, the plan should expire and remove all the points in that field.

If part of your response is: "Plan Expired
Global
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody"

Please include what "type" of auto action this should be.
 

Mary
webie-design.com

Please Log in to join the conversation.

2 months 2 weeks ago #337124 by krileon

The user subscription is initially manually added by staff. I am thinking that because of this, I don't need any workflows or conditions on the plan itself - right?

If staff is adding it then I wouldn't think you'd need any conditions then since I assume it's not a frontend accessible plan.

When the plan expires, an "auto action" should renew the plan if there are 60 points and remove all the points in that field. If the field has less than 60 points, the plan should expire and remove all the points in that field.

Ok, that would be entirely handled by CB Auto Actions then.

If part of your response is: "Plan Expired
Global
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody"

Please include what "type" of auto action this should be.

You'll basically need 2 auto actions to do this. First one renews their subscription using a CB Paid Subscriptions action and second one is a Field action that empties the field. Example of both auto actions as follows.

Renew Plan
Global
Triggers: onCPayUserStateChange
Type: CB Paid Subscriptions
User: Automatic
Access: Everybody
Conditions
Condition 1
Field: Custom > Value
Custom Value: [var3]
Operator: Equal To
Value: PLAN_ID_HERE
Condition 2
Field: Custom > Value
Custom Value: [var2]
Operator: Not Equal To
Value: A
Condition 3
Field: POINTS_FIELD_HERE
Operator: Greater Than or Equal To
Value: 60
Action
Mode: Renew
Plans: PLAN_ID_HERE

Empty Points
Global
Triggers: onCPayUserStateChange
Type: Field
User: Automatic
Access: Everybody
Conditions
Condition 1
Field: Custom > Value
Custom Value: [var3]
Operator: Equal To
Value: PLAN_ID_HERE
Condition 2
Field: Custom > Value
Custom Value: [var2]
Operator: Not Equal To
Value: A
Action
Field: POINTS_FIELD_HERE
Operator: Set
Value: 0

Replace PLAN_ID_HERE with the plan you want this to apply to. Replace POINTS_FIELD_HERE with your points 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.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.227 seconds

Facebook Twitter LinkedIn