Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Hybrid View

  1. #1
    Join Date
    Jan 2004
    Posts
    482
    Plugin Contributions
    0

    Default Coupons & Dormant Customers

    We sent out a "we miss you" coupon to the dormant customers > 3 months. It seems that active customers ... who just purchase last week... received the coupon also.

    How can we trouble shoot this?

  2. #2
    Join Date
    Jun 2003
    Posts
    33,720
    Plugin Contributions
    0

    Default Re: Coupons & Dormant Customers

    How did you separate the groups?

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Coupons & Dormant Customers

    The physical query on this is in the query_builder table ... if this is of help to you ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  4. #4
    Join Date
    Jan 2004
    Posts
    482
    Plugin Contributions
    0

    Default Re: Coupons & Dormant Customers

    Thank you :) Interesting thing to note....

    ***Note: I have not changed the query in the database :) ...The following info is from using the query seperately in mysql ***

    With the date clause taken out of this query, we have 4,168 customers that are subscribed to our newsletter and have a matching customer id on the customers table and orders table.

    Adding the Date back and only changing the greater than/less than yields the following results....

    Using the query with the Dormant Customers
    o.date_purchased < subdate... gives a figure of 3,296

    Change the date clause to o.date_purchased > subdate gives a figure of 1,868.

    If you add those two together you get a total of 5164 not 4168.
    That is a difference of 996 customers that seem to be doubled up.


    Thoughts? This could account for the reason active customers got the coupon for dormant customers.



    Quote Originally Posted by Ajeh
    The physical query on this is in the query_builder table ... if this is of help to you ...

  5. #5
    Join Date
    Jan 2004
    Posts
    482
    Plugin Contributions
    0

    Default Re: Coupons & Dormant Customers

    Hi Kim, We used the send coupon mod on the store... you have the drop down option to choose Active ... All subscribers... Dormant > 3months... We chose dormant.

    Quote Originally Posted by Kim
    How did you separate the groups?

  6. #6
    Join Date
    Jan 2004
    Posts
    482
    Plugin Contributions
    0

    Default Re: Coupons & Dormant Customers

    I have looked at the query until I am now blue in the face.

    It just doesn't seem plausible that a customer can be both active and dormant, yet in this query, there are customers considered dormant who are active and just purchased last week.

  7. #7
    Join Date
    Jan 2004
    Posts
    482
    Plugin Contributions
    0

    Default Re: Coupons & Dormant Customers

    This is now to a point of frustration. We have a standard we miss you coupon. Due to the fact that this query doesn't work right, we now have mad customers, because, they got the coupon and cannot use it because it is a one time use per customer coupon.

    We have answered many emails giving the customers a new code, but it looks embarassing.

    They say...why do you say " we miss you" when we bought last week?!

    Coupon was sent via the send email > DORMANT CUSTOMERS in the admin. The last time it was sent (WHICH WAS OVER 3 MONTHS AGO - TO PREVENT THIS VERY PROBLEM), the same thing happened...current customers got the coupon, too...but we honored it.

    If you have no suggestions for why this query sends to our current/active customers, also.... we simply cannot trust that portion of the admin.

    Please advise.

  8. #8
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Coupons & Dormant Customers

    I too see similar numeric discrepancies when running the query with < and >.
    However, when I view the raw data returned by each, the dates are "correct".

    I suspect the issue is related to the fact that the orders table is a one-to-many relationship with the customers table, and thus what's happening is that customers who have ordered more than once are showing up in both sides of the query.

    Need to work up an outer join... hmm.....
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  9. #9
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Coupons & Dormant Customers

    Try this via phpMyAdmin:

    Code:
    REPLACE INTO query_builder ( query_id , query_category , query_name , query_description , query_string ) 
    VALUES ( '3', 'email,newsletters', 'Dormant Customers (>3months) (Subscribers)', 'Subscribers who HAVE purchased something, but have NOT purchased for at least three months.', 
    'select o.date_purchased, c.customers_email_address, c.customers_lastname, c.customers_firstname from TABLE_CUSTOMERS c, TABLE_ORDERS o 
    WHERE c.customers_id = o.customers_id 
    AND c.customers_newsletter = 1 
    GROUP BY c.customers_email_address 
    HAVING max(o.date_purchased) <= subdate(now(),INTERVAL 3 MONTH) 
    ORDER BY c.customers_lastname, c.customers_firstname ASC');
    This now also excludes customers who have purchased within the last 3 months...removing the overlap.

    Once you've updated your database with the updated query, you should be able to re-run your report/mailing etc and get the right data.
    Last edited by DrByte; 11 Jul 2006 at 06:28 PM.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  10. #10
    Join Date
    Jan 2004
    Posts
    482
    Plugin Contributions
    0

    Default Re: Coupons & Dormant Customers

    Dr. Byte, You simply Rock!! I had tried to use the max option in the select area of the query and it wasn't working.

    Thank you so much for your time and expertise!!! You are GREATLY appreciated. :)

    The numbers add up!! If I take out the date statement, I get the total of what is returned with the date statement in and just changing the data from dormant to active customers (switching the greater than less than sign). :)

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 Twitch TURN OFF SaleMaker & Specials & Discount Coupons for Wholesale Customers
    By twitchtoo in forum Setting Up Categories, Products, Attributes
    Replies: 5
    Last Post: 26 Dec 2013, 08:52 AM
  2. Send E-mail to dormant customers
    By donscotti in forum Managing Customers and Orders
    Replies: 1
    Last Post: 13 Jun 2012, 06:55 AM
  3. Importing Customers & Coupons Only
    By integrity_designs in forum General Questions
    Replies: 2
    Last Post: 15 Feb 2011, 10:28 AM
  4. coupons are attached to customers?
    By jami1955 in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 1
    Last Post: 1 Oct 2010, 03:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg