Order Status Code

This page provides detailed instructions on the Order Status 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 block is dependent on the following blocks being implemented:

  • Initialization

  • UOS

Transformation Code Requirements

The following code should be added to the main workflow in the appropriate position, after Google Analytics and before Order Channel and Marketing per the Transform Code Sequence - DRP page

  #--------------------------------------------------------------------------------------------------------------------
  # SECTION: 2700_ORDER_STATUS
  # DEPENDENCIES:
  #   - Section: 0500_UOS
  # OPTIONAL:
  #   - Integration: Recharge if tagging subscription orders is needed
  # REQUIRED: No
  # PURPOSE: This code creates the DRP tables for order status and order business unit and should be turned on once
  # UOS is enabled
  #--------------------------------------------------------------------------------------------------------------------
  order_status:
    integrations:
      - shopify
      - amazon_seller_central
      - skubana
      - lightspeed
    scripts:
      - "github://platform-sql-shared/scripts/base/2700_order_status/2700_OST_BAS_orders_to_update.sql"
      - "github://platform-sql-shared/scripts/base/2700_order_status/2700_OST_BAS_order_status.sql"
      - "github://platform-sql-shared/scripts/base/2700_order_status/2710_OST_BAS_order_business_unit.sql"

  order_status_subscriptions:
    integrations:
      - recharge
    scripts:
      - "github://platform-sql-shared/scripts/base/2700_order_status/2701_OST_BAS_order_status_subscription_flag.sql"

Order Status

Add this code to create the [drp.order_status] and [drp.order_business_unit] tables to help identify the status and source of orders

This script determines what orders need to be updated and is used to drive a incremental approach to updates reducing CPU utilization for refreshing data. We recommend that this code is always turned on

These scripts create the two tables in this section of the data model

This code is only needed if you have Recharge and would like to include a flag to identify which orders are subscription orders

This script updates the [drp.order_status] table and flags orders that are in Recharge

Last updated