Sync Books Issues

Pubdate: (Tuesday, July 31, 2012 12:50:45 AM)
Author: Thomas Reggi

Last weeks work was to address two main issues, a setback in the middle of the week resulting from my local MAMP servers version of php resulted in being unable to parse XML properly, this has been since resolved.

The two main advances / goals / features / bugs were:

  1. The “undo” button
  2. Products / Items weren’t being imported properly

Undo / Delete && The QB Library

The PHP Library for Quickbooks Online written by ConsoliBYTE / Keith Palmer. The library has many flaws, for starters it is way too expensive, it spans dozens of files. The code often drops and functions aren’t fully written out. The code does not endorse versioning or changes to quickbooks api urls or requests. The main roadblock is that the library does not support “delete” functionality.

Solution(s)

Option A

A much better approach to this would be to create a much much simpler library spanning one file, coordinating the oAuth flow and setting the basic shell for http requests. Importing parts from github like wcurl and a xml to php array converter would speed up development.

Option B

Rather than rewriting all of Keth’s library, I can use the get/post methods and create my own delete method library. Much less time consuming, but much more sloppy.


Item Mapping

Quickbooks products are a very detailed process. The items / products sync is flawed. There is no such thing as a unique “name” or “sku” in quickbooks, there can be multiple of the same products with the same “name” in quickbooks under different parents.

In quickbooks the following is valid, you can have the multiple of the same Item / Product “Name” (in quickbooks) “SKU” (in shopify).

HPOSTERBLKSMALL
HPOSTERBLKLARGE
Posters
    Black
        HPOSTERBLKSMALL
        HPOSTERBLKLARGE
Greeting Cards
    Black
        HPOSTERBLKSMALL
        HPOSTERBLKLARGE

In order to map the shopify product HPOSTERBLKSMALL to one of the following Sync Books needs to know which and can’t automatically determine which it should use.

Solution(s)

Option A

We setup a mapping interface where someone can coordinate which products go where in quickbooks. Some kind of menu in the initial stage of setting up quickbooks & shopify.

Rough draft of shopify to quickbook product mapping

Option B

We map every product from shopify under the following scheme:

Shopify via Sync Books
    HPOSTERBLKSMALL
    HPOSTERBLKLARGE

The problem with this is that when you’re syncing hundreds of products this would not work, unless you left it using the Shopify via Sync Books.