I'd like to have subscribers to a CBSubs plan be invited to join a GJ group. The invitation needs to be conditional on a field value that they complete at registration, for example gender.
I see GJ integration in CBSubs and I'm already using that to join all new members to one group. I can add a second group there, but I don't see a way to make it conditional on a field value.
I've also looked at CB auto-actions. I see how to make an action conditional on a profile field value, but I don't see an action to add / invite to join a GJ group.
Perhaps I could use CBSubs SQL actions to do it, but that makes me nervous!
Is there a standard solution to this problem please?
You can have users conditionally auto join groups using CB Auto Actions. The below should work fine for this.
Global
Triggers: onAfterUserRegistration
Type: CB GroupJive
User: Automatic
Access: Everybody Conditions
Supply whatever conditions you like here! Action
Mode: Join Groups
Groups: SUPPLY_GROUPS_HERE
Status: Member
That's all you should need to do. Now when a user registers that matches your conditions they'll be placed in the supplied groups. If you need this to act on a CBSubs plan subscription status change then you can use the following.
Global
Triggers: onCPayUserStateChange 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
Replace PLAN_ID_HERE with the ID of the plan you want this to condition off of and any additional conditions you like.
As a general FYI you can use the below in CB Auto Actions to run ANY custom behavior you like on subscription status changes. These are the same triggers and behavior the CBSubs integrations are using. This provides effectively unlimited potential for subscription driven logic.
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
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.