Shopify Connector
Documentation
Version: 2
Documentation

Table Products


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_products
INSERT post_product
UPDATE put_product
UPSERT
DELETE delete_product
LOOKUP get_products

Examples

SSIS

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

Read from Products table using API Source

Shopify
Products
SSIS API Source - Read from table or endpoint

Read/write to Products table using API Destination

Shopify
Products
Select
SSIS API Destination - Access table operation

ODBC application

Use these SQL queries in your ODBC application data source:

Get list of products

SELECT * FROM Products

Get a specific product by its ID

SELECT * FROM Products WITH Id=1111111111111

Get multiple specific products by their IDs

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

Create a new product

This example shows how to insert a new Shopify product. It also sets Variants

INSERT INTO Products 
(
	 Title
	,Status
	,BodyHtml
	,UrlHandle
	,Vendor
	,ProductType
	,Variants
	,Options
	,Tags
	,Metafields
	,Images	
	)
VALUES	
('Ice Cream'
,'draft'
,'<strong>Very yummy ice cream!</strong>'
,'ice-cream' 
,'Burton'
,'Snowboard' 

,'[
	{"price":10.5, "option1":"Chocolate","option2":"Small","sku":"ICE-CHO-SML","inventory_quantity":100},
	{"price":10.5, "option1":"Chocolate","option2":"Medium","sku":"ICE-CHO-MED","inventory_quantity":100},
	{"price":11.5, "option1":"Vanilla","option2":"Small","sku":"ICE-VNL-MED","inventory_quantity":210}
  ]'

--you must set variants and use atlease one value from the below list in option1, option2 or option3 in any variant entry else it will fail.  
,'[
	{"name":"Color","values":["Chocolate","Vanilla"]}, 
	{"name":"Size","values":["Small","Medium"]}
  ]' 

,'["Frozen","Seasonal","Dad''s Fav"]'

--adding metadata (custom fields) - metadata fields must be created before setting it 
--below are 2 system fields for SEO Title / SEO Description (you dont need to create them unlike custom metadata). These values appears on SEO section
,'[
	{"key":"title_tag","value":"Yum Ice Cream SEO Title", "namespace":"global","type":"single_line_text_field"}, 
	{"key":"description_tag","value":"Yum Ice Cream SEO description", "namespace":"global","type":"single_line_text_field"} 
  ]'

--first image becomes main image if you supply multiple images 
--upload multiple images from URL (set "src")
 , '[	
	{"src":"https://zappysys.com/images/tech/google-analytics-logo.png"},
	{"src":"https://zappysys.com/images/tech/web-api-logo.png"}
  ]'
--OR upload multiple local image files (set "attachment")
--, '[	
--	 {"attachment":"<<c:\temp\icecream_1.png,FUN_FILE_BASE64ENC>>"},
--	 {"attachment":"<<c:\temp\icecream_2.png,FUN_FILE_BASE64ENC>>"}
--  ]'  
  
)

Update an existing product

This example shows how to update an existing product. Update product title, description (body html), images, variants and more

UPDATE Products
SET Title='Ice Cream - Updated'
 , Status='draft' --active, archived, draft  
 , BodyHtml='<strong>Very yummy ice cream - updated!</strong>'  
--first image becomes main image if you supply multiple images 
--upload multiple images from URL (set "src")
 , Images='[	
	{"src":"https://zappysys.com/images/tech/google-analytics-logo.png"},
	{"src":"https://zappysys.com/images/tech/web-api-logo.png"}
  ]'
--OR upload multiple local image files (set "attachment")
--, Images='[	
--	 {"attachment":"<<c:\temp\icecream_1.png,FUN_FILE_BASE64ENC>>"},
--	 {"attachment":"<<c:\temp\icecream_2.png,FUN_FILE_BASE64ENC>>"}
--  ]'

 , Variants='[
	{"price":20.5, "option1":"Chocolate","option2":"Small","sku":"ICE-CHO-SML","inventory_quantity":300},
	{"price":21.5, "option1":"Vanilla","option2":"Small","sku":"ICE-VNL-MED","inventory_quantity":110}
  ]'
, PublishedScope='global' --or web
, Vendor ='IceGlobal'
, ProductType ='Cold Food'
, Tags ='["Frozen","Seasonal","Dad''s Fav"]'
--Update SEO URL
 ,UrlHandle='ice-cream-51' 
--Update SEO title / description
, SEOTitle='Yum Ice Cream SEO Title-update'  
, SEODescription='Yum Ice Cream SEO description-update'  
Where Id=7348335771748

Delete an existing product

This example shows how to delete an existing product.

DELETE FROM Products
Where Id=7348335771748

SQL Server

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

Get list of products

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

EXEC (@MyQuery) AT [LINKED_SERVER_TO_SHOPIFY_IN_DATA_GATEWAY];

Get a specific product by its ID

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Products WITH Id=1111111111111';

EXEC (@MyQuery) AT [LINKED_SERVER_TO_SHOPIFY_IN_DATA_GATEWAY];

Get multiple specific products by their IDs

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

EXEC (@MyQuery) AT [LINKED_SERVER_TO_SHOPIFY_IN_DATA_GATEWAY];

Create a new product

This example shows how to insert a new Shopify product. It also sets Variants

DECLARE @MyQuery NVARCHAR(MAX) = 'INSERT INTO Products 
(
	 Title
	,Status
	,BodyHtml
	,UrlHandle
	,Vendor
	,ProductType
	,Variants
	,Options
	,Tags
	,Metafields
	,Images	
	)
VALUES	
(''Ice Cream''
,''draft''
,''<strong>Very yummy ice cream!</strong>''
,''ice-cream'' 
,''Burton''
,''Snowboard'' 

,''[
	{"price":10.5, "option1":"Chocolate","option2":"Small","sku":"ICE-CHO-SML","inventory_quantity":100},
	{"price":10.5, "option1":"Chocolate","option2":"Medium","sku":"ICE-CHO-MED","inventory_quantity":100},
	{"price":11.5, "option1":"Vanilla","option2":"Small","sku":"ICE-VNL-MED","inventory_quantity":210}
  ]''

--you must set variants and use atlease one value from the below list in option1, option2 or option3 in any variant entry else it will fail.  
,''[
	{"name":"Color","values":["Chocolate","Vanilla"]}, 
	{"name":"Size","values":["Small","Medium"]}
  ]'' 

,''["Frozen","Seasonal","Dad''''s Fav"]''

--adding metadata (custom fields) - metadata fields must be created before setting it 
--below are 2 system fields for SEO Title / SEO Description (you dont need to create them unlike custom metadata). These values appears on SEO section
,''[
	{"key":"title_tag","value":"Yum Ice Cream SEO Title", "namespace":"global","type":"single_line_text_field"}, 
	{"key":"description_tag","value":"Yum Ice Cream SEO description", "namespace":"global","type":"single_line_text_field"} 
  ]''

--first image becomes main image if you supply multiple images 
--upload multiple images from URL (set "src")
 , ''[	
	{"src":"https://zappysys.com/images/tech/google-analytics-logo.png"},
	{"src":"https://zappysys.com/images/tech/web-api-logo.png"}
  ]''
--OR upload multiple local image files (set "attachment")
--, ''[	
--	 {"attachment":"<<c:\temp\icecream_1.png,FUN_FILE_BASE64ENC>>"},
--	 {"attachment":"<<c:\temp\icecream_2.png,FUN_FILE_BASE64ENC>>"}
--  ]''  
  
)';

EXEC (@MyQuery) AT [LINKED_SERVER_TO_SHOPIFY_IN_DATA_GATEWAY];

Update an existing product

This example shows how to update an existing product. Update product title, description (body html), images, variants and more

DECLARE @MyQuery NVARCHAR(MAX) = 'UPDATE Products
SET Title=''Ice Cream - Updated''
 , Status=''draft'' --active, archived, draft  
 , BodyHtml=''<strong>Very yummy ice cream - updated!</strong>''  
--first image becomes main image if you supply multiple images 
--upload multiple images from URL (set "src")
 , Images=''[	
	{"src":"https://zappysys.com/images/tech/google-analytics-logo.png"},
	{"src":"https://zappysys.com/images/tech/web-api-logo.png"}
  ]''
--OR upload multiple local image files (set "attachment")
--, Images=''[	
--	 {"attachment":"<<c:\temp\icecream_1.png,FUN_FILE_BASE64ENC>>"},
--	 {"attachment":"<<c:\temp\icecream_2.png,FUN_FILE_BASE64ENC>>"}
--  ]''

 , Variants=''[
	{"price":20.5, "option1":"Chocolate","option2":"Small","sku":"ICE-CHO-SML","inventory_quantity":300},
	{"price":21.5, "option1":"Vanilla","option2":"Small","sku":"ICE-VNL-MED","inventory_quantity":110}
  ]''
, PublishedScope=''global'' --or web
, Vendor =''IceGlobal''
, ProductType =''Cold Food''
, Tags =''["Frozen","Seasonal","Dad''''s Fav"]''
--Update SEO URL
 ,UrlHandle=''ice-cream-51'' 
--Update SEO title / description
, SEOTitle=''Yum Ice Cream SEO Title-update''  
, SEODescription=''Yum Ice Cream SEO description-update''  
Where Id=7348335771748';

EXEC (@MyQuery) AT [LINKED_SERVER_TO_SHOPIFY_IN_DATA_GATEWAY];

Delete an existing product

This example shows how to delete an existing product.

DECLARE @MyQuery NVARCHAR(MAX) = 'DELETE FROM Products
Where Id=7348335771748';

EXEC (@MyQuery) AT [LINKED_SERVER_TO_SHOPIFY_IN_DATA_GATEWAY];