0 sales may decide a listing is dead and delete it. So when Alura doesn’t know a number, the API returns null and adds a notice that says why. It never returns 0 for a number it doesn’t know.
A 0 in a response is a real zero. A null is unknown. Two cases to know:
- Revenue with no sales. A listing that sold nothing in a covered period shows
revenueas{"amount": null, "currency": null, "usd": "0.00"}. Theusdvalue is the real zero;amountandcurrencyare null only because no sale gave a currency of sale. The sameamount: nullwith ausdvalue means sales in more than one currency. - Shop stats from the payment ledger may hold some zeros Alura can’t tell from real ones, from before a ledger-sync fix. See Shop stats.
A shop’s sales coverage
Sales numbers come from Alura’s daily sales data, built from your shop’s orders after each sync. Each shop has a coverage window: the days for which that data is complete. Read it on the shop:Response
coverage is null when the shop isn’t covered yet, with a sales_not_covered notice. Alura builds sales data shop by shop, so a newly connected shop, or one Alura hasn’t reached yet, starts uncovered. A shop also becomes uncovered for a while when Alura finds an order it can’t date.
A gap day is a day Alura knows it can’t count right: an order whose stored copy differs from Etsy’s, an order with no items stored, a refund Alura can’t assign to an item, or an order Etsy no longer returns. Only gap days inside the window count. Alura stores no sales for a gap day, so any total that includes one would be short.
What is null, and the notice that says so
Each kind of number has its own rule. All of them name the shops concerned in the notice’sshop_ids.
Listing sales and sorts
- A listing’s
period(units, orders and revenue overperiodorfrom/to) needs the whole period covered: fromsales_fromthroughsales_through, with no gap day. If one day is missing, the wholeperiodisnull. 29 of 30 days isn’t enough.sales_not_coverednames the shop. - A listing’s
sales(all its sales sincesales_from) isnullwhen the shop isn’t covered, has any gap day, or Alura hasn’t finished re-adding its totals after new orders arrived.sales_not_coverednames the shop. - The sales sorts (
units,revenue,ordersandtrending) leave out the listings of shops that don’t cover the period, and name those shops insales_not_covered.trendingneeds the period before it covered too. See Trending listings. - An unknown input. When an order line Alura stored has an unknown quantity or price, every number it would feed is
null, never a smaller sum, and anunknown_sales_inputsnotice names the listings.
Sales filters
has_sales_since and no_sales_since find listings that did or didn’t sell since a date. “No sale since March” is only true if every day since March is known, so the filters refuse to guess. They answer 400 sales_window_not_covered for the first shop, in shop ID order, that can’t answer. Its reason says why:
Narrow the call to other shops with
shop_id, or pick a date inside the window. When the filters do answer, each shop is read through its own last complete day, and a sales_through notice states that day.
Stats over a range
Listing stats and shop stats serve a range that is only partly covered. They total the days they know and say which they don’t:partial_rangemeans part of the range isn’t covered or holds days Alura doesn’t know. A point inserieswith no known day, or with a gap day, isnull. Shop stats name the missing days in each notice’smissing.sales_not_coveredon listing stats means no day of the range is covered. The sales totals arenull. When the shop has no sales coverage at all,seriesisnulltoo. When the shop is covered but the range lies outside its coverage,serieskeeps its points, with each sales valuenulland the reviews still counted.refunds_partialmeans refunds are known only throughrefunds_through, before the end of the range. A refund point whose period runs past that day isnull, not a short month.
no_financials_row for a day inside coverage whose financials row is missing, and metric_unavailable for a metric whose stored value is missing on some days. See Shop stats and Listing stats.
Old data
Every list names shops whose data is more than 7 days old in astale_shops notice. Stale data is still real data, as of its as_of. Start a sync to bring it up to date.
When the numbers fill in
- A shop that isn’t covered gets its window once Alura’s sales data reaches it. Until then its sales numbers stay
null. sales_throughmoves forward after syncs, as Alura completes each day. A period that ends after it isnulluntil it does.- A gap day clears once Alura has stored the orders behind it correctly again.
refunds_throughmoves forward on the syncs that confirm refunds, so it can lag behindsales_through.
null that later turns into a number is expected. A made-up 0 could never be told apart from a real one afterwards, so the API doesn’t return one.
Next steps
Connect and sync
Start a sync, and fix a shop that needs reconnecting.
Listing stats
How a listing’s units, orders and revenue are counted.
Shop stats
Revenue, costs and profit from the payment ledger.