Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
Hi everyone,
I'm pretty now to Flow, been playing around with it abit and like it alot already. Now I am trying to set something up that seems a bit tricky.
When ever an order is created I need to send out internal emails that include basicly almost everything that the client also receives by the "normal" order confirmation mail.
Especially the loop for the ordered products is being some sort of a pain + the fact it's kinda hard to find the suiting variables.
My email template content so far looks like this:
Client: {{order.billingAddress.firstName}} {{order.billingAddress.lastName}} Email: {{order.customer.email}} Order summary: {% for lineItems_item in order.lineItems %} Quantity: {{lineItems_item.quantity}} Product: {{lineItems_item.title}} Variant: {{lineItems_item.variantTitle}} SKU: {{lineItems_item.sku}} Unit Price: {{order.currencyCode}} {{lineItems_item.originalUnitPriceSet.shopMoney.amount}} {% endfor %} Discount used: {{order.discountCode}} Total Price: € {{order.currentTotalPriceSet.shopMoney.amount}} Note: {{order.note}} Shipping adress: {{order.shippingAddress.address1}} {{order.shippingAddress.zip}} {{order.shippingAddress.city}} {{order.shippingAddress.country}} Order Link: https://{{shop.myshopifyDomain}}/admin/orders/{{order.legacyResourceId}}
I guess my idea is so tricky as it should cover orders including
Any help would be highly appreciated!
Kindest regards!
Armin
Aaalright, the results already look pretty good, at least most of the required data is included in the mail. BUT: The formatting of the mail is a mess. Most variables are just aligned after each other in one single line.
Adding <br> after each variable within the loop solved that
Okay, the next challenge:
Our shop is set up so clients can combine discount codes. But my email template only shows one (the first) of the two discounts I used in the testing orders .
Looks like flow only supports one discount code at the moment, right?
In the latest version of the API, there is a new field to more easily support showing lists of discounts codes (since that was made possible recently). Flow will upgrade to the API version in next couple of months. In the meantime, you may have luck using the list in order.discountApplications. You would have to loop over it in liquid like lineItems. One limitation is that I don't believe it would show you the code used (but the discount actually applied).
User | RANK |
---|---|
3 | |
2 | |
2 | |
2 | |
2 |
Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023