Seller Ledger Table

Table name:
pl_ledger_table

Part of the Seller Profit Toolkit, this table is designed to make it easier to leverage Amazon Seller transactions data for profitability analysis at the product/SKU or whole business level. It combines data from the two Seller transactions reports (transactions_standard_orders and transactions_invoiced), transforming this data into a ledger-style table that is well-suited for financial and business analysis of profit performance. It also incorporates ad spend actuals derived from marketing reports (ads_sponsored_products_advertised_product, ads_sponsored_brands_campaign, ads_sponsored_display_advertised_product), allowing Sellers to include advertising costs in profit analysis.

Statistics

Updated: Daily

Backfill: 2 Years

How to use:

The SPT ledger table is easier to use than the transaction tables from which it is sourced. First, all monetary values are contained in a single column (‘amt’) rather than spread across multiple columns. Second, all transaction rows are categorized as to their position on an Amazon P&L report (available via Seller Central export). For instance, one can create a basic  whole-business P&L by month using the following query.

select
apl_category, apl_line_i, sum(amt)
from pl_ledger_table
group by 1,2

‘apl_category’ is the major P&L category, e.g. income or expenses, while apl_line_i is the individual P&L line item, with a letter prefix to allow for sorting that matches the order of the Amazon P&L. The above query can be extended in several ways. You can of course add or filter by date, or by SKU for product-level profitability.

‘Units’ data can be confusing to use within transaction data, and you will generally need to filter for your specific needs when querying for units. For instance, if you wanted to calculate “Net Units Sold” to use as a denominator for per-unit calculations, you could define “units ordered” as [sum(quantity) where TYPE = ‘Order’ and line_item = ‘product_sales’], and subtract from that “units returned” [sum(quantity) where TYPE = ‘Refund’ and line_item = ‘product_sales’].

Data Dictionary

Portal: SC · Report Name: SPT Ledger Table · Table: pl_ledger_table

Column Data Type Description
_created_on timestamp with time zone Date the record was created (from transactions tables)
_last_updated_on timestamp with time zone Date the record was last updated (from transactions tables)
_partneruuid character varying Your Reason Automation account ID
account_type character varying ‘Standard Orders’ or ‘Invoiced Orders’ (indicates whether data comes from the transactions_standard_orders or transactions_invoiced table, respectively
amt double precision The numerical amount for a given line_item
apl_category character varying Top-level category on Amazon P&L, e.g. Income, Expenses (derived)
apl_line character varying Amazon P&L line item classification (derived)
apl_line_i character varying Amazon P&L line item classification (derived), with a letter prefix to optimize sorting
cr_dr character varying Whether the item is a credit or debit
date_time timestamp with time zone Date_time from transactions table(s)
desc_short character varying Summarizes or rolls up information found in the more detailed ‘Description’ column (or derived from elsewhere)
description character varying Full description, as found in transactions tables
fulfillment character varying Fulfillment type (’Amazon’ or ‘Seller’)
id bigint Unique ID number for the row
line_item character varying Usually the original transactions table column name for a given [amt] (e.g. ‘Product_sales’, ‘Refund’, etc.), although may be modified or replaced to facilitate P&L categorization.
line_item_source character varying The original transactions table column name for a given [amt] (e.g. ‘Product_sales’, ‘Refund’, etc.)
marketplace character varying Amazon marketplace
max_s_date timestamp with time zone The latest date-time for a given Settlement ID
min_s_date timestamp with time zone The earliest date-time for a given Settlement ID
order_id character varying Unique order ID of the transaction
pl_key character varying Custom key field (deprecated/null for most clients)
quantity integer Quantity (units), as found in transactions tables
settlement_id character varying The ID of the settlement (payout) associated with a given row
sku character varying Your product SKU, as found in transactions tables
table_source character varying The original table from which data was sourced (e.g. transactions_standard_orders, or an advertising table)
tax_collection_model character varying As found in transactions tables
type character varying Transaction type, e.g. Order, Refund, Service Fee

On this page

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.