Which Function Assigns Referrals for Tiers?


I’m writing a customization for my site that gives referral commission to the creator of an event. I have the portion working where I apply the correct rate to the the event owner from Events Manager. This is triggered when a booking is approved from Events Manager.

I’d like to expand this to credit the downline as well. In order to do so I need to know which specific function/functions are used for this process by default in Affiliates Enterprise.


3 Responses to Which Function Assigns Referrals for Tiers?

  1. George August 12, 2018 at 7:20 pm #

    You are welcome Antony.

    Yes I get your point, that’s why I proposed Affiliates Events Manager integration. Perhaps my reply wasn’t so precise, let me explain further.
    If you modify the method Affiliates_Events_Manager::em_bookings_added( $em_booking, $affiliate_ids ) and use the Event creator instead of the cookie obtained affiliate, you will get the desired result.
    To avoid creating a new integration that will be 99% the same as our integration, why not try the following:

    In the aforementioned method set the $affiliate_id to the id of an Event creator.

    Then, add a new booking for that event using another affiliate’s link as the referrer.

    Approve the booking and check the results.

    Although this not a good practice for updates etc, I would recommend to try it since I can’t give an exact ETA on when this could be added as a feature in the official Affiliates Events Manager integration we provide.

    Regarding tiered commissions. A tiered commission applies when an affiliate refers a new booking( in your case ) and this affiliate has been referred by another affiliate.
    For example, John is an affiliate on your site and the creator of Awesome Event.
    John has also referred another affiliate, Paul.

    With the plugin’s normal flow whenever John refers a new customer and the customer makes a booking for Awesome Event, John will get a referral and commission.
    Whenever Paul refers a new customer and the customer makes a booking for Awesome Event, Paul will get a referral and commission. The same time John will get a tiered commission as Paul’s referrer.

    With your idea, whenever any affiliate refers a new booking for Awesome Event, you want John to get the referral as the creator, so far so good. If though John gets the referral, then the affiliate(s) who referred John will get a tiered commission. The tiered commission is a reward for the affiliate’s referrer(s). If the affiliates that John referred, get a commission, then this is the opposite of a tiered commission. Despite the difference though this can be fulfilled by adding referrals programmatically to each one of the affiliates that John has referred. You can add a referral by following this example in the documentation.

    Kind regards,

  2. tford06 August 12, 2018 at 12:37 pm #

    Thanks for the quick reply.

    I am using the events manager integration.

    Let me clarify, I want the commission to go to the actual “event host” and the tiered commission to anyone who also became an event host under that person. I am worked on a site that is built around in person events.

    It was my understanding that Affiliates Enterprise records based off of referral link. I didn’t want this because if someone clicked a referral link of an “event host” not in the original event creators line, the commission wouldn’t get applied correctly even if a person went to their event. If someone registered for an event without ever clicking a referral link (direct traffic), the host would not get commissions. Basically, in my situation I always want the actual person hosting the event to be the original referrer, but Affiliates always uses either the last referral link clicked (cookie based) or a direct referral (no commission to real affiliate or tiers).

    Is my understanding there correct?

    To get around this I set everything up to record as a direct referral by default. Then upon approving the booking in Events Manager the customization I’ve been working on kicks in. Once the booking is approved, the referral is then re-assigned to the person who created/hosts the event.

    What I am hoping to do is also call the function(s) associated with creating the tier commissions based off of the affiliate ID during this same process.

  3. George August 12, 2018 at 9:23 am #

    Hi Antony,

    Actually you don’t need to implement that. Your integration needs basically to record the referral when a new booking is approved. The rest of it, like the tiers will be handled automatically by Affiliates Enterprise when applicable.

    FYI, if you haven’t checked it already, then please have a look at Affiliates Events Manager integration.

    Kind regards,

We use cookies to optimize your experience on our site and assume you're OK with that if you stay.
OK, hide this message.

Affiliates · Contact · Jobs · Terms & Conditions · Privacy Policy · Documentation · Downloads · Useful Plugins · My Account