Affiliates Permanent with existing customer

Here is my test:

1. The Affiliates Permanent is configured with “Assign new customers to the referring affiliate” and “Assign users to the referring affiliate upon first referral”. See here.

2. Two affiliates signed up: “Aff1 Tester” has a coupon rgs2-b719a, which has a fixed $20 discount. “aff-2 Tester” has a coupon rgs3-efcfb, which has 5% discount of cart. See affiliates and coupons.

3. An existing customer Li Li purchased 2 orders: #4769 with coupon rgs2-b719a and she got $20 off $80 total. Then #4771 with coupon rgs3-efcfb and she got 5% ($4) off $80 total. See the top 2 on-hold orders in Orders tab in WooCommerce and she had 3 other previous completed orders.

I expect the behavior like the document describes: Purchases made by existing customers who are not assigned to an affiliate will not credit any affiliate, even if the customer has visited an affiliate link after her or his initial purchase.

However, both affiliates were credited incorrectly. The last 2 orders in the Referrals tab showed they both were credited, although the purchase were by an existing customer. You can also see the 2 pending commissions in the “Manage Affiliates” page.

Can you please advise where I configured wrong? How should I fix it?

Thanks,
Kooyaya

7 Responses to Affiliates Permanent with existing customer

  1. huaqing bao July 31, 2020 at 3:32 am #

    Hi George,

    Yes, you did point out in your very first reply. I somehow misunderstood the first referral and thought it meant the first time an user placing an order, as it is in our use case. Now, it is clear. That case is covered in the 3rd option.

    Thanks again, George! I really appreciate all the help you provided! It is not possible for us to setup our affiliate program without this great plugin and your kind support!

    Best regards,
    Huaqing

  2. George July 30, 2020 at 12:22 pm #

    Hey Huaqing,

    That’s great, it’s something I mentioned on my comment but probably missed your attention.
    Regarding coupons, you should have a look at WooCommerce API, coupons are managed by WooCommmerce and therefore this is the best place to check.

    Cheers,
    George

  3. huaqing bao July 29, 2020 at 5:35 am #

    Hi George,

    I see where I made mistake. I checked “Assign users to the referring affiliate upon first referral.” It started working as expected after I unchecked it.

    Thank you again for your help!

    Best regards,
    Huaqing

  4. huaqing bao July 29, 2020 at 5:08 am #

    Hi George,

    Thank you for your explanation! I added a filter on “woocommerce_coupon_is_valid” today and it stops existing customers using the affiliate coupon.

    I know I can configure the generated coupon manually, but I prefer to do it programmatically if possible. Any hook I can use during the coupon creation so that I can override the attributes of the coupon being created?

    After I stopped existing customers using the coupon, I found the existing customers clicking through affiliate link are still assigned to the affiliate. Something does not work as expected. I may have to look into the code. Any pointers would be helpful.

    Thanks,
    Huaqing

  5. George July 28, 2020 at 9:31 pm #

    Hey Huaqing,

    In general coupon management is done through WooCommerce > Coupons, after all it’s a WC feature. If the restriction/feature is not available in that place then you need to use a third-party addon.
    In order to restrict a coupon from specific users, you can use an addon like Groups Coupons. This addon works with Groups and allows you to organise your users into groups and use these groups as restrictions for your coupons. Both plugins are maintained by itthinx.com.

    Regarding minimum cart total there is a core WC option for that purpose. Please go to WooCommerce > Coupons, edit a coupon, go to Usage restriction and set the min amount.

    Kind regards,
    George

  6. huaqing bao July 28, 2020 at 4:03 am #

    Hi George,

    Interestingly, that user is not assigned to any affiliate permanently. I also double checked the usermeta table for the metakey permanent_referrer_affiliate_id as you suggested in another post. The meta value is empty for that user.

    My goal is to set it up this way:
    1. Each affiliate has a coupon, which can be used by any new customer.
    2. The coupon gives the new customer $20 fix discount on a minimum spending of $50. I raised another support question on Coupon forum on how to configure the minimum cart total.
    3. The new customer is assigned to the affiliate. All the orders from this customer in the first year will credit the associated affiliate.
    4. After a year, the customer is unassigned from the affiliate. You helped me on this in another post.
    5. Existing customers should not be assigned to any affiliate.

    It looks like the issue was caused by the coupons. What’s the best way to prevent existing customers using the generated coupon? Also, what’s the recommended way to set the minimum cart total to $50. Any filters/hooks you would suggest?

    It’s a WooCommerce site with Affiliates Enterprise, Permanent and Coupon activated.

    Thanks in advance!

    Best regards,
    Huaqing

  7. George July 27, 2020 at 4:40 pm #

    Hi Huaqing,

    Thanks for describing your case and providing the details on your setup alongside with screenshots of your settings.

    FYI, since the option to Assign users to the referring affiliate upon first referral is enabled the referral will be recorded because Affiliates Permanent will try to assign a permanent affiliate to the user. If you edit the customer, is she assigned to an affiliate at the moment?

    Also, in general what is your main goal at the moment regarding Affiliates Permanent?

    Kind regards,
    George

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

Share