XML Import: Sales Orders vs. Invoices

I'm not a master at ERP--I'm the web guy. My job is to run the xTuple web sites and the xTuple xChange. But one of the benefits of ERP is the ability to consolidate data from all kinds of sources into a single ERP accounting system. In our case, we export customer and order info from the xChange and import it into xTuple ERP (see our docs on xTuple e-commerce integration for more info). This forced me to learn something about ERP order processing. I thought I'd share my experience with the community to help others avoid my errors.

 

 

When we started setting up our import process, I needed to find a record type in xTuple to receive the order data from our online store. I looked through the xTuple API (I use PGAdmin to browse the PostgreSQL database) to find a good candidate and I settled on the Sales Order view. This seemed like a logical analog to the Order record from the store. So I set up the import process to translate Ubercart Orders into xTuple Sales Orders. Boom. Done. Great.

As soon as we did our first import I realized my mistake. xTuple ERP is designed to handle a multi-step ordering process, where a sales team generates Sales Orders, which in turn can generate Work Orders on the manufacturing floor, or else go straight to a shipping department where they generate a Packlist. The Sales Order has to actually get shipped before it is deemed "Complete." At the end of this process it becomes an Invoice, and only then can a payment be applied to it. This is exactly how it SHOULD work, if you have products that need to be built and assembled and shipped.

In our case however, all these steps were artificial. We imported the Sales Order, and then had to escort it through these steps of "shipping" the product, even though the order had already been completed online. We had nothing to ship. It was cumbersome and somewhat frustrating. This is not the way we needed our small business accounting software to work.

 

 

So I went back to the API and looked again and this time I noticed the Invoice view. I realized that I could skip past all the unnecessary shipping steps if I just imported the Order as an Invoice rather than as a Sales Order. The Invoice view contains most of the same columns as the Sales Order view, so it was an easy matter to adjust my xml document to use Invoice instead. Now I had it set up to insert an Invoice for the order, and a Credit Memo for the payment. The two are matched up in the Accounts Receivable Workbench in xTuple, and the process is easy and streamlined.

The lesson here is simple: know your business. If you are going to sell online and import your orders into xTuple, the key question is are you shipping products or not. If you are, go with a Sales Order; if not, enter the orders directly as Invoices. It will save you time and avoid frustration.

We are distributing an xTuple e-commerce solution for exporting Ubercart orders for import into xTuple. Right now, this assumes you want the orders to be Sales Orders in xTuple. I'd be interested to hear if that works for most users, or if there is any interest in the newer version that I developed for us, the one that imports into Invoices, as well.

BC Wilson

Director Cloud Services at xTuple, October 2008 – January 2018

With the explosive movement of cloud strategies, BC was promoted to director of cloud services in 2014. Previously, he oversaw operations and hiring of managers for critical lines of business for the Product Management Group, driving return on investment (ROI) for all xTuple products and managed ongoing engineering and development of the xTuple Classic GUI product, including all customer-sponsored enhancements, as well as the xTuple Web Portal product. Prior to xTuple, BC was a senior product manager for Trader Electronic Media, where he directed the development of websites for the classified advertising market. He has also worked as a partner in a web design agency, and a content producer for the Road Runner and Starband broadband service providers. BC began his career as a writer and editor for the Ziff Davis computer magazines.

He holds a B.A. in Theology from Georgetown University, and an M.F.A. in Creative Writing from Old Dominion University. In 2012, BC was appointed as a commissioner of Bicycle and Pedestrian Trails in Norfolk, Virginia.