Skip to Content Skip to Menu

CB Invites and CBSubs usecase question

  • liaskas
  • liaskas
  • OFFLINE
  • Posts: 382
  • Thanks: 36
  • Karma: 2
  • Add-ons
4 years 10 months ago #315809 by liaskas
Hello,

we are trying to find a way to reward invite SENDERS, when...

the invite RECIPIENT accepts the invitation, registers and buys a subscription plan. If no subscription is bought by the RECIPIENT of the invitation, the SENDER is not rewarded.

Can you please advise what auto action types are required (we suppose more than one is needed) and what the settings are for each auto action?

Thank you in advance

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48437
  • Thanks: 8275
  • Karma: 1443
4 years 10 months ago #315823 by krileon
Replied by krileon on topic CB Invites and CBSubs usecase question
CB Invites isn't built to be an affiliate tracker so it doesn't integrate with CBSubs. There are triggers for when an invite is accepted. Specifically invites_onAfterAcceptInvite, but that would fire before CBSubs; so this could work, but it won't be contingent on them making a purchase. You can use the below to act on CBSubs plan state changes.

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

Replace PLAN_ID_HERE with the ID of the plan you want this to act on.

Probably the easiest way to go about this is to act on the above with an SQL action and query the _comprofiler_plugin_invites table to see if they recently accepted an invite and if they did update _comprofiler of the user who sent the invite by incrementing a field for that user then use CBSubs Promotions to offer a discount based off the value of that field. This assumes you'd want to award them with a discount on their next purchase.


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