Invite Tracking for Subscription

8 years 11 months ago #263914 by playerocity
Invite Tracking for Subscription was created by playerocity
Hello,

Our objective is to enable users to invite other users into our free system, and then if those invited users subscribe to our basic plan we will give $25 to the referring user. We have setup CB Invites so the part about sending the invite and tracking if the invite has been accepted is completely done. However, we need to take it one step further and show if that invited user subscribed to any services.

I have seen various ideas in these forums, but can't quite figure out the best way to do this. Really, the CB Invites where it shows the status ift he invited user has joined is perfect, if it would add one more row that showed if that invited user subscribed as well. As well as notifying our administrator that a referred user subscribed.

Any thoughts on how to accomplish this?

Thanks
James

Please Log in to join the conversation.

8 years 11 months ago #264190 by playerocity
Replied by playerocity on topic Invite Tracking for Subscription
Any thoughts on how maybe to accomplish this or something similar?

Thanks
James

Please Log in to join the conversation.

8 years 11 months ago #264676 by krileon
Replied by krileon on topic Invite Tracking for Subscription
CB Invites allows users to invite others to join the site. It keeps track of the invite and when it was accepted in its database table. That information could be used to generate coupon codes or something of the sort, but you'll need a Professional subscription as you'll need CB Invites and probably CB Auto Actions to generate coupons.


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 to join the conversation.

8 years 11 months ago #264859 by playerocity
Replied by playerocity on topic Invite Tracking for Subscription
Hi,

Thanks for the response. I do have Auto Actions, but there is no trigger for anything with CB Invites. I would like to setup a few things like the redirect after a user invites another. I also would like to setup the coupon creation like you mentioned.

but back to the actual topic, what I am looking for is notify the person who has made the invite if the person they have invited has subscribed (paid) to a service. That is when that user who made the invite will get their $25.

Any ideas?

Thanks
James

Please Log in to join the conversation.

8 years 10 months ago - 8 years 10 months ago #266434 by krileon
Replied by krileon on topic Invite Tracking for Subscription

Thanks for the response. I do have Auto Actions, but there is no trigger for anything with CB Invites. I would like to setup a few things like the redirect after a user invites another. I also would like to setup the coupon creation like you mentioned.

Your CB Auto Actions release is likely out of date then. The triggers you'd need are as follows.

Invite Create: invites_onAfterCreateInvite
$_PLUGINS->trigger( 'invites_onAfterCreateInvite', array( $this ) );
Invite Accept: invites_onAfterAcceptInvite
$_PLUGINS->trigger( 'invites_onAfterAcceptInvite', array( $this, $user ) );

I've included the actual trigger above so you can see the variables the trigger contains. The user variable in the accept trigger is the user object of the user accepting the invite. The user id of the user that sent the invite is in the first variable as [var1_user_id].

but back to the actual topic, what I am looking for is notify the person who has made the invite if the person they have invited has subscribed (paid) to a service. That is when that user who made the invite will get their $25.

Yes, that's possible. Using CB Auto Actions and its Query action to act on the invite accept trigger you'd insert a coupon into the database for that user to use. You'd then send them an email with a second action acting on the same criteria as the first except it's an Email action.

The below tutorial shows how to generate coupons using a database query. It does so using CBSubs SQL Actions, but it should be a good starting point.

www.joomlapolis.com/support/tutorials/107-use-cases/18407-purchasing-discount-coupons


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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.175 seconds

Facebook Twitter LinkedIn