The Web Service Interface (WSI) feature is an XML-based tool that functions similarly to an API, allowing developers to carry out a myriad of tasks within the storefront in bulk, or from remote systems, without having to make source code modifications.
WSI can be used for a number of things other than just adding records to the database.
In it's simplest form, it can be used as an import tool for inserting records directly into the columns of a database table (you can write direct sql statements and pass them in) or via some of the built in nodes like Product, Entity, and Customer. In addition, using native WSI functionality ensures that data is inserted in a manner native to AspDotNetStorefront, and you don't run the risk of leaving out some crucial piece of data required for the store to operate properly as you do with direct sql statements. The flexibility of WSI however, does allow fordirect sql statements and executing stored procedures.
Getting slightly more complex, WSI can be used to update, soft-delete, or nuke items in the database (again either via direct sql or the included nodes and methods that are native to WSI). Due to the nature of WSI, you can perform these functions based on what you know about the data you are trying to delete rather than trying to gather the data that the stored procedure requires (eg. instead of exec aspdnsf_someprocedure parameter_1 parameter_2 parameter_3 you could pass a delete from table where somevalue_1='value_1' and somevalue_2='value_2' where somevalue_3 not in (select value from table_2 where table_2_value_1 = 'value_1'). You are completely free from any confines that a stored procedure might limit you to.
Moving deeper into WSI, you can perform a plethora of other tasks including (but not limited to) order processing (there are ~34 different order processing tasks that cannot be accomplished through stored procedures which WSI is capable of, including Voids, Captures, Refunds, sending receipts, marking an order as fraud, marking an order as shipped, retrieving receipts, deleting, setting tracking information, etc...), recurring order management, inventory retrieval, resetting the cache (as you would do from the admin section), and uploading images for products or entities while utilizing the image resizing features. Since WSI is completely XML, you can also utilize our xmlpackage engine and xmlpackages to format data however you see fit.
WSI also goes hand in hand with ourevent notification system. You can configure AspDotNetStorefront to provide notifications of different events (like a customer creating an account or placing an order) which call out to a page on the web. From that page, you could use WSI to retrieve information and do something with it. For example, let's say you have a third party application where you back up all of your order data. After a customer places an order, AspDotNetStorefront sends a notification to some listener page you've specified with an order number and the type of event - New Order. The listener page can grab the order number from the event notification, use a simple Get statement with an xmlpackage specified that formats the data in a manner your other application understands and then pass the data off to your third party app.
From here, the possibilities are endless. Want a desktop application for bulk capturing orders? Write a simple application similar to the one we offer fordownloadthat you can execute from your machine with Internet access, which when clicked will retrieve all non-captured orders from your site, save each one off into an Excel file somewhere on your local machine (just to keep a record of what's going on) and then captures each one.
Have multiple licenses and have multiple stores set up that share inventory? Write an xml doc that you can pass to WSI that retrieves inventory for an item from each of the sites available, determines how many were sold for the day and updates the inventory across all the sites to reflect the proper amount. You could even tie this up to the event handlers so that it happened automatically every time someone purchased an item.
WSI is suited for anyone wanting more than just an import tool that can be used over the web without direct access to the database and outside of the application. It can be used for cross-platform communication, as well as simple maintenance and management of any data that exists in AspDotNetStorefront. If you're interested in a simple xml format import tool, it can be used for that as well.