Shopify Connector
Documentation
Version: 2
Documentation

Table Orders


Parameters

Parameter Label Required Options Description Help
There are no parameters

Supported Operations

Below section contains supported CRUD operations. Each operation is executed by some EndPoint behind the scene.
Method Supported Reference EndPoint
SELECT get_orders
INSERT post_order
UPDATE put_order
UPSERT
DELETE delete_order
LOOKUP get_orders

Examples

SSIS

Use Shopify Connector in API Source component to read data or in API Destination component to read/write data:

Read from Orders table using API Source

Shopify
Orders
SSIS API Source - Read from table or endpoint

Read/write to Orders table using API Destination

Shopify
Orders
Select
SSIS API Destination - Access table operation

ODBC application

Use these SQL queries in your ODBC application data source:

Update an existing customer record

UPDATE Orders SET
  FulfillmentStatus = 'john.doe5@gmail.com',
  Phone = '7705553111',
  Note= 'This is a new note that needed to be added to the order later.'
WHERE Id=1111111111111

Get all orders

SELECT * FROM Orders

Get open orders

SELECT * FROM Orders WITH (Status='open') --also try 'any', 'open', 'closed', 'cancelled'

Get a specific order by its ID

SELECT * FROM Orders Where Id=1111111111111

Get multiple specific orders by their IDs

SELECT * FROM Orders WITH(ids='1111111111111,2222222222222,3333333333333')

Delete an order record

DELETE Orders WHERE Id=1111111111111

Delete an order record (throw error if not found)

DELETE Orders WHERE Id=1111111111111 (ContineOn404Error=0)

Insert a new order record

INSERT INTO Orders (BillingAddressLine1, BillingAddressLine2, BillingAddressCity, BillingAddressCompany, BillingAddressCountry, BillingAddressFirstName, BillingAddressLastName, BillingAddressPhone, BillingAddressProvince, BillingAddressZip, BillingAddressName, BillingAddressProvinceCode, BillingAddressCountryCode, BuyerAcceptsMarketing, LineItems, CustomerId, Email, EstimatedTaxes, FinancialStatus, FulfillmentStatus, Name, Note, Phone, Currency, PresentmentCurrency, ProcessedAt, ReferringSite, ShippingAddressLine1, ShippingAddressLine2, ShippingAddressCity, ShippingAddressCompany, ShippingAddressCountry, ShippingAddressFirstName, ShippingAddressLastName, ShippingAddressPhone, ShippingAddressProvince, ShippingAddressZip, ShippingAddressName, ShippingAddressProvinceCode, ShippingAddressCountryCode, Tags, TaxesIncluded, TotalWeight, SendReceipt, SendFulfillmentReceipt)
VALUES
('123 Main Street', 'Suite #54', 'Memphis', 'Acme, Inc.', 'United States', 'John', 'Doe', '4045559876', 'Tennessee', '38101', 'John Doe', 'GA', 'US', 1, '[{"title":"Super Strong Glue","price":24.99,"grams":"100","quantity":1,"tax_lines":[{"price":13.5,"rate":0.06,"title":"State tax"}]}]', 5945175474276, 'johndoe2@gmail.com', 1, 'pending', null, '#40294', 'This order needs to be expedited, so register it in the system as so.', '4045559876', 'USD', 'USD', '2023-02-27T11:00:00', 'https://referringsite.com', '123 Main Street', 'Suite #54', 'Memphis', 'Acme, Inc.', 'United States', 'John', 'Doe', '4045559876', 'Tennessee', '38101', 'John Doe', 'GA', 'US', NULL, 1, 20, 1, 1)

SQL Server

Use these SQL queries in SQL Server after you create a data source in Data Gateway:

Update an existing customer record

DECLARE @MyQuery NVARCHAR(MAX) = 'UPDATE Orders SET
  FulfillmentStatus = ''john.doe5@gmail.com'',
  Phone = ''7705553111'',
  Note= ''This is a new note that needed to be added to the order later.''
WHERE Id=1111111111111';

EXEC (@MyQuery) AT [LINKED_SERVER_TO_SHOPIFY_IN_DATA_GATEWAY];

Get all orders

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Orders';

EXEC (@MyQuery) AT [LINKED_SERVER_TO_SHOPIFY_IN_DATA_GATEWAY];

Get open orders

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Orders WITH (Status=''open'') --also try ''any'', ''open'', ''closed'', ''cancelled''';

EXEC (@MyQuery) AT [LINKED_SERVER_TO_SHOPIFY_IN_DATA_GATEWAY];

Get a specific order by its ID

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Orders Where Id=1111111111111';

EXEC (@MyQuery) AT [LINKED_SERVER_TO_SHOPIFY_IN_DATA_GATEWAY];

Get multiple specific orders by their IDs

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Orders WITH(ids=''1111111111111,2222222222222,3333333333333'')';

EXEC (@MyQuery) AT [LINKED_SERVER_TO_SHOPIFY_IN_DATA_GATEWAY];

Delete an order record

DECLARE @MyQuery NVARCHAR(MAX) = 'DELETE Orders WHERE Id=1111111111111';

EXEC (@MyQuery) AT [LINKED_SERVER_TO_SHOPIFY_IN_DATA_GATEWAY];

Delete an order record (throw error if not found)

DECLARE @MyQuery NVARCHAR(MAX) = 'DELETE Orders WHERE Id=1111111111111 (ContineOn404Error=0)';

EXEC (@MyQuery) AT [LINKED_SERVER_TO_SHOPIFY_IN_DATA_GATEWAY];

Insert a new order record

DECLARE @MyQuery NVARCHAR(MAX) = 'INSERT INTO Orders (BillingAddressLine1, BillingAddressLine2, BillingAddressCity, BillingAddressCompany, BillingAddressCountry, BillingAddressFirstName, BillingAddressLastName, BillingAddressPhone, BillingAddressProvince, BillingAddressZip, BillingAddressName, BillingAddressProvinceCode, BillingAddressCountryCode, BuyerAcceptsMarketing, LineItems, CustomerId, Email, EstimatedTaxes, FinancialStatus, FulfillmentStatus, Name, Note, Phone, Currency, PresentmentCurrency, ProcessedAt, ReferringSite, ShippingAddressLine1, ShippingAddressLine2, ShippingAddressCity, ShippingAddressCompany, ShippingAddressCountry, ShippingAddressFirstName, ShippingAddressLastName, ShippingAddressPhone, ShippingAddressProvince, ShippingAddressZip, ShippingAddressName, ShippingAddressProvinceCode, ShippingAddressCountryCode, Tags, TaxesIncluded, TotalWeight, SendReceipt, SendFulfillmentReceipt)
VALUES
(''123 Main Street'', ''Suite #54'', ''Memphis'', ''Acme, Inc.'', ''United States'', ''John'', ''Doe'', ''4045559876'', ''Tennessee'', ''38101'', ''John Doe'', ''GA'', ''US'', 1, ''[{"title":"Super Strong Glue","price":24.99,"grams":"100","quantity":1,"tax_lines":[{"price":13.5,"rate":0.06,"title":"State tax"}]}]'', 5945175474276, ''johndoe2@gmail.com'', 1, ''pending'', null, ''#40294'', ''This order needs to be expedited, so register it in the system as so.'', ''4045559876'', ''USD'', ''USD'', ''2023-02-27T11:00:00'', ''https://referringsite.com'', ''123 Main Street'', ''Suite #54'', ''Memphis'', ''Acme, Inc.'', ''United States'', ''John'', ''Doe'', ''4045559876'', ''Tennessee'', ''38101'', ''John Doe'', ''GA'', ''US'', NULL, 1, 20, 1, 1)';

EXEC (@MyQuery) AT [LINKED_SERVER_TO_SHOPIFY_IN_DATA_GATEWAY];