Copy
Ask AI
version: 2
models:
- name: fct_refunds_processed
description: >
Refund transaction fact table for revenue adjustments and return analytics. Grain: One row per sm_refund_line_key. Date field: refunded_at_local_datetime. Critical filters: source_system for platform-specific refund reporting; refunded_at_local_datetime for temporal analysis. Key joins: dim_order_lines via sm_order_line_key (many:1); dim_orders via sm_order_key (many:1).
columns:
- name: _synced_at
description: >
UTC timestamp when SourceMedium last synced the row. Freshness indicator only; not for time-series analysis.
- name: order_duty_refunds
description: >
The amount of order duty refunds applied to an order.
- name: order_id
description: >
Platform order identifier. Not globally unique across stores; pair with `smcid` and `source_system` when needed for scoping.
- name: order_line_id
description: >
The ID of the order line.
- name: order_line_refund_quantity
description: >
The quantity of order lines that were refunded. This value is always negative.
- name: order_line_refunds
description: >
The amount of order line refunds applied to an order.
- name: order_line_tax_refunds
description: >
The amount of order line tax refunds applied to an order.
- name: refunded_at
description: >
The autogenerated date and time when the refund was processed.
- name: refunded_at_local_datetime
description: >
The autogenerated date and time when the refund was processed, converted to the reporting timezone configured in SourceMedium.
- name: shipping_refunds
description: >
The amount of shipping refunds applied to an order.
- name: shipping_tax_refunds
description: >
The amount of shipping tax refunds applied to an order.
- name: sm_customer_key
description: >
Stable SourceMedium customer key. Unique per customer. Key joins: `dim_customers` (1:1); `dim_orders`/`obt_orders` (1:many). Platform caveat: TikTok Shop coverage may be limited.
- name: sm_order_key
description: >
Stable SourceMedium order key. Unique per order. Key joins: `obt_order_lines` (1:many via `sm_order_key`); `dim_customers` (many:1 via `sm_customer_key`). Platform caveat: TikTok Shop coverage may be limited.
- name: sm_order_line_key
description: >
Stable SourceMedium order line key. Unique per line. Key joins: `dim_order_lines` (1:1); `dim_orders` (many:1 via `sm_order_key`). Platform caveat: TikTok Shop coverage may be limited.
- name: sm_product_key
description: >
Stable SourceMedium join key for products to related tables.
- name: sm_product_variant_key
description: >
Stable SourceMedium join key for product variants to related tables.
- name: sm_refund_key
description: >
The unique refund key created by SourceMedium that can be used to join refund dimensions to related tables.
- name: sm_refund_line_key
description: >
The unique refund line key created by SourceMedium that can be used to join refund line dimensions to related tables.
- name: sm_store_id
description: >
SourceMedium's unique store identifier. For Shopify stores, derived from the myshopify.com domain; for other platforms (Amazon, TikTok Shop, Walmart.com), uses platform-specific identifiers.
- name: source_system
description: >
Originating platform for the record (e.g., Shopify, Amazon, TikTok Shop, Chargebee). Used for platform‑specific behavior and coverage.

