Unified Itemized Transactions table

The Unified Itemized Transactions table contains rows of transactional data summarized to the item level, and then coalesced into a single column for each unique combination of order ID and product ID. The order ID is associated with an Amperity ID.

The following diagram shows an example of the Unified Itemized Transactions table (click to view a larger diagram):

An example of the Unified Itemized Transactions data table.

Important

Database tables for transactions must be configured in the following order:

  1. Unified Itemized Transactions (this topic)

  2. Unified Transactions

  3. Transaction Attributes Extended

  4. Transaction Attributes

The Unified Product Catalog table is optional and may be configured for use with building queries, database tables, and other non-audience workflows. Your brand’s product catalog must be integrated into the Unified Itemized Transactions table before you can use product catalog attributes to build audiences, segments, and campaigns.

Add table

The Unified Itemized Transactions table is a required table for the customer 360 database when transactions are available to your tenant and fields have been tagged with txn-items/ semantic tags. The Unified Itemized Transactions table is built from Stitch output and is added automatically.

Define product catalog

Your brand’s product catalog must be joined to the Unified Itemized Transactions table to enable the use of product catalog attributes when building audiences for use with segments and campaigns.

If your brand used the txn-items/ group of semantics to apply tags to fields that define your product catalog, this step happens automatically. If your brand used the pc/ group of semantics, you will need to use SQL to LEFT JOIN your product catalog to the Unified Itemized Transactions table to enable their use within segments and campaigns.

Important

The Unified Product Catalog table represents the taxonomy for your products and brands. Attributes are added to the Unified Product Catalog table when pc/ semantic tags are applied to your data sources. All pc/ semantic tags are optional. Use the ones that best define the shape of your product catalog and best describe the individual items within it. The product ID is used as an input to AmpIQ predictive modeling.

Column reference

The Unified Itemized Transactions table contains the following columns:

Column name

Data type

Description

Amperity ID

String

The unique identifier that is assigned to clusters of customer records that all represent the same individual. The Amperity ID does not replace primary and foreign keys, but exists alongside them within unified profiles.

Note

The Amperity ID is a universally unique identifier (UUID) that is represented by 36 characters spread across five groups separated by hyphens: 8-4-4-4-12.

For example:

123e4567-e89b-12d3-a456-426614174000

Customer ID

String

A custom semantic tag that is applied to interaction records to identify a field that is used in downstream processes to associate interaction records to the Amperity ID.

A customer ID may appear once for each unique order ID in the itemized transactions table.

Note

A namespaced foreign key may be used instead of (or in addition to) a customer ID.

Values in this column depend on fields that are tagged with the txn-item/customer-id semantic or a foreign key.

Also in: Unified Transactions

Currency

String

Currency represents the type of currency that was used to pay for an item. For example: dollar.

Note

Currency must be consistent across all orders from the same data source.

Values in this column depend on fields that are tagged with the txn-item/currency semantic.

Digital Channel

String

The digital channel through which a transaction was made. For example: Facebook, Google Ads, email, etc.

Note

This column should only have values when purchase-channel specifies an online channel.

Values in this column depend on fields that are tagged with the txn-item/digital-channel semantic.

Is Cancellation

Boolean

A flag that indicates if the item was cancelled.

Values in this column depend on fields that are tagged with the txn-item/is-cancellation semantic.

Important

This value should be TRUE when items are canceled and FALSE when items are purchases and NULL when the value is unknown.

Is Return

Boolean

This column is input to AmpIQ predictive modeling.

A flag that indicates if the item was returned.

Values in this column depend on fields that are tagged with the txn-item/is-return semantic.

Important

This value should be TRUE when items are returns and FALSE when items are purchases and NULL when the value is unknown.

Item Cost

Decimal

Item cost is the cost to produce all units of an item.

Note

This value must be greater than or equal to 0 for purchases, but less than or equal to 0 for returns or cancellations.

Values in this column depend on fields that are tagged with the txn-item/item-cost semantic.

Item Discount Amount

Decimal

Item discount amount is the discount amount that is applied to all units that are associated with a single item within a single transaction.

This value should equal item quantity multiplied by unit discount amounts.

This value is used by Amperity for discount sensitivity analysis.

Note

This value must be greater than or equal to 0 for purchases, but less than or equal to 0 for returns or cancellations.

Values in this column depend on fields that are tagged with the txn-item/item-discount-amount semantic.

Item Discount Percent

Decimal

Item discount percent is the percentage discount that is applied to all units that are associated with a single item within a single transaction.

This value is used by Amperity for discount sensitivity analysis.

Note

This value must be between 0 and 1.

Values in this column depend on fields that are tagged with the txn-item/item-discount-percent semantic.

Item List Price

Decimal

Item list price is the manufacturer’s suggested retail price (MSRP) for all units of this item.

The manufacturer’s suggested retail price (MSRP) is the price before shipping costs, taxes, and/or discounts have been applied. MSRP is sometimes referred to as the base price.

This value should equal item revenue plus item discount amount.

Note

This value must be greater than or equal to 0 for purchases, but less than or equal to 0 for returns or cancellations.

Values in this column depend on fields that are tagged with the txn-item/item-list-price semantic.

Item Profit

Decimal

Item profit represents the amount of profit that is earned when all units of an item are sold.

Note

This value must be greater than or equal to 0 for purchases, but less than or equal to 0 for returns or cancellations.

Values in this column depend on fields that are tagged with the txn-item/item-profit semantic.

Item Quantity

Integer

This column is input to AmpIQ predictive modeling.

Item quantity is the total number of items in an order. When an item has been returned or an order has been cancelled, item quantity is the total number of items that were returned and/or cancelled.

Note

This value must be less than or equal to 0 when is-return or is-cancellation are true.

Values in this column depend on fields that are tagged with the txn-item/item-quantity semantic.

Item Revenue

Decimal

This column is input to AmpIQ predictive modeling.

The total revenue for all units of an item, after discounts are applied. When an item has been returned or the order has been cancelled, the total revenue for all items that were returned and/or cancelled.

This value should equal item quantity multiplied by unit revenue.

Note

This value must be less than or equal to 0 when is-return or is-cancellation are true.

Tip

A return or cancellation is stored as a separate record in the Unified Itemized Transactions table and is identified by a value of true in the Is Return or Is Cancellation column.

Values in this column depend on fields that are tagged with the txn-item/item-revenue semantic.

Item Subtotal

Decimal

An item subtotal is the amount for an item, before discounts are applied.

This value should equal unit list price times item quantity.

This value is used by Amperity for discount sensitivity analysis.

Note

This value must be greater than or equal to 0 for purchases, but less than or equal to 0 for returns or cancellations.

Values in this column depend on fields that are tagged with the txn-item/item-subtotal semantic.

Item Tax Amount

Decimal

An item tax amount is the total amount of taxes that are associated with the purchase of an item.

Note

This value must be greater than or equal to 0 for purchases, but less than or equal to 0 for returns or cancellations.

Values in this column depend on fields that are tagged with the txn-item/item-tax-amount semantic.

Order Datetime

Datetime

This column is input to AmpIQ predictive modeling.

Order datetime is the date (and time) on which an order was placed.

Note

Other dates associated with an order that are not specific to a transactions, such as dates associated with hotel stays and reservations, should be added to the Unified Product Catalog table.

When Is Return is TRUE, the date and time on which the order was returned.

When IS Cancellation is TRUE, the date and time on which the order was cancelled.

Values in this column depend on fields that are tagged with the txn-item/order-datetime semantic.

This column is used to calculate the following transaction attributes:

  • First Order Datetime

  • Latest Order Datetime

  • Second Order Datetime

Also in: Unified Transactions

Order Discount Amount

Decimal

This column is input to AmpIQ predictive modeling.

Order discount amount is the total discount amount that is applied to the entire order.

Note

This value must be greater than or equal to 0 for purchases, but less than or equal to 0 for returns or cancellations.

Caution

This value should match the customer’s definition of an order-level discount. For example, some customers associate this value to order value, whereas others associate this value to a subtotal. Use domain SQL to update this field for the desired calculation.

Also in: Unified Transactions

Order ID

String

This column is input to AmpIQ predictive modeling.

An order ID is the unique identifier for the order and links together all of the items that were part of the same transaction. When an item has been returned or when an order has been cancelled, the order ID is the unique identifier for the original order, including the returned or cancelled items.

This field is often the primary key and associated with the pk semantic tag.

Note

For data that contains itemized transactions, where a single transaction includes more than one of the same item, the order ID will appear more than once.

Note

The order ID should never change, even when an item in the order is returned or cancelled.

Caution

If order IDs are recycled and/or are otherwise not guaranteed to be unique over time, the unique identifier for the order must be updated to be a combination of the order ID and the date on which the order occurred. This must be done using domain SQL similar to: CONCAT(order_id, order_date).

Values in this column depend on fields that are tagged with the txn-item/order-id semantic. The combination of Order ID and Product ID must be unique for each row in this table.

This column is used to calculate the following transaction attributes:

  • First Order ID

  • L30D Average Num Items

  • L30D Average Order Value

  • L30D Order Frequency

  • Latest Order ID

  • lifetime Average Num Items

  • Lifetime Average Order Value

  • Lifetime Order Frequency

  • Second Order ID

Also in: Unified Transactions

Payment Method

String

A payment method is how a customer chose to pay for the items they have purchased. For example: credit card, gift card, or cash.

Values in this column depend on fields that are tagged with the txn-item/payment-method semantic.

Product Catalogs

String

Optional

Product catalog fields are added to the Unified Itemized Transactions table in two ways, depending on the approach your tenant used for defining your product catalog:

  1. When data sources use txn-item/ product catalog semantic tags.

  2. When product catalog fields are joined from the Unified Product Catalog table. Refer to the section in this topic about the columns that are available to product catalogs.

Important

The names of the columns that are available for product catalogs are identical. For example: Product Brand, Product Category, and Product Gender. The difference is the outcome of the approach your tenant used to define your product catalog within Amperity.

Product ID

String

This column is input to AmpIQ predictive modeling.

The unique identifier for a product.

A stock keeping unit (SKU) is an identifier that captures all of the unique details of any individual product, including specific attributes that differentiate by color, size, material, and so on.

For example, a shirt with the same color and material, but with three different sizes would be represented by three unique SKUs and would also be represented by three unique product IDs.

Note

For data that contains itemized transactions, where a single transaction includes more than one of the same product, the product ID will appear more than once.

Caution

Every customer has their own definition for SKUs and product IDs. Be sure to understand this definition before applying semantic tags to fields with product IDs to ensure they accurately reflect the customer’s definition.

Values in this column depend on fields that are tagged with the txn-item/product-id semantic. The combination of Order ID and Product ID must be unique for each row in this table; product quantity is counted using Item Quantity.

Important

This column is recommended when using a product catalog. A product catalog is a requirement for certain predictive features of AmpIQ, such as for product affinity and audience sizes.

Purchase Brand

String

The brand for which a transaction was made.

Note

This column should only have values when interaction records contain transactions data for more than one brand.

Values in this column depend on fields that are tagged with the txn-item/purchase-brand semantic.

This column is used to calculate the following transaction attributes: Multi Purchase Brand.

Purchase Channel

String

This column is input to AmpIQ predictive modeling.

A purchase channel is the channel from which a transaction was made. For example: in-store or online.

Values in this column depend on fields that are tagged with the txn-item/purchase-channel semantic.

Store ID

String

A store ID is a unique identifier that is identified with the location of a store.

Values in this column depend on fields that are tagged with the txn-item/store-id semantic.

Unit Cost

Decimal

Unit cost is the cost to produce a single unit of one item.

Note

This value must be greater than or equal to 0 for purchases, but less than or equal to 0 for returns or cancellations.

Values in this column depend on fields that are tagged with the txn-item/unit-cost semantic.

Unit Discount Amount

Decimal

Unit discount amount is the discount amount that is applied to a single unit of one item.

This discount is often applied to all units of the same item within a single transaction.

This value is used by Amperity for discount sensitivity analysis.

Note

This value must be greater than or equal to 0 for purchases, but less than or equal to 0 for returns or cancellations.

Values in this column depend on fields that are tagged with the txn-item/unit-discount-amount semantic.

Unit List Price

Decimal

Unit list price is the manufacturer’s suggested retail price (MSRP) for a single unit of an item.

The manufacturer’s suggested retail price (MSRP) is the price before shipping costs, taxes, and/or discounts have been applied. MSRP is sometimes referred to as the base price.

This value should equal the unit discount amount plus the unit subtotal.

Note

This value must be greater than or equal to 0 for purchases, but less than or equal to 0 for returns or cancellations.

Values in this column depend on fields that are tagged with the txn-item/unit-list-price semantic.

Unit Profit

Decimal

Unit profit represents the amount of profit that is earned when a single unit of an item is sold.

Note

This value must be greater than or equal to 0 for purchases, but less than or equal to 0 for returns or cancellations.

Values in this column depend on fields that are tagged with the txn-item/unit-profit semantic.

Unit Revenue

Decimal

The total revenue for a single unit of an item. When an item has been returned or the order has been cancelled, the total revenue for a single unit of an item that was returned and/or cancelled.

Note

This value must be less than or equal to 0 when is-return or is-cancellation are true.

Values in this column depend on fields that are tagged with the txn-item/unit-revenue semantic.

Unit Subtotal

Decimal

A unit subtotal is the amount for a single unit of one item, before discounts have been applied.

This value is used by Amperity for discount sensitivity analysis.

Note

This value must be greater than or equal to 0 for purchases, but less than or equal to 0 for returns or cancellations.

Values in this column depend on fields that are tagged with the txn-item/unit-subtotal semantic.

Unit Tax Amount

Decimal

A unit tax amount is the total amount of taxes that are associated with a single unit.

Note

This value must be greater than or equal to 0 for purchases, but less than or equal to 0 for returns or cancellations.

Values in this column depend on fields that are tagged with the txn-item/unit-tax-amount semantic.

Custom attributes

Varies

You may extend the Unified Itemized Transactions table to define custom attributes for use with a product catalog.

Important

This column is recommended when using a product catalog. A product catalog is a requirement for certain predictive features of AmpIQ, such as for product affinity and audience sizes.

Add custom attributes to the Unified Itemized Transactions table by extending it to add columns that support using a product catalog. Custom attributes should include the columns to which product catalog semantic tags were applied, but may include additional custom attributes that are unique to your tenant and your brands.

Important

The Unified Product Catalog table represents the taxonomy for your products and brands. Attributes are added to the Unified Product Catalog table when pc/ semantic tags are applied to your data sources. All pc/ semantic tags are optional. Use the ones that best define the shape of your product catalog and best describe the individual items within it. The product ID is used as an input to AmpIQ predictive modeling.