Built system / further development
Store Reporting.
How I bring orders from several stores into one report

How it works
Orders
The system gathers orders from several stores.
I built a report that gathers orders from several stores each day. First I agreed on how to count sales so the figures could be compared. The system checks that the data is complete and the totals add up before sending. It also prepares a monthly summary.
History and scope of the work
Which orders go into the report?
First I settled where one trading day ends. I use Polish time for every store. The daily report covers yesterday and the monthly report the whole previous month. I leave out cancelled orders and count sales value, orders and units separately. Opening an account does not count as a first purchase.
Separate store versions, shared rules
The Jane Iredale store has a Polish and a Czech version, each with its own part of the report. The same mechanism covers e-Fontanna and can take on further stores. The language of an order decides which version it belongs to. The totals of the parts must match the overall total. Amounts stay in the store’s currency, with no conversion at a rate the data does not contain.
Products and coupons without double counting
The same product in different languages is counted once. The number of line items and the number of units are two separate figures. Discount codes appear in the monthly report: how many orders used a code and what their final value was. The report does not guess the size of the discount.
A wrong report does not go out
Before sending, the system checks that the data is complete, that language and currency match and that the totals agree. If something cannot be explained, the report is not sent. In the demonstration, you can introduce an error on purpose and see this safeguard at work.
Sent is not yet delivered
I prepared the generator for scheduled runs and deployment on Cloud Run. The mechanism tracks delivery states and allows only failed attempts to be retried. “Accepted for sending”, “pending”, and “delivered” represent different stages, so a server response starts delivery tracking rather than completing it.
A clear result for a person
I designed the summaries for clear reading in email and on a phone. They present the period and store first, followed by the details. The same model produces a preview before sending, allowing the layout to be checked without passing data to recipients.
What this work makes possible
The team can start the day with a finished summary. If orders are missing or the totals disagree, the system holds the report back.
When I show the report in public, I use sample orders. The stores’ actual data stays with the clients.