Transaction counts and returns
Customer Transaction Count is calculated as a distinct count of Transaction IDs. Standard transaction item sub-types are “Shipped” and “Returned”. Additional sub-types such as “Demand” or “Canceled” must be added only if there are clear use cases for these sub-types. Ideally “Shipped” and “Returned” lines of the same purchase must have the same Transaction ID. If so, all the transaction lines linked to the same Transaction ID are counted under the same transaction. Otherwise, they create different transactions and increase the transaction count separately.
Base scenario - a customer makes a purchase on January 1, 2023 and spends $125
The following conditions apply to the base scenario:
- Customer makes a transaction on January 1, 2023 and purchases two products, T-Shirt and Short.
- The product number for T-Shirt is AF93 and the product number for Short is AC04.
- Customer purchases 2 T-Shirts (AF93) for $100 and 1 Short (AC04) for $25.
- Customer spends $125 in total.
| Master Customer Number | Transaction Date | Source Transaction Number | Subtype | Source Transaction Line Number | Transaction Date Line | Source Product Number | Product Quantity | Sales Revenue |
|---|
| XXX | 1/1/23 | 1234567 | Shipped | 1234567_AF93_Shipped | 1/1/23 | AF93 | 2 | $100 |
| XXX | 1/1/23 | 1234567 | Shipped | 1234567_AC04_Shipped | 1/1/23 | AC04 | 1 | $25 |
Results of the base scenario
The following table displays the resulting counts and revenue related to the base scenario:
| Parameter | Number | Description |
|---|
| Buyer Count | 1 | (Customer Number) |
| Transaction Count | 1 | (# of distinct Master Customer Number) |
| Transaction Line Count | 2 | (# of distinct Source Transaction Line Number) |
| Product Quantity | 3 | (Total of Product Quantity) |
| Item Count | 2 | (# of distinct Source Product Number) |
| Total Revenue | $125 | (Total of Sale Revenue) |
Scenario #1 with full return
In this scenario, the customer returns all products that were added into the original transactions on January 5, 2023. Client order system links all returns to the original transaction.
| Master Customer Number | Transaction Date | Source Transaction Number | Subtype | Source Transaction Line Number | Transaction Date Line | Source Product Number | Product Quantity | Sales Revenue |
|---|
| XXX | 1/1/23 | 1234567 | Shipped | 1234567_AF93_Shipped | 1/1/23 | AF93 | 2 | $100 |
| XXX | 1/1/23 | 1234567 | Shipped | 1234567_AC04_Shipped | 1/1/23 | AC04 | 1 | $25 |
| XXX | 1/1/23 | 1234567 | Returned | 1234567_AF93_Returned |
Scenario #2 with partial return
In this scenario, the customer returns 1 T-Shirt (ABC) and 1 Short on January 5, 2023, and keeps 1 T-Shirt. Client order system links all returns to the original transaction.
| Master Customer Number | Transaction Date | Source Transaction Number | Subtype | Source Transaction Line Number | Transaction Date Line | Source Product Number | Product Quantity | Sales Revenue |
|---|
| XXX | 1/1/23 | 1234567 | Shipped | 1234567_AF93_Shipped | 1/1/23 | AF93 | 2 | $100 |
| XXX | 1/1/23 | 1234567 | Shipped | 1234567_AC04_Shipped | 1/1/23 | AC04 | 1 | $25 |
| XXX | 1/1/23 | 1234567 | Returned | 1234567_AF93_Returned | 5/1/23 |
Scenario #3 with partial return
In this scenario, the customer returns 1 T-Shirt (ABC) and 1 Short January 5, 2023, and keeps 1 T-Shirt. Client order system creates a separate transaction for returns.
| Master Customer Number | Transaction Date | Source Transaction Number | Subtype | Source Transaction Line Number | Transaction Date Line | Source Product Number | Product Quantity | Sales Revenue |
|---|
| XXX | 1/1/23 | 1234567 | Shipped | 1234567_AF93_Shipped | 1/1/23 | AF93 | 2 | $100 |
| XXX | 1/1/23 | 1234567 | Shipped | 1234567_AC04_Shipped | 1/1/23 | AC04 | 1 | $25 |
| XXX | 1/1/23 | 987654 | Returned | 987654_AF93_Shipped |
Scenario #4 with product and order discounts, and a product return
In this scenario, all products are shipped on Day 1, one product has a discount of $10, the whole order has a $5 discount, and one product is returned on Day2.
The transaction feed does not need to be updated, since neither the customer nor the date of the initial transaction changed. However, the transaction item needs to reflect those changes. Note that those changes will be represented incrementally and only the new/updated lines will be shown. You can provide either the increment as shown in each case or provide a full history every time, but you should follow the same conventions.
The transaction-level discount will be spread evenly between the two items in the transaction in this example, but you can spread discounts based on the relative price of each item, or other means.
Feed: TransactionItem
Day 1
| SourceTransactionItemNumber | SourceTransactionNumber | Type | SubType | InvoiceDate | ShipDate | ListPrice | Discount | SaleRevenue | SourceProductNumber | Quantity | DateCreated |
|---|
Transactions including “Demand” and “Cancel” Transaction Item data sub-types
As a reminder, standard Transaction Item sub-types are “Shipped” and “Returned”. Additional sub-types like “Demand” or “Canceled” should be added only if there are clear use cases for these sub-types.
Storing “Demand” and “Cancel” transaction sub-types may introduce the risk of double-counting data from “Demand” and “Shipped” lines. The best way to avoid double-counting is to consider “Shipped” and “Returned” for the summary measures.
Scenario #5 with partial order cancelation
In this scenario, an order is placed on Day 0, one product is canceled on Day 1, and one product is shipped on Day 2.
The transaction feed does not need to be updated, since neither the customer nor the date of the initial transaction changed. However, the transaction item needs to reflect those changes. Note that those changes will be represented incrementally and only the new/updated lines will be shown. You can provide either the increment as shown in each case, or provide a full history every time, but you should follow the same conventions.
Feed: TransactionItem
Day 0
| SourceTransactionItemNumber | SourceTransactionNumber | Type | SubType | InvoiceDate | ShipDate | SaleRevenue | SourceProductNumber | Quantity | DateCreated |
|---|
| ABC1-Demand | ABC | Purchase | Demand | Day0 | | 10 | P1 | 1 | Day0 |
| ABC2-Demand |
Scenario #4 with product and order discounts, and a product return
In this scenario, all products are shipped on Day 1, one product has a discount of $10, the whole order has a $5 discount, and one product is returned on Day2.
The transaction feed does not need to be updated, since neither the customer nor the date of the initial transaction changed. However, the transaction item needs to reflect those changes. Note that those changes will be represented incrementally and only the new/updated lines will be shown. You can provide either the increment as shown in each case or provide a full history every time, but you should follow the same conventions.
The transaction-level discount will be spread evenly between the two items in the transaction in this example, but you can spread discounts based on the relative price of each item, or other means.
Feed: TransactionItem
Day 1
| SourceTransactionItemNumber | SourceTransactionNumber | Type | SubType | InvoiceDate | ShipDate | ListPrice | Discount | SaleRevenue | SourceProductNumber | Quantity | DateCreated |
|---|
| ABC1-Shipped | ABC | Purchase | Shipped | Day0 | Day1 | 10 | 2.5 | 7.5 | P1 | 1 | Day1 |
| ABC2-Shipped | ABC | Purchase | Shipped | Day0 | Day1 | 30 | 12.5 | 17.5 | P2 | 1 | Day1 |
Day 2
| SourceTransactionItemNumber | SourceTransactionNumber | Type | SubType | InvoiceDate | ShipDate | ListPrice | Discount | SaleRevenue | SourceProductNumber | Quantity | DateCreated |
|---|
| ABC1-Returned | ABC | Purchase | Returned | Day0 | Day2 | -10 | -2.5 | -7.5 | P1 | -1 | Day2 |
Scenario #5 with partial order cancelation
In this scenario, an order is placed on Day 0, one product is canceled on Day 1, and one product is shipped on Day 2.
The transaction feed does not need to be updated, since neither the customer nor the date of the initial transaction changed. However, the transaction item needs to reflect those changes. Note that those changes will be represented incrementally and only the new/updated lines will be shown. You can provide either the increment as shown in each case, or provide a full history every time, but you should follow the same conventions.
Feed: TransactionItem
Day 0
| SourceTransactionItemNumber | SourceTransactionNumber | Type | SubType | InvoiceDate | ShipDate | SaleRevenue | SourceProductNumber | Quantity | DateCreated |
|---|
| ABC1-Demand | ABC | Purchase | Demand | Day0 | | 10 | P1 | 1 | Day0 |
| ABC2-Demand | ABC | Purchase | Demand | Day0 | | 30 | P2 | 1 | Day0 |
Day 1
| SourceTransactionItemNumber | SourceTransactionNumber | Type | SubType | InvoiceDate | ShipDate | SaleRevenue | SourceProductNumber | Quantity | DateCreated |
|---|
| ABC1-Canceled | ABC | Purchase | Canceled | Day0 | Day1 | -10 | P1 | -1 | Day1 |
Day 2
| SourceTransactionItemNumber | SourceTransactionNumber | Type | SubType | InvoiceDate | ShipDate | SaleRevenue | SourceProductNumber | Quantity | DateCreated |
|---|
| ABC2-Shipped | ABC | Purchase | Shipped | Day0 | Day2 | 30 | P2 | 1 | Day2 |
Results of scenario #3 with partial return
The following table displays the resulting counts and revenue related to scenario #3:
| Parameter | Number | Description |
|---|
| Buyer Count | 1 | (Customer Number) |
| Transaction Count | 2 | (# of distinct Master Customer Number) |
| Transaction Line Count | 4 | (# of distinct Source Transaction Line Number) |
| Product Quantity | 1 | (Total of Product Quantity) |
| Item Count | 2 | (# of distinct Source Product Number) |
| Total Revenue | $50 | (Total of Sale Revenue) |
In this table:
- Transaction Count is 2 because the Client order system creates a separate transaction for returns.
- Transaction Line Count is 4 because there are two Transaction Lines per transaction (Source Transaction Number).
- Product Quantity is 1 because the customer retained 1 T-Shirt.
In the following use cases, only the relevant feeds, lines, and columns are shown. Additionally, columns shown may or may not include all “required” columns from the feeds. To confirm which columns are required, refer to the documentation specific to each feed.
In the following use cases, only the relevant feeds, lines, and columns are shown. Additionally, columns shown may or may not include all “required” columns from the feeds. To confirm which columns are required, refer to the documentation specific to each feed.