Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

CB Auto Actions - User Case: update fields based on expired CBSubs subscription

  • D1on
  • D1on
  • OFFLINE
  • Posts: 68
  • Thanks: 3
  • Karma: 0
8 years 2 months ago #284773 by D1on
Hi,

Can you please let me know how to configure CB Auto Actions to updated CB Fields for the following User Case base on a CBSubs Subscription that has expired, e.g.

CBSubs Subscription Plan: "Voting Membership"
CBSubs Subscription Plan Status: "Expired"
CB Field: "cb_member_status" = "Inactive"
CB Field: "cb_financial" = "False"

Is this possible to manually trigger the update of CB Fields based on expired CBSubs Subscriptions?

I have also configured the CBSubs/Integration/CB Fields to have these fields update (as attached) on plan activation and deactivation, but just need to also manually trigger the updating of these fields for this user case.

Thanks,

Dion.
Attachments:

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48457
  • Thanks: 8280
  • Karma: 1443
8 years 2 months ago #284779 by krileon
You don't need CB Auto Actions for that. You can use CBSubs Fields to change field values based off plan state. If you still want to do this with CB Auto Actions then the below usage can be used with a Field action or whatever action you like.

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

Plan Expired
Global
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody
Conditions
1: [var3] Equal To PLAN_ID_HERE
2: [var2] Not Equal To 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.

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

  • D1on
  • D1on
  • OFFLINE
  • Posts: 68
  • Thanks: 3
  • Karma: 0
8 years 2 months ago #284787 by D1on
Hi Kyle,

Where are the "CBSubs Fields" located to change field values based off plan state? I have set the CB Fields in the Integration Tab of CBSubs as attached, but it looks like there is no way to manually trigger these CB Fields changes that we require for each CBSubs Plan.

I have also tried the Auto Actions (using the latest version of CB Auto Actions), but it's not working and giving me the following error:

string(69) ":: Action 40 :: Conditional 1 failed for 0: [var3] Equal To PLAN_ID_4"

I have tried adding "4" and "PLAN_ID_4" for the CBSubs Plan in the condition for [var3] and they both results in the above error message, it looks like it can't find the CBSubs Plan ID 4...

Global
Triggers: None (so I can trigger this manually).
Type: Field
User: Automatic
Access: Everybody
Conditions
1: [var3] Equal To PLAN_ID_4
2: [var2] Equal To A

Can you please let me know to resolve this Auto Actions issue and how to use the CBSubs Fields to manually trigger the CB Fields changes that we require for each CBSubs Plan?

Thank you,

Dion.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48457
  • Thanks: 8280
  • Karma: 1443
8 years 2 months ago #284798 by krileon

Where are the "CBSubs Fields" located to change field values based off plan state? I have set the CB Fields in the Integration Tab of CBSubs as attached, but it looks like there is no way to manually trigger these CB Fields changes that we require for each CBSubs Plan.

You're not supposed to manually trigger them. You're supposed to let it happen automatically when subscribing or expiring/cancelling which both of the solutions provided will do.

To trigger it manually you need to use an Internal Users action (select Internal > Users trigger) and have it loop every single user on your site (slow and probably going to crash your site if you've a lot of users). Once the trigger is configured you need to use an condition like the below to condition based off subscription status after you've enabled content plugins under the parameters tab of your action.

[cbsubs:if plan="#" status="A"]ACTIVE[/cbsubs:if] Equal To ACTIVE

Be sure to change # to the plan id of the plan you want to condition against.


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