On a side note, Linnworks (and any sort of courier integration like the one i did for parcelforce) loves you more if you feed it nice clean addresses from http://www.postcodeanywhere.co.uk/ . If you dont, you'll be correcting crappy broken postcodes manually.
Announcement
Collapse
No announcement yet.
Actinic to Linnworks Script
Collapse
X
-
First Alpha - Handle with care
Download here:
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.
(Copy of this post and some more good mouth words here:
http://www.gabrielcrowe.co.uk/2011/1...k-in-progress/)
Comment
-
Gabe,
Did you find a problem with the updating back into Actinic? Did it not work or was there another unforseen issue with it?Fergus Weir - teclan ltd
Ecommerce Digital Marketing
SellerDeck Responsive Web Design
SellerDeck Hosting
SellerDeck Digital Marketing
Comment
-
I just want to confirm this will work. All I have is a single SQL statement to update the stock level. Linnworks loops over the items ordered in the last batch and sends the number back through the sync manager.
I get
I can do:
UPDATE Product SET Product.[Product Reference] = "[Reference_Number]", Product.nStockOnHand = [STOCK_IN_HAND];
for each affected product.... but i dont think I can do
UPDATE OutstandingStockChanges SET OutstandingStockChanges.sProdRef = "ABC123", OutstandingStockChanges.nStatus = 0, OutstandingStockChanges.nChange = 1;
in the same statement. Can anyone think of a way to do this in a single sql statement?
Comment
-
Could you not just execute both statements in one command separated by ';' ?
If you have the pre-change stock level (psl) and the new level you can get the variance in stock i.e. +10 or -5. With the new stock level and this variance as variable1 and variable2 could you not execute
'UPDATE Product SET Product.[Product Reference] = "[Reference_Number]", Product.nStockOnHand = [variable1];UPDATE OutstandingStockChanges SET OutstandingStockChanges.sProdRef = "ABC123", OutstandingStockChanges.nStatus = 0, OutstandingStockChanges.nChange = [variable2];'
Non?Fergus Weir - teclan ltd
Ecommerce Digital Marketing
SellerDeck Responsive Web Design
SellerDeck Hosting
SellerDeck Digital Marketing
Comment
-
The Linnworks integration script is a php file that sits near the database and catches sql to execute against a database. In this case the server is Actinet and the database is 'Actiniccatalog.mdb'.
In the config, you paste SQL statements to run when things happen in the Linnworks software. When doing the 'updating stock' bit a generic script runs for each item affected by recent transactions/stock movements:
Code:UPDATE Product SET Product.nStockOnHand = [{Level_LessOrderBook}] WHERE Product.[Product Reference] = '[{ItemNumber}]';
From their own docs:
UpdateStockLevel
The query will get executed for every changed stock level in linnworks and for every item currently in open orders. The query takes in two parameters [{Level_LessOrderBook}] and [{ItemNumber}]
Comment
-
I think a custom "thingummy" would possible be required.
If your only stock variable from LinnWorks is {Level_LessOrderBook} and this represents the new stock level to be updated back to Actinic then you're going to need an intermediate query to Actinic to retrieve the current stock level difference from Actinic to insert back into the "OutstandingStockChanges"
e.g. Something like
UPDATE OutstandingStockChanges SET OutstandingStockChanges.sProdRef = "{ItemNumber}", OutstandingStockChanges.nStatus = 0, OutstandingStockChanges.nChange = (SELECT Product.nStockOnHand - {Level_LessOrderBook} WHERE Product.[Product Reference] = {ItemNumber});
Just a possible....Fergus Weir - teclan ltd
Ecommerce Digital Marketing
SellerDeck Responsive Web Design
SellerDeck Hosting
SellerDeck Digital Marketing
Comment
-
I think what i'll do is write something into the actinet connector that looks in the query for a trigger term like: 'STOCK_UPDATE'. If the query contains this word then i can simply pass this:
STOCK_UPDATE|ITEMREF|NEWSTOCK
instead of SQL and create a function in the php to manage the stock. the function could pull the current stock and do all the things on this page. Back to the drawing board.
So can anybody help me determine what versions of actinic i would use this in? Is this only version 10/11 or can I simply insert the stock number into the table without all this fuss in v9/8?
Comment
-
HOTFIX: Due to a pathetic schoolboy error on my part, the time was not correctly passed to Linnworks, meaning all orders look like they happened at midnight.
On line 170 of the connector look for this line:
Code:$thisvalue = $thisyear.'-'.$thismonth.'-'.$thisday;
Code:$thisvalue = $thisyear.'-'.$thismonth.'-'.$thisday.' '.$thisdatearr[1];
Comment
-
Originally posted by gabrielcrowe View PostI think what i'll do is write something into the actinet connector that looks in the query for a trigger term like: 'STOCK_UPDATE'. If the query contains this word then i can simply pass this:
STOCK_UPDATE|ITEMREF|NEWSTOCK
instead of SQL and create a function in the php to manage the stock. the function could pull the current stock and do all the things on this page. Back to the drawing board.
So can anybody help me determine what versions of actinic i would use this in? Is this only version 10/11 or can I simply insert the stock number into the table without all this fuss in v9/8?
Comment
Comment