Schedule MacroRIS-SM-2178 – Sales Overview Email

Sales Overview Email

Fetches today’s orders, groups them by sales channel, calculates totals, and sends a formatted daily email report automatically for management and business insights.

Overview

The RIS-SM-2178 – Sales Overview Email macro collects today’s open and processed orders, aggregates them by sales channel, calculates total orders and revenue, generates a formatted HTML report, and sends it via email to designated recipients.

Automates daily sales reporting, providing management with instant channel-wise insights.

Purpose

This macro:

  • Fetches today’s open and processed orders

  • Groups orders by sales channel

  • Calculates total orders and revenue per channel

  • Generates a professional HTML email report

  • Sends the report automatically to recipients

👉 In short:
Provides an automated daily sales summary with channel-wise performance.

When It Runs

Typically used:

  • Scheduled (daily) or manual execution

  • End-of-day reporting

  • Daily automation (cron job)

  • Before business review meetings

  • During financial tracking

Parameters

path
fromEmailstring
Required

Sender email address

path
useSSLbool
Required

Enable/disable SSL

path
ToEmailAddressstring
Required

Recipient email address

Note: These parameters are required to configure and send the email report.

Simple Explanation

The macro collects today’s orders, groups them by sales channel, calculates total orders and revenue, generates an HTML report, and sends it via email automatically.

Step-by-Step Process

Initialize Date Range

Set today’s start and end times to filter orders accurately.

Fetch Open Orders

Use Api.Orders.GetOpenOrders to retrieve all open orders for the day.

Fetch Processed Orders

Use Api.ProcessedOrders.SearchProcessedOrders and GetOrderInfo to retrieve detailed processed orders.

Combine Orders

Merge open and processed orders into a single dataset.

Group by Sales Channel

Aggregate orders by Source (Shopify, Amazon, eBay, etc.) for reporting.

Calculate Metrics

Compute total orders and revenue per channel, as well as grand totals.

Generate Email Body

Build HTML report with logo, date, table, and totals.

Send Email

Use ProxyFactory.SendEmail to deliver the report to the recipients.

Logging & Error Handling

Track execution steps and handle any failures or errors gracefully.

Final Result

A professional daily email report with channel-wise sales summary:

Usefulness

  • Business Insights – Daily visibility of sales performance

  • Channel Performance – Compare different platforms easily

  • Automation – Eliminates manual reporting

  • Decision Support – Supports daily business analysis

  • Professional Output – Clean HTML report for management

Example Scenario

Key Insight

Converts raw order data into structured daily reports, enabling quick decision-making, improving visibility across sales channels, and eliminating manual reporting effort.