Normal Topic Searching for Dormant Customers... (Read 906 times)
miss_doo
Member
*
Offline


half of the people you
know are below average

Posts: 18
Location: chicago, il
Joined: Dec 21st, 2004
Searching for Dormant Customers...
Jun 20th, 2007 at 7:33pm
Print Post Print Post  
I tried searching the forums a bit for something that might answer my questions, but I was unsuccessful (so I apologize if this is glaringly obvious on here somewhere).

I'm trying to generate a search that would show me any customers who have not placed an order in x amount of time (most likely 6 months).  I have an orders database and a customer database.  All the customers have unique customer numbers.  I can't quite wrap my brain around where to start...

I appreciate any help or starters anyone can offer.

Thanks in advance!
  

~ miss doo&&&&a burning dog needs no chimney, and time heals all non-fatal wounds
Back to top
 
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Searching for Dormant Customers...
Reply #1 - Jun 20th, 2007 at 7:50pm
Print Post Print Post  
You could add a field to Customers that holds the last date an order was placed.  Tha field can be updated automatically with XPOST command from new orders.  Then you can retrieve all Customer records where LastOrderDate is over 6 months.

You could do this now with existing data:
Add the Read Only element LastOrderDate to Customers, bound to a date field.
Add programming to Orders to do the XPOST for all new orders from this point on.
Retrieve all Orders, Sort by Dates in Ascending order.
Do a Mass Update from these Orders records.
Mass Update to do XPOST from Orders to Customers, posting the order date to that LastOrderDate.

That will update all the Customer records, in date order, so the most recent order date will be the value.
Now you can retrieve all those customers with no orders in last 6 months.

Can also use a similar technique to keep a running total of YTD Sales by posting the Order total to a similar YTDSales, ReadOnly, currency element in Customers.

===================
You could also do some programming to calculate Orders Totals within a date range on demand with a button, or something that updates every time you open a Cusotmer records, but this eliminates the programming, and should be faster since no calculations need to be processed.  Info is real time, available to seach with any date ranges.....
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
miss_doo
Member
*
Offline


half of the people you
know are below average

Posts: 18
Location: chicago, il
Joined: Dec 21st, 2004
Re: Searching for Dormant Customers...
Reply #2 - Jun 20th, 2007 at 7:57pm
Print Post Print Post  
Thanks for the speedy response!  Quick like a bunny!

  

~ miss doo&&&&a burning dog needs no chimney, and time heals all non-fatal wounds
Back to top
 
IP Logged
 
miss_doo
Member
*
Offline


half of the people you
know are below average

Posts: 18
Location: chicago, il
Joined: Dec 21st, 2004
Re: Searching for Dormant Customers...
Reply #3 - Jun 21st, 2007 at 3:53pm
Print Post Print Post  
Bob,

Thanks again for your quick reply.  I've been able to add the XPOST command for all new orders, but I'm confused about the Mass Update to XPOST.  I've done the search and the sort, so I have all orders shown with ascending order dates.  Am I to simply insert my XPOST command into the order date section of the Mass Update Program Editor Box?  Sorry, I'm a nervous nelly and not totally sure on this step, though it is exactly what I need to do.

I appreciate your help on this!



  

~ miss doo&&&&a burning dog needs no chimney, and time heals all non-fatal wounds
Back to top
 
IP Logged
 
miss_doo
Member
*
Offline


half of the people you
know are below average

Posts: 18
Location: chicago, il
Joined: Dec 21st, 2004
Re: Searching for Dormant Customers...
Reply #4 - Jun 21st, 2007 at 4:12pm
Print Post Print Post  
Nevermind.  I backed up my database, found my cohones and did it.  Success!

Thanks again for your help!
  

~ miss doo&&&&a burning dog needs no chimney, and time heals all non-fatal wounds
Back to top
 
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Searching for Dormant Customers...
Reply #5 - Jun 21st, 2007 at 8:55pm
Print Post Print Post  
Congratulations, well done miss_doo

Hope it did what you wanted.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged