Order-level fields
Common subscription-related fields inyour_project.sm_transformed_v2.obt_orders and your_project.sm_transformed_v2.dim_orders:
sm_order_type: order classification (subscription vs one-time)is_subscription_order: boolean convenience fieldsubscription_order_sequence: first vs recurring subscription classificationsubscription_order_index: sequential index of subscription orders per customer when availableis_first_subscription_order: convenience flag derived fromsubscription_order_sequenceis_recurring_subscription_order: convenience flag derived fromsubscription_order_sequence
Line-level fields
When you need product-level precision, useyour_project.sm_transformed_v2.obt_order_lines:
order_line_type: line-level subscription classificationis_order_line_subscription: boolean convenience field for subscription linessubscription_order_index: sequential index for the subscription when available from line-level subscription datasubscription_order_sequence: first vs recurring subscription classification at the line levelsubscription_id: subscription identifier when a reliable one is available
These fields are most reliable when you have a direct subscription-platform integration or Shopify line-item metadata that clearly identifies subscription vs one-time behavior.
When to use orders vs order lines
Useobt_orders when your business question is about:
- customer retention
- subscription-order counts
- order-level LTV or cohort analysis
obt_order_lines when your business question is about:
- mixed carts with subscription and one-time items
- product-level subscription performance
- free gifts, bundles, or add-ons within a cart
- line-specific debugging when an order contains conflicting signals
Shopify nuance
For Shopify, SourceMedium now prefers direct subscription-platform mappings and explicit line-level metadata over older order-tag-only heuristics. That means:- explicit one-time line metadata can prevent false subscription classification
- explicit subscription line metadata is stronger than tag-only heuristics
- placeholder metadata such as
subscription_id = 1is ignored as a true subscription signal - free-gift metadata is not treated as a subscription signal by itself
Line-level sequence alignment
At the line level, SourceMedium now keepssubscription_order_sequence aligned with is_order_line_subscription:
- subscription lines should not carry the non-subscription sequence value
- non-subscription lines should carry the non-subscription sequence value
- when a line is clearly subscription but no trustworthy first-vs-recurring index is available, SourceMedium can default the line to the recurring subscription sequence instead of the non-subscription sequence

