Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 11 of 11

Thread: How to differentiate Phone Orders?

  1. #1
    JasonCorns is offline Junior Member
    Join Date
    Jan 2009
    Posts
    13

    Default How to differentiate Phone Orders?

    I'm combing through the reports and the data tables and I am developing this sinking feeling that there is no way to differentiate between a customer-placed online order and a phoned-in order.

    Is there a way to tell if a catalog operator placed an order for a customer?

  2. #2
    nihon is offline Senior Member
    Join Date
    May 2008
    Posts
    150

    Default

    This is a nice idea..
    Version (Code/DB):
    AspDotNetStorefront ML 8.1.2.0/8.1.2.0

  3. #3
    Rob is offline Senior Member
    Join Date
    Aug 2004
    Posts
    3,037

    Default

    Not at this time, but you could make probably a 1-2 line mod to put order notes on it, (or a new db field) if it was a phone order. Very Very simple to do, but not commonly requested, so you'd have to do it custom for now.
    AspDotNetStorefront
    Shopping Cart

  4. #4
    skebrown is offline Junior Member
    Join Date
    May 2009
    Posts
    11

    Default

    Anyone care to elaborate on how to append "ph" to all order numbers made by the phone order entry? Seems like it could be a trigger or something on the phoneorder.aspx.cs page or other page further down the line.. When does the order number get spawned and on what page?

    Regards,
    Sean

  5. #5
    mgibbs is offline Senior Member
    Join Date
    Jan 2005
    Location
    Orange County, CA
    Posts
    194

    Default

    We normally identify them (in reports and what not) as being the orders where the LastIPAddress shown is the public IP address of our office. All outbound connections coming from inside our firewall are represented by this IP address so they are easy to separate from the others.

    No change to code is necessary this way. Of course this would be much more difficult if the office didn't have a static IP address or if our customer service reps were spread all around the country.
    EMM for AspDotNetStorefront - Communicate effectively with your customers

  6. #6
    StorageSolutions is offline Member
    Join Date
    Jun 2007
    Location
    Vero Beach, Florida
    Posts
    66

    Default

    We use the MaxMind service and it scores the sale as a -1.00 for all phone orders and that's how we detect the phone-in order. This has been very reliable for us and very easy to catch when processing the orders.
    ML 8.0.1.2

  7. #7
    Rob is offline Senior Member
    Join Date
    Aug 2004
    Posts
    3,037

    Default

    k, but would be cool if MaxMind did geolocational fraud detections for phone orders also I'll send this along to them.
    AspDotNetStorefront
    Shopping Cart

  8. #8
    DanV's Avatar
    DanV is offline Ursus arctos horribilis
    Join Date
    Apr 2006
    Posts
    1,568

    Default

    The challenge in doing lookups on phone orders is you generally do not have the customer's IP address, so you end up with a very high fraud score in many cases that is erroneous (since the IP of the customer is actually your office's IP address).

  9. #9
    ksuvalk is offline Junior Member
    Join Date
    May 2009
    Posts
    23

    Default

    We actually extended the code so that if customer service is doing a phone order entry, we show additional prompts on the shopping cart where the customer service person is reqd to enter order type info (direct mail, phone order, etc.) then we carry this through so we can do reporting by order type.

  10. #10
    Sharona's Avatar
    Sharona is offline Member
    Join Date
    Jun 2006
    Posts
    41

    Default

    We extended code to record the phone order person's customerid into a new db field (customerserviceperson). Then reports are run by comparing the order's customerID and "customerserviceperson" That way we can also track how many order's that person is placing. Placing the code in Checkoutreview.aspx.cs -processcheckout()


    //check for impersonation
    POCustomer = ((AspDotNetStorefrontPrincipal)Context.User).ThisC ustomer;
    if (ThisCustomer.ThisCustomerSession["CustomerID"].ToString() != POCustomer.CustomerID.ToString())
    {
    DB.ExecuteSQL("update orders set CustomerServicePerson = " + POCustomer.CustomerID + " where ordernumber='" + OrderNumber.ToString() + "'");

  11. #11
    usascholar is offline Member
    Join Date
    Jan 2010
    Posts
    64

    Post

    This code works with Multistore version 9.3.1.0

    After creating the column in the database and adding the code to your OrderConfirmation code behind page, new orders will contain the customerid of the Admin that took the phone order, per Sharona's code as well as add a note to the order.

    Please write reports to pull orders using the customerserviceperson column, as the note is a text field and is more difficult to use for reports such as Crystal Reports.

    I am not responsible for what you do with the code below, so make a backup of your database and code pages prior to attempting to use it. Good Luck.

    ================================================== ===

    First create customerserviceperson column in orders table using T-SQL:
    Code:
    ALTER TABLE Orders
    ADD customerserviceperson INT NOT NULL DEFAULT 0

    In OrderConfirmation.aspx.vb (or OrderConfirmation.aspx.cs) look for this line:
    Code:
    DB.ExecuteSQL("update Customer set OrderOptions=NULL, OrderNotes=NULL, FinalizationData=NULL where CustomerID=" & CustomerID.ToString())
    Right after the line above add the following code in VB.net:
    Code:
                            Dim notes As New StringBuilder()
                            If MyBase.IsInImpersonation AndAlso MyBase.EditingOrderImpersonation = 0 Then
                                'new order with impersonation
                                notes.AppendFormat("|Phone Order Added By ({0} - {1}) on {2} {3}", MyBase.AdminImpersonatingCustomer.CustomerID, MyBase.AdminImpersonatingCustomer.FullName(), DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString())
                                DB.ExecuteSQL(String.Format("update orders set CustomerServicePerson = {0} where ordernumber = {1}", DB.SQuote(MyBase.AdminImpersonatingCustomer.CustomerID.ToString()), ord.OrderNumber))
                            End If
                            If MyBase.IsInImpersonation AndAlso MyBase.EditingOrderImpersonation > 0 Then
                                'edit order with impersonation
                                notes.AppendFormat("|Phone Order Edited By ({0} - {1}) on {2} {3}", MyBase.AdminImpersonatingCustomer.CustomerID, MyBase.AdminImpersonatingCustomer.FullName(), DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString())
                            End If
                            DB.ExecuteSQL(String.Format("update orders set notes = cast(notes as nvarchar(max)) + {0} where ordernumber = {1}", DB.SQuote(notes.ToString()), ord.OrderNumber))
    or of you have C# this will do it:
    Code:
                            StringBuilder notes = new StringBuilder();
                            if (base.IsInImpersonation && base.EditingOrderImpersonation == 0)
                            {
                                //new order with impersonation
                                notes.AppendFormat("|Phone Order Added By ({0} - {1}) on {2} {3}",
                                    base.AdminImpersonatingCustomer.CustomerID,
                                    base.AdminImpersonatingCustomer.FullName(),
                                    DateTime.Now.ToShortDateString(),
                                    DateTime.Now.ToShortTimeString());
                                DB.ExecuteSQL(string.Format("update orders set CustomerServicePerson = {0} where ordernumber = {1}", DB.SQuote(base.AdminImpersonatingCustomer.CustomerID.ToString()), ord.OrderNumber));
                            }
                            if (base.IsInImpersonation && base.EditingOrderImpersonation > 0)
                            {
                                //edit order with impersonation
                                notes.AppendFormat("|Phone Order Edited By ({0} - {1}) on {2} {3}",
                                    base.AdminImpersonatingCustomer.CustomerID,
                                    base.AdminImpersonatingCustomer.FullName(),
                                    DateTime.Now.ToShortDateString(),
                                    DateTime.Now.ToShortTimeString());
                            }
                            DB.ExecuteSQL(string.Format("update orders set notes = cast(notes as nvarchar(max)) + {0} where ordernumber = {1}", DB.SQuote(notes.ToString()), ord.OrderNumber));
    ================================================== ===

    And....

    Viola! It works!