Customer Code
This page provides detailed instructions on the Customer 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
Google Analytics
Order Status
Order Channel and Marketing
Order and Order Line Revenue
Transformation Code Requirements
The following code should be added to the main workflow in the appropriate position, after Plan to Actual and before Subscription per the Transform Code Sequence - DRP page
Customer
Add this code to enable customer and retention analysis by creating the following tables:
[
drp.customers
][
drp.historical_customer_segmentation
][
drp.customer_profiles
][
drp.customers_fo_sku_lkp
][
drp.retention_performance
][
drp.sku_level_repurchase_rates
]
Create the [drp.customers
] table:
Create the [drp.historical_customer_segmentation
], which calculates the historical RFM segments, and determine last week's segment for each customer:
Create the [drp.customer_profiles
] table which summarizes customer acquisition and performance metrics:
Create a table that tracks the SKUs that a customer made in their first purchase [drp.customers_fo_sku_lkp
]
Create the [drp.retention_performance
] that tracks sales performance by segment for this month and last month
Calculate SKU repurchase rates:
Customer - Gorgias
Add this code if you have the Gorgias extractor implemented and you would like to be able to track the impact of Customer Service at the customer level
Last updated