stevegray
4Penny.net
Points: 55409

1/22/2021 4:38:58 PM

Create a SOP document completely in SQL. Includes error trapping.

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?

4Penny.net
Version: All
Section: eConnect,SQL Scripts
Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables
3