Hello,
What I am looking for is a step by step tut on how to setup a daily email that will be sent to my team showing a specific products performance over the last 24 hours. I would like it to include:
- Product Name
- Total Orders
- Quantity Sold
- Total Revenue
- Total Profit
- Total Abandon Carts
I would like to format this into a table to make it easier on the eyes.
The templates that I have found in Flow do not offer anything similar
Thank you in advance for your assistance.
Thank you for the response but I am having trouble locating some of these attributes. Is there anyway that you could send me a template that I can adjust. Sorry I am new to this.
Hi! Your post is a little dated by now, but in case it helps, here’s how we achieve a similar result with Flow.
This gives our team a general recap of the store’s performance (total sales, total orders, total quantity sold) rather than a specific product’s performance, but it might help you understand the basics and enable you to customize for your needs.
- Trigger: Scheduled Time (set it to today’s date and 11:59pm as the time, then set the Repeat to every day)
- Action: Wait 6 hours (we like to have the email be sent-out at 6am, so our team can read it first thing in the morning)
- Action: Get Order Data (configure as Custom Query and type the following:)
created_at:<='{{ scheduledAt | date: "%Y-%m-%d" }}T05:59:59Z'
AND created_at:>'{{ scheduledAt | date_minus: "1 day" | date: "%Y-%m-%d" }}T00:00:00Z'
- Action: Send internal email (add your recipients email addresses, separating them with a comma, the subject line you want, and the following in the body:)
{% assign total_sales = 0 %}
{% for getOrderData_item in getOrderData %}
{% assign order_total = getOrderData_item.originalTotalPriceSet.presentmentMoney.amount | plus: 0 %}
{% assign total_sales = total_sales | plus: order_total %}
{% endfor %}
{% assign order_count = 0 %}
{% for getOrderData_item in getOrderData %}
{% assign order_count = order_count | plus: 1 %}
{% endfor %}
{% assign total_items_sold = 0 %}
{% for getOrderData_item in getOrderData %}
{% for line_item in getOrderData_item.lineItems %}
{% assign total_items_sold = total_items_sold | plus: line_item.quantity %}
{% endfor %}
{% endfor %}
Hi team,
Here is a recap of yesterday's performance:
Total sales: €{{ total_sales }}
Total orders: {{ order_count }}
Total items sold: {{ total_items_sold }}
Have a nice day!