This is going to be the longest post on this site... but it's a really great piece of code.
This is SQL code that reads a JSON document and imports an order into Dynamics GP. All of this is done in SQL, no .NET code involved.
This iteration of the code handles the order and lines, as well as taxes and payments. I'd call this a 'typical web order'. The taxes are provided by the web site at the header level only, and the orders are always completely paid.
Below you'll find a series of scripts needed to make this work. Here's the overview:
A script that contains the sample JSON (remember that each implementation will have a different JSON format, you'll have to adjust for that. If you need help, just ask)
The main script, called Shopify_SOPOrder_Integration (because this happens to be a Shopify integration)
4 'wrapper' scripts that handle the calls to eConnect
4 scripts that define the 4 tables that we use as staging
Too much code to read through, really, but just remember where it is when you need it.
Leave a comment?