Bigcommerce and google sheet integration through Zapier

bigcommerce

For Creating and Updating Products.

Bigcommerce:-

BigCommerce is an e-commerce platform that allows businesses to create and manage online stores. It provides tools for creating and customizing a website, managing inventory, processing payments, and shipping orders. BigCommerce also offers integrations with various third-party tools, such as accounting software and marketing tools, to help businesses run their online store efficiently.

Google Sheets:-

Google Sheets is a web-based spreadsheet application developed by Google. It allows users to create and edit spreadsheets online while collaborating in real time with other users. It has similar functionality to Microsoft Excel and it can be used for tasks such as organizing data, performing calculations, and creating charts and graphs. Sheets also include built-in functions for working with data, such as sorting and filtering, and they can be integrated with other Google services like Google Forms, Google Maps, and Google Translate. It is also possible to use Google Sheets as a basic database with the help of Google script.

Zapier:-

Zapier is a tool that helps you automate repetitive tasks between two or more apps—no code is necessary but for complex integrations, we can use coding. Zapier can instruct an additional app to carry out (or carry out) a certain action when an event occurs in the first app.

To integrate BigCommerce with Google Sheets using Zapier, you will first need to create an account with both BigCommerce and Zapier.

Once you have an account with both, you can then create a “Zap” (automation) between the two platforms.

Here are the general steps to set up the integration:

Step 1: Log in to your Zapier account and click on the “Make a Zap” button.

Step 2: Select Google Sheets as the trigger app, and choose the action event that you want to use (e.g. “Create Spreadsheet Row”).

Connect your Google Sheets account to Zapier by providing your account credentials

Step 3: Set up the template for how the data will be passed between BigCommerce and Google Sheets, customizing the fields as needed and also testing the action to ensure it’s working correctly or not.

Step 4: After testing, add a filter tool to filter the data to ensure that the next step is for creating the products or updating the existing products. (You can validate the date column of the Products Id if the id exists that goes to the updating process or the id does not exist then the new creation process).

Filter Tool:- Only allow a Zap to proceed when a certain condition is met. You may use a Filter to only send a text message when an email from a specific address is received, for instance, if you want to send a text message whenever you receive a new email.

For Adding new Products (If id does not exist):- 

Step 5: Choose the code tool for the action process, as well as choose the language (Javascript) and map the sheet columns data using headers.

And apply the condition according to the requirement

Code to validate the Data:-


// shipping default= no
var mod = inputData.shipping
var shipping
if(mod == null || mod == “No”){
shipping=0
}
if(mod==”Yes”){
shipping=1
}

//product Visiblity default=no
var Visible= inputData.Visible
var modVisible
if(Visible== null || Visible== “No”){
modVisible =0
}
if(Visible==”Yes”){
modVisible =1
}

//depth(thickness default=1)
var modDepth = inputData.Depth
var depth
if(modDepth == null || modDepth == “1”){
depth=1
}
else{
depth=modDepth
}

//availability (default=available)
var modavailability = inputData.availabilityData
var availability
var preOrderDate
var preorderOnly
if(modavailability == “No”){
availability=”disabled”
preOrderDate=”NoData”
preorderOnly=”NoData”
}
else if(modavailability==”Yes”){
availability=”available”
preOrderDate=”NoData”
preorderOnly=”NoData”
}
else if(modavailability == null || modavailability==””){
availability=”NoData”
preOrderDate=”NoData”
preorderOnly=”NoData”
}
else{
availability=”preorder”
preOrderDate=modavailability
preorderOnly=”True”
}

//taxclass(Default Tax Class = P)
var modtaxclass = inputData.Type
var taxClass
if(modtaxclass == “D”){
taxClass=10
}
if(modtaxclass == “P”){
taxClass=0
}


//customFields
var modCustomField = inputData.customfields
var customFieldData
if(modCustomField == null || modCustomField == “”){
customFieldData=1
}
else{
customFieldData=modCustomField
}

// SKU validate
var checkSKU=inputData.sku
var finalSKU

if(checkSKU==”” || checkSKU==null){
finalSKU =”NoData”
}else{
finalSKU=checkSKU
}

// Description validate
var checkDescription=inputData.description
var finalDescription

if(checkDescription==”” || checkDescription==null){
finalDescription=”NoData”
}else{
finalDescription=checkDescription
}

// bin_picking_number validate
var checkBin_picking_number=inputData.bin_picking_number
var finalBin_picking_number

if(checkBin_picking_number==”” || checkBin_picking_number==null){
finalBin_picking_number=”NoData”
}else{
finalBin_picking_number=checkBin_picking_number
}


// brand_name validate
var checkBrand_name=inputData.brand_name
var finalBrand_name

if(checkBrand_name==”” || checkBrand_name==null){
finalBrand_name=”NoData”
}else{
finalBrand_name=checkBrand_name
}

//inventory_tracking  validate
var checkInventory_tracking=inputData.inventory_tracking
var finalInventory_tracking

if(checkInventory_tracking==”” || checkInventory_tracking==null){
finalInventory_tracking=”NoData”
}else{
finalInventory_tracking=checkInventory_tracking
}


//current_stock  validate
var checkCurrent_stock=inputData.current_stock
var finalCurrent_stock

if(checkCurrent_stock==”” || checkCurrent_stock==null){
finalCurrent_stock=100000000000
}else{
finalCurrent_stock=checkCurrent_stock
}

//low_stock validate
var checkLow_stock=inputData.low_stock
var finalLow_stock

if(checkLow_stock==”” || checkLow_stock==null){
finalLow_stock=100000000000
}else{
finalLow_stock=checkLow_stock
}


//width validate
var checkWidth=inputData.width
var finalWidth

if(checkWidth==”” || checkWidth==null){
finalWidth=100000000000
}else{
finalWidth=checkWidth
}


//heightvalidate
var checkHeight=inputData.height
var finalHeight

if(checkHeight==”” || checkHeight==null){
finalHeight=100000000000
}else{
finalHeight=checkHeight
}


//search_keywords validate
var checkSearch_keywords=inputData.search_keywords
var finalSearch_keywords

if(checkSearch_keywords==”” || checkSearch_keywords==null){
finalSearch_keywords =”NoData”
}else{
finalSearch_keywords =checkSearch_keywords
}


//meta_keywordsvalidate
var checkMeta_keywords=inputData.meta_keywords
var finalMeta_keywords

if(checkMeta_keywords==”” || checkMeta_keywords==null){
finalMeta_keywords=”NoData”
}else{
finalMeta_keywords=checkMeta_keywords
}


//meta_description svalidate
var checkMeta_description=inputData.meta_description
var finalMeta_description

if(checkMeta_description==”” || checkMeta_description==null){
finalMeta_description=”NoData”
}else{
finalMeta_description=checkMeta_description
}


//SortOrder validate
var checkSortOrder=inputData.SortOrder
var finalSortOrder

if(checkSortOrder==”” || checkSortOrder==null){
finalSortOrder=100000000000
}else{
finalSortOrder=checkSortOrder
}

/*
//existingCat validate
var checkExistingCat=inputData.existingCat
var finalExistingCat

if(checkExistingCat==”” || checkExistingCat==null){
finalExistingCat=”NoData”
}else{
finalExistingCat=checkExistingCat
}


//unassignCat validate
var checkUnassignCat=inputData.unassignCat
var finalUnassignCat

if(checkUnassignCat==”” || checkUnassignCat==null){
finalUnassignCat=”NoData”
}else{
finalUnassignCat=checkUnassignCat
}

*/

//assignCat validate
var checkAssignCat=inputData.assignCat
var finalAssignCat

if(checkAssignCat==”” || checkAssignCat==null){
finalAssignCat=”NoData”
}else{
finalAssignCat=checkAssignCat
}


//upc validate
var checkUpc=inputData.upc
var finalUpc

if(checkUpc==”” || checkUpc==null){
finalUpc=”NoData”
}else{
finalUpc=checkUpc
}

output = {shipping, modVisible, depth, availability, preOrderDate, preorderOnly, taxClass, customFieldData, finalSKU, finalDescription, finalBin_picking_number, finalBrand_name, finalInventory_tracking, finalCurrent_stock, finalLow_stock, finalWidth, finalHeight, finalSearch_keywords, finalMeta_keywords, finalMeta_description, finalSortOrder, finalAssignCat, finalUpc}

Step 6: After that select, a more code tool for the new Action and choose the language Python to perform the Request action to Post the Product, as well as map all the data (which is coming from the Javascript section) using headers.

Code to use request method:-

import requests
import json

url = “https://api.bigcommerce.com/stores/StoreHash/v3/catalog/products”

Name=str(input_data[‘Name’])
sku=str(input_data[‘sku’])
description=str(input_data[‘description’])
weight=float(input_data[‘weight’])
depth=float(input_data[‘depth’])
width=float(input_data[‘width’])
height=float(input_data[‘height’])
price=float(input_data[‘price’])
bin_picking_number=str(input_data[‘bin_picking_number’])
brand_name=str(input_data[‘brand_name’])
inventory_level=int(input_data[‘current_stock’])
inventory_warning_level=int(input_data[‘low_stock’])
availability=str(input_data[‘availability’])
preOrderDate=str(input_data[‘preorder_release_date’])
#check preorder Boollen
preorderOnly=str(input_data[‘is_preorder_only’])
if preorderOnly == “True”:
    resPreOrderOnly=True
else:
    resPreOrderOnly=None


search_keywords=str(input_data[‘search_keywords’])
meta_description=str(input_data[‘meta_description’])
sortOrder = int(input_data[‘SortOrder’])
upc=str(input_data[‘upc’])
taxClass=int(input_data[‘taxClass’])
#check shipping
shipping=int(input_data[‘shipping’])

if shipping==0:
    mod=False
if shipping==1:
    mod=True

#check  product is_visible
productVisible=int(input_data[‘productVisible’])

if productVisible==0:
    productVisibleMod=False
if productVisible==1:
    productVisibleMod=True

#check product Type
productType=str(input_data[‘Type’])

if productType==”P”:
    type=”physical”
if productType==”D”:
    type=”digital”

#check inventory tracking
inventoy=str(input_data[‘inventory_tracking’])
if inventoy==”No”:
  inventoryData=”none”
elif inventoy==”Yes”:
  inventoryData=”product”
else:
  inventoryData=inventoy

# meta_keywords converting string to array[string]
meta_keywords = str(input_data[‘meta_keywords’])
if meta_keywords != ‘NoData’:
  metaWords = meta_keywords.split(‘,’)
else:
  metaWords=[]


#———-category———–

def remove_matching_values(arr1):
  #set holds non duplicate values
  set1 = set(arr1)
  return list(set1)
#fetching data from sheet to add category to product
addData = str(input_data[‘assign’])
# Split the string into a list of elements
addDataArr = addData.split(‘,’)

arr1 = []
for x in addDataArr:
  if x.isdigit():
    arr1.append(int(x))

# passing parameter
result = remove_matching_values(arr1)



#———-customfields——-
rawCustomData = str(input_data[‘customFields’])

if rawCustomData!=”1″:
  data_list = rawCustomData.split(‘,’)
  rawResult = []
  for item in data_list:
  name, value = item.split(‘:’)
  rawResult.append({‘name’: name, ‘value’: value})
  customData=list(rawResult)
else:
  rawResult = []
  customData=list(rawResult)

#PAYLOAD
rawPayload ={
    “name”: (f'{Name}’),
    “type”: (f'{type}’),
    “sku”: (f'{sku}’),
    “description”: (f'{description}’),
    “weight”: weight,
    “width”: width,
    “depth”: depth,
    “height”: height,
    “price”: price,
    “bin_picking_number”: (f'{bin_picking_number}’),
    “brand_name”: (f'{brand_name}’),
    “inventory_level”: inventory_level,
    “inventory_warning_level”: inventory_warning_level,
    “inventory_tracking”: (f'{inventoryData}’),
    “is_free_shipping”: mod,
    “is_visible”: productVisibleMod,
    “availability”: (f'{availability}’),
    “preorder_release_date”:(f'{preOrderDate}’),
    “is_preorder_only”:resPreOrderOnly,
    “search_keywords”: (f'{search_keywords}’),
    “meta_keywords”: metaWords,
    “meta_description”: (f'{meta_description}’),
    “sort_order”: sortOrder,
    “categories”: result,
    “tax_class_id”: taxClass,
    “upc”:(f'{upc}’),
    “custom_fields”:customData
  }
filtered_payload = {k: v for k, v in rawPayload.items() if v not in (None, “NoData”,[], 100000000000, “”)}
payload=json.dumps(filtered_payload)
headers = {
 ‘X-Auth-Token’: ‘X Auth token’,  # add your AuthToken between ‘’
  ‘Content-Type’: ‘application/json’,
  ‘Accept’: ‘application/json’
}

response1 = requests.request(“POST”, url, headers=headers, data=payload)

Important things 

filtered_payload = {k: v for k, v in rawPayload.items() if v not in (None, “NoData”,[], 100000000000, “”)}

By using this filtered_payload, invalid data will be filtered out and their fields will be removed from the payload.

URL:- Enter the URL of your store 

X-Auth-Token:- Enter your X-Auth-Token

Note:- While entering  the data please do not apply these type of inputs 

None, “NoData”,[], 100000000000, “”   

These types of inputs will create an error.

For Updating the Products (If id exists):-

Step 5: Choose the Webhook tool to get the information about the existing product and map the Id in the query and fill in all the requirements like URL and headers

 And also Select Event as GET

Webhooks Tool:- Webhooks are most commonly used to simplify communication between two applications, but they can also be used to automate Infrastructure-as-code (IaC) workflows and enable GitOps practices.

Step 6: Select the Code tool and JavaScript language to validate the Data and map the columns of the sheet with headers.

Code To Validate The Data:-

// Name validate
var checkName=inputData.Name
var finalName

if(checkName==”” || checkName==null){
finalName=”NoData”
}else{
finalName=checkName
}

//weight  validate
var checkWeight=inputData.Weight
var finalWeight

if(checkWeight==”” || checkWeight==null){
finalWeight=-100000000000
}else{
finalWeight=checkWeight
}

//Price  validate
var checkPrice=inputData.Price
var finalPrice

if(checkPrice==”” || checkPrice==null){
finalPrice=-100000000000
}else{
finalPrice=checkPrice
}

//taxclass(Default Tax Class = P)
var modtaxclass = inputData.Type
var taxClass
var finalType
if(modtaxclass == “D”){
taxClass=10
finalType=”D”
}
else if(modtaxclass == “P”){
taxClass=0
finalType=”P”
}
else{
taxClass=100000000000
finalType=”NoData”
}

// shipping default= no
var mod = inputData.shipping
var shipping
if(mod == “No”){
shipping=0
}
else if(mod==”Yes”){
shipping=1
}
else{
shipping=”NoData”
}

//product Visiblity default=no
var modVisible = inputData.Visible
var Visible
if(modVisible == “No”){
Visible=0
}
else if(mod==”Yes”){
Visible=1
}
else{
Visible=”NoDate”
}

//depth(thickness default=1)
var modDepth = inputData.Depth
var depth
if(modDepth == null){
depth=100000000000
}
else{
depth=modDepth
}

//availability (default=available)
var modavailability = inputData.availabilityData
var availability
var preOrderDate
var preorderOnly
if(modavailability == “No”){
availability=”disabled”
preOrderDate=”NoData”
preorderOnly=”NoData”
}
else if(modavailability==”Yes”){
availability=”available”
preOrderDate=”NoData”
preorderOnly=”NoData”
}
else if(modavailability == null || modavailability==””){
availability=”NoData”
preOrderDate=”NoData”
preorderOnly=”NoData”
}
else{
availability=”preorder”
preOrderDate=modavailability
preorderOnly=”True”
}



//customFields
var modCustomField = inputData.customfields
var customFieldData
if(modCustomField == null || modCustomField == “”){
customFieldData=1
}
else{
customFieldData=modCustomField
}

// SKU validate
var checkSKU=inputData.sku
var finalSKU

if(checkSKU==”” || checkSKU==null){
finalSKU =”NoData”
}else{
finalSKU=checkSKU
}

// Description validate
var checkDescription=inputData.description
var finalDescription

if(checkDescription==”” || checkDescription==null){
finalDescription=”NoData”
}else{
finalDescription=checkDescription
}

// bin_picking_number validate
var checkBin_picking_number=inputData.bin_picking_number
var finalBin_picking_number

if(checkBin_picking_number==”” || checkBin_picking_number==null){
finalBin_picking_number=”NoData”
}else{
finalBin_picking_number=checkBin_picking_number
}


// bin_picking_number validate
var checkBrand_name=inputData.brand_name
var finalBrand_name

if(checkBrand_name==”” || checkBrand_name==null){
finalBrand_name=”NoData”
}else{
finalBrand_name=checkBrand_name
}

//inventory_tracking  validate
var checkInventory_tracking=inputData.inventory_tracking
var finalInventory_tracking

if(checkInventory_tracking==”” || checkInventory_tracking==null){
finalInventory_tracking=”NoData”
}else{
finalInventory_tracking=checkInventory_tracking
}


//current_stock  validate
var checkCurrent_stock=inputData.current_stock
var finalCurrent_stock

if(checkCurrent_stock==”” || checkCurrent_stock==null){
finalCurrent_stock=100000000000
}else{
finalCurrent_stock=checkCurrent_stock
}

//low_stock validate
var checkLow_stock=inputData.low_stock
var finalLow_stock

if(checkLow_stock==”” || checkLow_stock==null){
finalLow_stock=100000000000
}else{
finalLow_stock=checkLow_stock
}


//width validate
var checkWidth=inputData.width
var finalWidth

if(checkWidth==”” || checkWidth==null){
finalWidth=100000000000
}else{
finalWidth=checkWidth
}


//heightvalidate
var checkHeight=inputData.height
var finalHeight

if(checkHeight==”” || checkHeight==null){
finalHeight=100000000000
}else{
finalHeight=checkHeight
}


//search_keywords validate
var checkSearch_keywords=inputData.search_keywords
var finalSearch_keywords

if(checkSearch_keywords==”” || checkSearch_keywords==null){
finalSearch_keywords =”NoData”
}else{
finalSearch_keywords =checkSearch_keywords
}


//meta_keywordsvalidate
var checkMeta_keywords=inputData.meta_keywords
var finalMeta_keywords

if(checkMeta_keywords==”” || checkMeta_keywords==null){
finalMeta_keywords=”NoData”
}else{
finalMeta_keywords=checkMeta_keywords
}


//meta_description svalidate
var checkMeta_description=inputData.meta_description
var finalMeta_description

if(checkMeta_description==”” || checkMeta_description==null){
finalMeta_description=”NoData”
}else{
finalMeta_description=checkMeta_description
}


//SortOrder validate
var checkSortOrder=inputData.SortOrder
var finalSortOrder

if(checkSortOrder==”” || checkSortOrder==null){
finalSortOrder=100000000000
}else{
finalSortOrder=checkSortOrder
}

//existingCat validate
var checkExistingCat=inputData.existingCat
var finalExistingCat

if(checkExistingCat==”” || checkExistingCat==null){
finalExistingCat=”NoData”
}else{
finalExistingCat=checkExistingCat
}


//unassignCat validate
var checkUnassignCat=inputData.unassignCat
var finalUnassignCat

if(checkUnassignCat==”” || checkUnassignCat==null){
finalUnassignCat=”NoData”
}else{
finalUnassignCat=checkUnassignCat
}


//assignCat validate
var checkAssignCat=inputData.assignCat
var finalAssignCat

if(checkAssignCat==”” || checkAssignCat==null){
finalAssignCat=”NoData”
}else{
finalAssignCat=checkAssignCat
}


//upc validate
var checkUpc=inputData.upc
var finalUpc

if(checkUpc==”” || checkUpc==null){
finalUpc=”NoData”
}else{
finalUpc=checkUpc
}

output = {finalName, finalType, finalWeight, finalPrice, shipping, Visible, depth, availability, preOrderDate, preorderOnly, taxClass, customFieldData, finalSKU, finalDescription, finalBin_picking_number, finalBrand_name, finalInventory_tracking, finalCurrent_stock, finalLow_stock, finalWidth, finalHeight, finalSearch_keywords, finalMeta_keywords, finalMeta_description, finalSortOrder, finalExistingCat, finalUnassignCat, finalAssignCat, finalUpc}

After creating the validation test for this action and now we are ready for our final step

Step 7: The final step is to choose a more coding tool to run the request method to update the existing products using Python.

Codes for Process the request to update the product:

import requests
import json

url = “https://api.bigcommerce.com/stores/storehash/v3/catalog/products”

Id=int(input_data[‘Id’])
Name=str(input_data[‘Name’])
sku=str(input_data[‘sku’])
description=str(input_data[‘description’])
weight=float(input_data[‘weight’])
depth=float(input_data[‘depth’])
width=float(input_data[‘width’])
height=float(input_data[‘height’])
price=float(input_data[‘price’])
bin_picking_number=str(input_data[‘bin_picking_number’])
brand_name=str(input_data[‘brand_name’])
inventory_level=int(input_data[‘current_stock’])
inventory_warning_level=int(input_data[‘low_stock’])
availability=str(input_data[‘availability’])
preOrderDate=str(input_data[‘preorder_release_date’])
#check pre order
preorderOnly=str(input_data[‘is_preorder_only’])
if preorderOnly == “True”:
    resPreOrderOnly=True
else:
    resPreOrderOnly=None


search_keywords=str(input_data[‘search_keywords’])
meta_description=str(input_data[‘meta_description’])
sortOrder = int(input_data[‘SortOrder’])
upc=str(input_data[‘upc’])
taxClass=int(input_data[‘taxClass’])
#check shipping
shipping=str(input_data[‘shipping’])

if shipping==’0′:
    mod=False
elif shipping==’1′:
    mod=True
else:
    mod=None

#check  product is_visible
productVisible=str(input_data[‘productVisible’])

if productVisible==’0′:
    productVisibleMod=False
elif productVisible==’1′:
    productVisibleMod=True
else:
    productVisibleMod=None

#check product Type
productType=str(input_data[‘Type’])

if productType==”P”:
    type=”physical”
elif productType==”D”:
    type=”digital”
else:
    type=productType

#check inventory Data
inventoy=str(input_data[‘inventory_tracking’])

if inventoy==”No”:
  inventoryData=”none”
elif inventoy==”Yes”:
  inventoryData=”product”
else:
  inventoryData=inventoy

# meta_keywords converting string to array[string]
meta_keywords = str(input_data[‘meta_keywords’])
if meta_keywords != ‘NoData’:
  metaWords = meta_keywords.split(‘,’)
else:
  metaWords=[]


#———-category———–

def remove_matching_values(arr1, arr2, arr3):
  #set holds non duplicate values
  set1 = set(arr1)
  set2 = set(arr2)
  set3 = set(arr3)
  #removing matching data
  diff = set1.symmetric_difference(set2)
  list1 = list(diff)
  list2 = list(set3)
  #combining data
  combined = set(list1 + list2)
  return list(combined)


#fetching data from BigCom
fetchedData = str(input_data[‘Assignedcategories’])
#fetching data from sheet to remove from category from product
Remove = str(input_data[‘unassign’])
#fetching data from sheet to add category to product
addData = str(input_data[‘assign’])

if fetchedData !=’NoData’:
  fetchedDataArr = fetchedData.split(‘,’)
  # arr1 = fetchedDataArr
  arr1 = []
  for x in fetchedDataArr:
    if x.isdigit():
    arr1.append(int(x))
else:
  arr1 = []
# Split the string into a list of elements

if Remove !=’NoData’:
  removeDataArr = Remove.split(‘,’)
  # arr1 = fetchedDataArr
  arr2 = []
  for x in removeDataArr:
    if x.isdigit():
      arr2.append(int(x))
else:
  arr2 = []

if addData !=’NoData’:
  addDataArr = addData.split(‘,’)
  # arr1 = fetchedDataArr
  arr3 = []
  for x in addDataArr:
    if x.isdigit():
    arr3.append(int(x))
else:
  arr3 = []

# passing parameter
result = remove_matching_values(arr1, arr2, arr3)



#———-customfields——-
rawCustomData = str(input_data[‘customFields’])

if rawCustomData!=”1″:
  data_list = rawCustomData.split(‘,’)
  rawResult = []
  for item in data_list:
  name, value = item.split(‘:’)
  rawResult.append({‘name’: name, ‘value’: value})
  customData=list(rawResult)
else:
  rawResult = []
  customData=list(rawResult)



#PAYLOAD
rawPayload ={
    “id”: Id,
    “name”: (f'{Name}’),
    “type”: (f'{type}’),
    “sku”: (f'{sku}’),
    “description”: (f'{description}’),
    “weight”: weight,
    “width”: width,
    “depth”: depth,
    “height”: height,
    “price”: price,
    “bin_picking_number”: (f'{bin_picking_number}’),
    “brand_name”: (f'{brand_name}’),
    “inventory_level”: inventory_level,
    “inventory_warning_level”: inventory_warning_level,
    “inventory_tracking”: (f'{inventoryData}’),
    “is_free_shipping”: mod,
    “is_visible”: productVisibleMod,
    “availability”: (f'{availability}’),
    “preorder_release_date”:(f'{preOrderDate}’),
    “is_preorder_only”:resPreOrderOnly,
    “search_keywords”: (f'{search_keywords}’),
    “meta_keywords”: metaWords,
    “meta_description”: (f'{meta_description}’),
    “sort_order”: sortOrder,
    “tax_class_id”: taxClass,
    “categories”: result,
    “upc”:(f'{upc}’),
    “custom_fields”:customData
  }
filtered_payload = {k: v for k, v in rawPayload.items() if v not in (None, “NoData”,[], 100000000000, -100000000000.0)}
payload=json.dumps([filtered_payload])
headers = {
  ‘X-Auth-Token’: ‘Your Auth token’, #Enter your Auth token here
  ‘Content-Type’: ‘application/json’,
  ‘Accept’: ‘application/json’
}

response1 = requests.request(“PUT”, url, headers=headers, data=payload)

Important things:

filtered_payload = {k: v for k, v in rawPayload.items() if v not in (None, “NoData”,[], 100000000000, “”, -100000000000.0)}

By using this filtered_payload, invalid data will be filtered out and their fields will be removed from the payload.

URL:- Enter the URL of your store 

X-Auth-Token:- Enter your X-Auth-Token

Note:- While entering  the data please do not apply these types of inputs

None, “NoData”,[], 100000000000, “”, -100000000000.0   

These types of inputs will create an error.

By following these steps, you will be able to create new products and update the existing products in BigCommerce.

You can also find more detailed instructions and tutorials on the Zapier website, as well as in their support center.

Don’t forget, we have a team of BigCommerce experts, so if you ever need support or have any questions, please contact us at manish@bay20.com or call us at +91-8800519180