Skip to main content

I have created a zap that triggers when an invoice is noted as “Paid” in Zoho Invoice, to then send that as an order to Shopify for fulfillment.

The issue is, the line items are not mapping properly to my Shopify SKUs, so the order is created for items that don’t exist.

I’ve tried this fix, but the action to find product/variant by title fails to find a product in Shopify. This happens if I try using the SKU numbers and the product names.

Any help/ guidance would be greatly appreciated! I feel like I’m (___) this close to getting this to work.

Hi @kleibeauty 

Unfortunately, the Find Product by Title step only works if you have 1 product you are searching for. If you are searching for multiple products you would need to use that action multiple times which would be a bit cumbersome… 

One option that you could try would be to use a Code step to translate the product names (or SKUS) to their Shopify Product IDs.. this is a bit advanced and takes some set up but the code is added below. You would map either the product name or the sku into the input field (just pick 1, dont map both)

Then in the variable labeled lookup_table you would map the product name or sku (whichever is mapped for the input) on the left hand side of the colon and the corresponding product id on the right hand side of the colon. 
 

let lookup_table = {
"{{PRODUCT NAME OR SKU}}": "{{SHOPIFY PRODUCT ID}}",
"{{PRODUCT 2 NAME OR PRODUCT 2 SKU}}": "{{SHOPIFY PRODUCT 2 ID}}",
}

let inputted_products = inputData.product_name_or_sku.split(",");

let shopify_product_ids = inputted_products.map(product => {
return lookup_table_product]
})

return {shopify_product_ids}



 


Thank you! In that table, I entered each SKU and corresponding Shopify product ID. The javascript ran successfully, but the result is showing as “null”. Screenshots are attached.

 


The curly brackets were just a placeholder to show where the values go. Please remove them leaving only the actual values inside the “”.. so like 


“BMB1002”: "7897289785596",


Hi @kleibeauty!

Just wanted to check in to see if you managed to get your Zap working, based on what GetUWired said above (or using some other method). Please let us know whether you still need help :)


I did, with some help from Zapier Support.

I had to do the following:

  • Create a variant for each of my SKUs in Shopify (I created size variants)
  • Create a Utilities Table that matches the SKU (left side value) to the Shopify Product ID (right hand side). Lookup key is the SKU info from Zoho invoice.
  • Create a second Utilities Table that matches the SKU (left side value) to the Shopift Variant ID (right hand side). Lookup key is the SKU info from Zoho invoice.

In the “Create Order in Shopify” action, “Product” is mapped to the Shopify Product ID table, and “Product Variant” is mapped to the Shopify Variant ID table.

 

A little involved, but not that complex to set up.

 


@kleibeauty great to hear you got that sorted!

Also, thanks for describing the process, as I’m sure you’re not the only person looking to do this :)