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 State Change works only in Back Office

  • l3g0s
  • l3g0s
  • OFFLINE
  • Posts: 27
  • Thanks: 1
  • Karma: 0
9 years 3 months ago #267811 by l3g0s
Hello,

I have a problem with CB Auto Actions. The trigger "User State Change" only work when I change my subscription plan in the back office (CB Edit user).
If I change from the front office, the trigger isn't fired.
I tried this with lots of different actions.


Currently
State : Published
Action : Email
User : auto
Acces : EveryBody
Condition : empty

I have all lastest versions.

If I use "Internal Action URL", it work.



(Sorry for my English...)
Thank you in advance,

Cyril.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48474
  • Thanks: 8281
  • Karma: 1443
9 years 3 months ago #267854 by krileon
Use the below to fire actions on CBSubs subscription state changes.

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

Plan Expired
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody
Conditional 1: [var3] Equal To PLAN_ID_HERE
Conditional 2: [var2] Equal To X

Not sure why you need an Email action usage though as CBSubs comes with CBSubs Email for sending customized emails on subscription state change in addition to the Presentation tab emails for each plan.


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.

  • l3g0s
  • l3g0s
  • OFFLINE
  • Posts: 27
  • Thanks: 1
  • Karma: 0
9 years 3 months ago - 9 years 3 months ago #267893 by l3g0s
Thank you for your answer.

I have already seen this proposal on forums but I could not make it work. I tried with the action "email" to test the event.
I removed the conditions to ensure that this was not the reason for the problem.
My goal is to assign AUP. My code is functional. It's the trigger that I can't get from the FO.
It work only when I change my subscription plan in the BO.
I tried from this Url : xxxx/component/comprofiler/pluginclass?plugin=cbpaidsubscriptions&do=displayplans (not from tab in profile)
The result is the same with or without payment gateway.

Should I set up something else ?

Does this trigger should also work with merchandise?


Cyril.
Attachments:
Last edit: 9 years 3 months ago by l3g0s.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48474
  • Thanks: 8281
  • Karma: 1443
9 years 3 months ago #267928 by krileon
That trigger fires when a subscription state changes. Merchandise plans don't have a subscription state so no that probably won't work. You can try the below to see if it'll work with merchandise plans.

Trigger: onCPayAfterPaymentStatusUpdateEvent
Condition: [var4] Is REGEXP /Completed|Processed/

You probably don't need CB Auto Actions for what you're trying to do though. If you add AUP points using a database query you can use CBSubs SQL Actions instead, which is designed to specifically work with CBSubs plan purchases.


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