Shopify Connector

Shopify Connector

Shopify is an ecommerce platform that allows users to set up an online store to sell their goods. With the Shopify connector for Zoho CRM you can sync data from the Orders and Customers modules of your Shopify store to Zoho CRM by writing custom functions and schedules in Zoho CRM.

Install Shopify Connector

You can either go to the Zoho Marketplace and install the Shopify Connector or log in to your Zoho CRM account and install.

  1. Click Setting > Setup > Marketplace All.
    All the installed extensions are listed. Under All Marketplace you can view all the extensions supported in CRM.
  2. Click All Extensions, browse through for Shopify Connector and click it.
    The details about the extension will be available.
  3. Click InstallNow.
  4. In the following screen, agree to the terms of service and click Install Now.
  5. Click Authorize.
    If you skip in this step, you can authorize the extension later from theShopify Connector Extension Details page.
  6. Specify the Shop Sub Domain of your Shopify account and click Save and Authorize.
    Your shop sub domain is the name you provided for your online store while creating your Shopify account.)
  7. Click Install APP.

Sync Shopify Data with Zoho CRM

After installing and authorizing the Shopify connector, you can create a custom schedule to integrate your shopify data with Zoho CRM every day, as needed. To learn more about creating schedules in Zoho CRM, read more.

Below is an example of a custom function used to add all of the newly created Customers in your shopify account as Contacts in Zoho CRM using the shopifyconnector.customer_after_a_certain_date API.,

requiredFormat=currentDate + "T" + currentTime + "-04:30";
respmap = zoho.crm.invokeConnector("shopifyconnectorextension.sophifyconnector.customer_after_a_certain_date",domainmap);
info resp2;
for each index a in resp2
if(!isNull(firstName)  &&  !isNull(lastName))
createMap.put("First Name",firstName);
createMap.put("Last Name",lastName);
accountMap.put(("Account Name"),lastName + "_" + requiredMap.get("id"));
createMap.put("Description",(("Your Shopify Customer Id is " + requiredMap.get("id")) + " and he accepts_marketing value is ") + requiredMap.get("accepts_marketing"));
if(default_addMap.size()  >  0)
accountMap.put("Billing City",city + "");
accountMap.put("Billing Country",(country) + "");
accountMap.put("Billing Code",zip + "");
accountMap.put("Phone",phone + "");
accountMap.put("Billing State",province + "");
createMap.put("Mailing City",city + "");
createMap.put("Mailing Country",(country) + "");
createMap.put("Mailing Zip",zip + "");
createMap.put("Phone",phone + "");
createMap.put("Mailing State",province + "");
createAccountResp = zoho.crm.create(("Accounts"),accountMap);
info createAccountResp;
crmCreateResp = zoho.crm.create("Contacts",createMap);

You can also add all new orders placed in Shopify store to the Invoice module of Zoho CRM using the following function:

requiredFormat=currentDate + "T" + currentTime + "-04:30";
resultMap = zoho.crm.invokeConnector("shopifyconnectorextension.sophifyconnector.order_after_a_certain_date",domainmap);
info requiredList.size();
for each index ordernumber in requiredList
        //iterate listitems
        for each index a in line_items
            if(isNull(prductid)  ||  prductid.equalsIgnoreCase("null"))
                prductid="_" + prductid;
            productMap.put("Product Name",(linemap.get("title")) + prductid);
            productMap.put("Unit Price",unit_price + "");
            //create product
            productRecordMap = zoho.crm.create("Products",productMap,2);
            line_productMap.put("Product Id",productRecordMap.get("Id"));
            line_productMap.put("List Price",unit_price);
            line_productMap.put("Net Total",(quantity  *  price));
            gtotal=(gtotal  +  quantity  *  price);
        //list item end
        invoiceMap.put("Sub Total",gtotal);
        invoiceMap.put("Grand Total",gtotal);
        //search accountid of the customer
        criteriafield="(Email|=|" + email + ")";
            criteriaMap = zoho.crm.searchRecords("Contacts",criteriafield);
        accmap.put(("Account Name"),company);
        acccriteriafield=(("(Account Name|=|") + company) + ")";
        info "company" + company + "sub" + subject;
            acc_criteriaMap = zoho.crm.searchRecords(("Accounts"),acccriteriafield);
        //create or update contact
        if(criteriaMap.size()  ==  0)
            mymap.put("First Name",firstname);
            mymap.put("Last Name",lastname);
            //create or update account
            if(acc_criteriaMap.size()  ==  0)
                accountsmap = zoho.crm.create(("Accounts"),accmap,2);
            contactmap = zoho.crm.create("Contacts",mymap,2);
                if(acc_criteriaMap.size()  ==  0)
                    accountsmap = zoho.crm.create(("Accounts"),accmap,2);
                updateContact = zoho.crm.updateRecord("Contacts",contactmap.get("CONTACTID"),contactmap);
        info "invoiceMap==" + invoiceMap;
        //create or update invoice
        criteriafield="(Subject|=|" + subject + ")";
        criteriaMap = zoho.crm.searchRecords("Invoices",criteriafield);
        invoiceMap.put("Invoice Date",datestr);
        if(criteriaMap.size()  ==  0)
            criteriaMap2 = zoho.crm.create("Invoices",invoiceMap,2);
            criteriaMap2 = zoho.crm.updateRecord("Invoices",jsonmap.get("INVOICEID"),invoiceMap);

This custom function works as follows:

  • The function fetches all the newly created Orders from Shopify and creates a record in the Invoice module of Zoho CRM. Before creating the new Invoice it checks for the whether the Contact, Account and Product associated with the Invoice are already present in Zoho CRM. If not, it creates a new Contact, Account and Product and map it to the new Invoice. If the record already exists in Zoho CRM, the record will be updated.
  • This verification is done based on the following fields for each module:
    • Contact - Email address
    • Account - Company name
    • Product - Product ID.

In these functions, the line currentDate=(zoho.currentdate.subDay(1)).toString("yyyy-MM-dd"); is used to fetch all data created one day prior to the date of execution. You can modify this time limit according to your requirements. For instance, if you are running the schedule on a weekly basis, change the subDay() value to 7.

When you are running the custom function for the first time after installation, you might want to fetch all the existing data from Shopify. In that case, set this value accordingly and execute the custom function once, then create a daily or weekly schedule. For example, if your Shopify account has data from up to 6 months prior, then set this value as 180and execute the custom function once. Then, create a custom schedule to fetch the data on a daily or weekly basis.


  • The custom functions provided here are samples only. You will be able to write custom functions based on your requirements.
  • This connector supports only Shopify's Orders and Customers modules APIs.

Uninstall Shopify Connector

You can uninstall the Shopify connector extension whenever you wish to. Remember that deleting this extension will delete all its associated data.

To uninstall Shopify Connector

  1. Click Setting > Setup > Marketplace > All.
    All the installed extensions are listed. Under All Marketplace you can view all the extensions supported in CRM.
  2. Browse for Shopify Connector and click the corresponding Uninstall link.
  3. Click OK to confirm.
    The extension will be uninstalled.

Share this post :


Still can't find what you're looking for?

Write to us: