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 3 of 3

Thread: How to cancel an order via WSI?

  1. #1
    sshapiro is offline Junior Member
    Join Date
    May 2011
    Posts
    16

    Question How to cancel an order via WSI?

    Hey guys, I've tried searching a little bit and haven't found anything, perhaps I'm searching for the wrong keywords.

    I am attempting to cancel an order via the WSI. We cancel orders in our fulfillment system, but the order remains "Authorized" on the customer's order history.

    I'd like cancelled orders to not appear "Authorized" and to show visibility that they've been cancelled.

    I assume manually clicking on "Void" in the admin for the order will cancel it, but I was hoping there was some XML I could send through the WSI to do this.

    I already have a connector sending data through the WSI, I just need to know the XML format for the cancellation of an order.

    Again if this information is already out there and I was simply unable to find it, I apologize and simply providing me with a link to the info would be greatly appreciated.

  2. #2
    tpmorgsls is offline Junior Member
    Join Date
    Oct 2009
    Posts
    27

    Default

    Quote Originally Posted by sshapiro View Post
    Hey guys, I've tried searching a little bit and haven't found anything, perhaps I'm searching for the wrong keywords.

    I am attempting to cancel an order via the WSI. We cancel orders in our fulfillment system, but the order remains "Authorized" on the customer's order history.

    I'd like cancelled orders to not appear "Authorized" and to show visibility that they've been cancelled.

    I assume manually clicking on "Void" in the admin for the order will cancel it, but I was hoping there was some XML I could send through the WSI to do this.

    I already have a connector sending data through the WSI, I just need to know the XML format for the cancellation of an order.

    Again if this information is already out there and I was simply unable to find it, I apologize and simply providing me with a link to the info would be greatly appreciated.
    You could just send a transaction back. From the docs:
    HTML Code:
    <AspDotNetStorefrontImport Verbose="false">
    
    <Transaction>
    
                <Set Table="Orders" ID="100002">
    
                            <Deleted>1</Deleted>
    
                            <VoidedOn>Some Date</VoidedOn>
    
                            ....
                </Set>
    
    </Transaction>
    
    </AspDotNetStorefrontImport>

    Or you can send direct SQL via ExecuteSQL. All the WSI does is execute arbitrary, inline SQL based on the parameters you send in. You can send in entity XML for it to parse or just straight SQL. We send in stored procedure calls for our more complex business rules.

  3. #3
    sshapiro is offline Junior Member
    Join Date
    May 2011
    Posts
    16

    Default

    Quote Originally Posted by tpmorgsls View Post
    You could just send a transaction back. From the docs:
    HTML Code:
    <AspDotNetStorefrontImport Verbose="false">
    
    <Transaction>
    
                <Set Table="Orders" ID="100002">
    
                            <Deleted>1</Deleted>
    
                            <VoidedOn>Some Date</VoidedOn>
    
                            ....
                </Set>
    
    </Transaction>
    
    </AspDotNetStorefrontImport>

    Or you can send direct SQL via ExecuteSQL. All the WSI does is execute arbitrary, inline SQL based on the parameters you send in. You can send in entity XML for it to parse or just straight SQL. We send in stored procedure calls for our more complex business rules.

    Thanks for the info! I had considered ExecuteSQL however I was unclear what designated a cancelled order. From your info it appears I just need to set the order to deleted=1 and give it a voidedon date.

    Thanks again!