I have an active Zap that brings a Shopify order into salesforce, creates an opportunity and adds line items, found in pricebook, to the newly created opportunity. The issue is that the item price brought into the opportunity is divided by the quantity of items ordered in shopify. Example, buy 4 units at $3.49 each on shopify - in salesforce it is entered as correct item but price is $.87 ($3.49/4). I want the items ordered in shopify store (quantity and price) to match in salesforce opportunity. Here is the code i have, where i think the error may be:
import re
string = input 'string']
sku = re.findall('\a".*?",\s".*?",\s"(.*?)",\s".*?",\s".*?",\s".*?",\s".*?",\s".*?",\s".*?",\s".*?",\s".*?",\s".*?",\s".*?"\]', string)
quantity = re.findall('\d".*?",\s".*?",\s".*?",\s"(.*?)",\s".*?",\s".*?",\s".*?",\s".*?",\s".*?",\s".*?",\s".*?",\s".*?",\s".*?"\]', string)
price = re.findall('\n".*?",\s".*?",\s".*?",\s".*?",\s"(.*?)",\s".*?",\s".*?",\s".*?",\s".*?",\s".*?",\s".*?",\s".*?",\s".*?"\]', string)
pricebookid = re.findall('\i".*?",\s".*?",\s".*?",\s".*?",\s".*?",\s".*?",\s".*?",\s".*?",\s".*?",\s".*?",\s".*?",\s".*?",\s"(.*?)"]', string)
itemid = re.findall('\f".*?",\s".*?",\s".*?",\s".*?",\s"(.*?)",\s".*?",\s".*?",\s".*?",\s".*?",\s".*?",\s".*?",\s".*?",\s".*?"\]', string)
return {'sku': sku, 'quantity': quantity, 'price': price, 'pricebookid': pricebookid, 'itemid': itemid}