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
Hi Armin,
I tried to implement your template in a flow internal email but I get the following error:
"order" is invalid. Replace this variable.
Have you had to edit this template since implementing it?
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).
Hi Paul,
I'm trying to implement the template used by the op but I get the following error message:
This is the code I'm using in my internal email that's working:
{% for lineItems_item in fulfillmentOrder.lineItems %}
{{lineItems_item.totalQuantity}}
{% endfor %}
{% for lineItems_item in fulfillmentOrder.order.lineItems %}
{% for variants_item in lineItems_item.product.variants %}
{{variants_item.barcode}}
{% endfor %}
{% endfor %}
I would like to have the quantity of each line item listed next to the barcode of the line item the quantity refers to. Is this possible? At the moment the quantity sits above the barcodes so it's not clear as to which barcode/line item the quantity is referring to.
The main issue here is that the API doesn't have a way to get to the product information from the fulfillment order line items. That is being added in a future version, but isn't available yet.
Short term, you could try to merge the lists using Run code, which is way better at list handling than liquid. But it requires using JavaScript.
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024