Skip to Content Skip to Menu

Automatically Moving members from one group to another on expiration

  • AlexRag
  • AlexRag
  • OFFLINE
  • Posts: 501
  • Thanks: 33
  • Karma: 6
1 month 3 weeks ago #339232 by AlexRag
I can't recall where to set the configuration for what happens to users when the plan they are on expires.    I would like to move them to another usergroup that has limited access.     I thought I had set this up already but I am seeing several users on a site whose membership expired and were only moved to the standard "registered" group.

Could I be pointed to where this is done?  It's been awhile since I messed with this setting.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48512
  • Thanks: 8286
  • Karma: 1444
1 month 3 weeks ago - 1 month 3 weeks ago #339235 by krileon
Within your plan under Access tab you configure what usergroup the plan gives to the user. When they expire/unsubscribe that usergroup will be removed. If you want to remove that usergroup and replace it with a different one you'll need to use CB Auto Actions for that. The below should work.

Global
Triggers: onCPayUserStateChange
Type: Usergroup
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
Action 1
Mode: Remove Usergroups
Usergroups: REMOVE_USERGROUP_HERE
Action 2
Mode: Add Usergroups
Usergroups: ADD_USERGROUP_HERE

Replace PLAN_ID_HERE with your plans id. That auto action should then fire when their plan expires. If you know they'll only have those 2 usergroups you can just use the Replace Usergroups mode.


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.
Last edit: 1 month 3 weeks ago by krileon.

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

  • AlexRag
  • AlexRag
  • OFFLINE
  • Posts: 501
  • Thanks: 33
  • Karma: 6
1 month 3 weeks ago - 1 month 3 weeks ago #339238 by AlexRag
Thanks, Kyle.  I will have a closer look at this.

In the meantime, what's the best way to fix any that have already expired?    Should I just go into each user's profile and manually add them to the appropriate downgraded usergroup?     I think there are about 20 users in this situation I have to address.

Update:
1. Just so I understand the action better, what do the [var3] & [var2] represent?
2. If I have three plans and all three require all expired members to move to the same downgraded usergroup, do I need to add the condition of PLAN_ID to save from creating 3 Auto Actions? Or should I play around with the and/or feature?
3. Since on expiration the user is already moved out of the "Members" usergroup (set it to the Access Tab) do I need the Action step "Mode: Remove Usergroups"  and only include the "Mode: Add Usergroups"
Last edit: 1 month 3 weeks ago by AlexRag. Reason: Added more details

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48512
  • Thanks: 8286
  • Karma: 1444
1 month 3 weeks ago #339244 by krileon

In the meantime, what's the best way to fix any that have already expired? Should I just go into each user's profile and manually add them to the appropriate downgraded usergroup? I think there are about 20 users in this situation I have to address.

Within CB > User Management you can Filter by subscription status then use the Batch Tool feature to mass modify their usergroups.

1. Just so I understand the action better, what do the [var3] & [var2] represent?

Yes, you leave those as [var3] and [var2], which are as follows.

var3 = plan id for whatever they're purchasing
var2 = subscription status for that plans subscription

If I have three plans and all three require all expired members to move to the same downgraded usergroup, do I need to add the condition of PLAN_ID to save from creating 3 Auto Actions? Or should I play around with the and/or feature?

You've a couple options. You can create 3 auto actions or you can just adjust the condition as follows.

Field: Custom > Value
Custom Value: [var3]
Operator: Is In
Delimiter: ,
Value: COMMA_LIST_PLAN_IDS_HERE

Now replace COMMA_LIST_PLAN_IDS_HERE with a comma separated list of plan ids.

Since on expiration the user is already moved out of the "Members" usergroup (set it to the Access Tab) do I need the Action step "Mode: Remove Usergroups" and only include the "Mode: Add Usergroups"

Since they're already moved out no you don't need to remove that usergroup you would only need to add usergroup.


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.

  • AlexRag
  • AlexRag
  • OFFLINE
  • Posts: 501
  • Thanks: 33
  • Karma: 6
1 month 1 week ago #339342 by AlexRag
Thanks again.

Just one more inquiry.   

When members expired some of them did not get moved (downgraded) to the free subscription ( I created a free plan that provided limited access).   So in the User Management table, the subscription is blank.

1. How do I get them into the free plan manually (There are only 3 or 4 of them where this is applied)
2. How do make sure when members expire the subscription plans also change to the free version?   Would this require an Auto Action?

Thanks!

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48512
  • Thanks: 8286
  • Karma: 1444
1 month 1 week ago #339347 by krileon

1. How do I get them into the free plan manually (There are only 3 or 4 of them where this is applied)

You should be able to just edit them in CB > User Management and give them a subscription to your free plan.

2. How do make sure when members expire the subscription plans also change to the free version? Would this require an Auto Action?

If you want to move them to a different active subscription when they expire then yes you'd need CB Auto Actions for that. You can use the below to execute behavior on a plans subscription state change where you could use a CB Paid Subscriptions auto action to change their subscription.

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.


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