Subscription Code

This page provides detailed instructions on the Subscription Code transform code block and what should be added to the Script Manifest file in order to execute the code

Script Manifest File (YML)

Upstream Transformation Dependencies

This code block is dependent on the following upstream code blocks being implemented:

  • Initialization

  • UOS

This code block requires Recharge to be installed as an extractor

Transformation Code Requirements

The following code should be added to the main workflow in the appropriate position, after Customer and before Reviews per the Transform Code Sequence - DRP page

  #--------------------------------------------------------------------------------------------------------------------
  # SECTION: 4800_SUBSCRIPTION
  # DEPENDENCIES:
  #   - Section: 0500_UOS
  #   - Integration: Recharge
  # REQUIRED: No
  # PURPOSE: This code the DRP tables for Subscripion and should be enabled once the upstream blocks are enabled and
  # the Recharge integration is enabled
  #--------------------------------------------------------------------------------------------------------------------
  subscription:
    integrations:
      - recharge
    scripts:
      - "github://platform-sql-shared/scripts/base/4800_subscription/4810_SUB_BAS_subscribers.sql"
      - "github://platform-sql-shared/scripts/base/4800_subscription/4820_SUB_BAS_subscription_profile.sql"
      - "github://platform-sql-shared/scripts/base/4800_subscription/4830_SUB_BAS_subscription_churn_time_series.sql"
      - "github://platform-sql-shared/scripts/base/4800_subscription/4840_SUB_BAS_subscription_churn_month.sql"
      - "github://platform-sql-shared/scripts/base/4800_subscription/4850_SUB_BAS_subscriber_churn_month.sql"
      - "github://platform-sql-shared/scripts/base/4800_subscription/4860_SUB_BAS_subscription_to_order_line_revenue.sql"
      - "github://platform-sql-shared/scripts/base/4800_subscription/4870_SUB_BAS_subscription_shipment_series.sql"

Subscription

Add this code to enable subscription analysis by creating the following tables:

  • [drp.subscribers]

  • [drp.subscription_profiles]

  • [drp.subscription_churn_tob]

  • [drp.subscription_churn_monthly]

  • [drp.subscriber_churn_monthly]

  • [drp.subscription_shipment_series]

Create the [drp.subscribers] table to analyze performance at the subscriber level:

Create the [drp.subscription_profiles] table to analyze performance at the subscription level:

Create the [drp.subscription_churn_tob] table to analyze churn behavior over time relative to when a subscription started

Create the [drp.subscription_churn_monthly] table to analyze subscription churn on a calendar basis

Create the [drp.subscriber_churn_monthly] table to analyze subscriber churn on a calendar basis

Create the [drp.subscription_shipment_series] to analyze past and future expected shipments

Last updated