Overview
In the run up to Christmas one of my clients (Skate Asylum for those interested) is going to get a lot of orders. Every year it gets more and more and this year writing out address labels by hand is not going to cut it. What we wanted was a solution that involves less key depressions for the staff, and less pen to paper.
http://www.linnworks.com/ - @LINNWORKS
We found Linnworks after trying a few other solutions. The deal breaker was in fact its smooth integration with ParcelForce, something the online tutorial videos showed clearly and looked very slick. Surprisingly (and this does not happen very often) after setting up the login details with the Parcelforce API over the phone, it worked exactly as they showed. We were happy. I set about integrating their Amazon account. This also worked as advertised. I integrated 2 Interspire websites. They all imported the orders for processing.
Of the 2 Interspire sites that are integrated, only 1 is active. The other one is in development. This unfinished site has been set up to work when we activate it, but does not yet receive orders. This is because we’re waiting until after christmas. Nobody wants to activate a new site only for problems to arise in the middle of your busiest period. Patience is the key for them. It’ll pay off to wait and see how the market goes before they crack open a fresh solution.
In the meantime the reliable shop they are waiting on is Actinic. During the christmas period it’ll recieve hundreds of orders every day, and processing them will be a struggle. We need that data into Linnworks so we can process it super quick and log parcels into the courier in a snap. For this solution we aren’t tracking stock. We only want the line items and the address for delivery in there so we can print labels. We’re not counting stock, and we’re not bothered about certain values like weight and tax and all that jazz. This is good, it means we can take a shortcut or two.
So, what do we need and what do I have?
We need an XML feed. Linnworks reads XML from a webservice you install on your own server to get new orders. It looks like this:
Shop MySQL Database -> PHP/Webserver -> XML -> Linnworks
The problem is that Actinic Catalog runs from an Access database. We need to create that XML and it has to be a particular way too. The Linnworks sync manager expects specific values and it complains loudly if you dont feed it the right things.
Luckily a few years ago I created something that will help here. Actinet Intranet is essentially an install of Apache Webserver on the same computer as the Actinic Catalog that creates an Intranet so a shop owner and their staff can view order data. Its free now, so… aren’t you lucky? If you run Actinic you can give it a go for free. Its yours to install. If you want to connect Linnworks up later on then you’ll need Actinet. Go and install it now. I’ll wait for you right Here.
—
Back so soon? Well as you can see it run in php (look at the address bar). What Actinet is doing is connecting to the Actinic Catalog local database. Thats right… you guessed it. We are actually going to do this:
Shop Access Database -> PHP/Webserver -> XML -> Linnworks
Linnworks themselves provide you with some PHP to connect to any generic MySQL Database with the app. The easy part was re-tooling this to work with The access database that actinic uses. I spent half day reading this document about ODBC in PHP. After 6 hours of clean room design, my new XML service was ready. I put it in the the root of my Actinic Intranet, fed it the database details and voila! I get XML. I breathe easy. Celebratory cups of coffee and biscuits.
One in the bank.
The next part is writing the query SQL. In Linnworks you integrate by pointing the software to the location on the internet of your XML connector, and then provide the linnworks app with some SQL to run against the connector to pull things like the recent open orders and what products are in that order. There is also SQL to sync back up to the shop the status of an order and set it as ‘shipped’ and more SQL to set the stock levels and things like that.
So far… I’ve written the part that gets the orders and the part that gets the line items. No code yet for syncing the stock, and none for telling the shop things are shipped / completed. Thats for another article.
Catch you next time: Sync stock and mark as shipped.
Edit Wed 12th Oct 2011:
My solution was only a days blast at the problem and i’m sure that it can be much better but…
http://www.gabrielcrowe.co.uk/upload…-connector.zip
(Install instructions included in zip)
If you get it working and feel compelled to donate to further development then paypal me a beer:
paypal@angrydinosaur.co.uk 
BACK UP YOUR SHOP BACK UP YOUR SHOP BACK UP YOUR SHOP BACK UP YOUR SHOP BACK UP YOUR SHOP BACK UP YOUR SHOP BACK UP YOUR SHOP BACK UP YOUR SHOP BACK UP YOUR SHOP BACK UP YOUR SHOP BACK UP YOUR SHOP.
Got it? Good.
Linking Linnworks to Actinic to fetch orders.
This document explains how to get data out of Actinic Catalog and into Linnworks for processing. Due to limitations in the sync, the data is really only useful for postal processing (label automation) and invoice printing (Linnworks supports easily editable custom templates.)
It DOES:
- Sync orders and associated line items
- Sync delivery and shipping addresses separately
- Highlight orders in Actinic Catalog when you ‘complete’ them in Linnworks *
- Get the email address so you can email from Linnworks
- Sync ‘Order Notes’ or special delivery instructions.
- Sync only ‘Full Payment Received’ AND ‘Pre-authorized (PSP)’ orders
- Sync only ‘New’ orders **.
It DOES NOT:
- Complete orders in Actinic catalog
- Sync ANY stock back to Actinic Catalog
- Sync Deleted Orders
- Care what payment provider you use
- Sync payment ‘Pending’
- Work for delivery addresses outside the UK ***
NOTES:
* Linnworks cannot complete orders in the traditional sense because Actinic does a lot more than simply set a status. Linnworks sends a single SQL query to Actinic and this query isn’t nearly advanced enough. My workaround was to simply highlight the row in Actinic for manual processing using a real human being. Actinic lets you complete in batches so I don’t see this as a big hurdle.
** Because of the behaviour or syncing only pending orders, the moment you ‘complete’ an order in Actinic Catalog, it will not sync. You should sync BEFORE you fiddle with your orders in Actinic.
*** To get this working as soon as possible I assume that all countries are in the UK. this will be fixed in a later version.
On line 170 of the connector look for this line:
$thisvalue = $thisyear.'-'.$thismonth.'-'.$thisday;
and make it say this:
$thisvalue = $thisyear.'-'.$thismonth.'-'.$thisday.' '.$thisdatearr[1];
Now the correct times will be passed on your next sync.