Zoho | How to insert or update Zoho product in Shopify

Author - Webner
28.07.2017
|
0 Comments
||

We can insert or update Zoho CRM product in shopify by creating a custom function in zoho. Below is the custom function which can create a product in shopify. We can invoke it when we create or update a product in Zoho:

void getProductData (int Product_id )
{
response_from_shopify=map();
requestHeader=map();
response = zoho.crm.getRecordById("Products",product_id);
product_title=response.get("Product Name");
baseEncoded = zoho.encryption.base64Encode(username:pass);
//We need to convert username and password in base64 format for authentication in shopify.
json={
  	"product": {
    	"title": product_title,
    	"body_html": "My first product in shopify<\/strong>",
    	"vendor": "Vender_name",
    	"product_type": "product_type",
    	"published": false
  	}}
requestHeader.put("Content-Type","application/json");
requestHeader.put("Authorization","Basic " + baseEncoded);
response_from_shopify=postUrl(("https://Your_shop_name.myshopify.com/admin/products.json"),
json,requestHeader,false);
}
Webner Solutions is a Software Development company focused on developing Insurance Agency Management Systems, Learning Management Systems and Salesforce apps. Contact us at dev@webners.com for your Insurance, eLearning and Salesforce applications.

Leave a Reply

Your email address will not be published. Required fields are marked *