New to Brand
The New to Brand template tracks how many new customers versus returning customers a brand gets during specific time periods. This helps partners see how effective their customer acquisition efforts are and evaluate the impact of marketing campaigns on brand growth.
The template uses past purchase behavior to classify customers within a specified time period (26 or 52 weeks). Customers are classified as 'new' if they have no purchase history with the brand during the lookback window.
You can perform the following actions with this template:
- Find out which customers are new to a specific brand during a given time period.
- Examine patterns in customer acquisition over time.
- Evaluate how effective marketing campaigns are at attracting new customers.
- Compare new customer numbers across brands and categories.
- Calculate the percentage of new customers and the percentage of sales they contribute.
A minimum of 100 users is required for analysis.
Run the query
Use the following query to calculate the metrics:
set cleanroom_name = 'CLEANROOM_NAME';
call samooha_by_snowflake_local_db.consumer.run_analysis(
$cleanroom_name, -- cleanroom name
'new_to_brand',
[], -- Consumer tables (none needed)
[], -- Provider tables (none needed)
object_construct(
'start_date', '2025-01-01',
'end_date', '2025-03-31',
'lookback_weeks', '26 weeks',
'brands', ['BRAND_NAME_1'],
'categories', ['CATEGORY_NAME_1'],
'aggregation_level', ['delivered_entity_brand']
)
);
Parameters
| Parameter | Description | Data type | Allowed values | Required or optional |
|---|---|---|---|---|
start_date | Sets the start of the analysis period. | string | Current or past date, no earlier than 3 years, must be at least 30 days before end_date. Use the following format: YYYY-MM-DD. | required |
end_date | Sets the end of the analysis period. | string | Current or past date, no earlier than 3 years, must be at least 30 days after start_date. Use the following format: YYYY-MM-DD. | required |
lookback_weeks | Defines the historical period for determining customer status. | string | "26 weeks", "52 weeks" | required |
aggregation_level | Determines how results are grouped. | array | "delivered_entity_brand" | optional |
brands | An array of brand names to filter the analysis. | array | Brand names as they appear in the catalog | optional |
Result
| Result | Description |
|---|---|
PARAMS_JSON | A JSON object detailing all input parameters. |
AGGREGATION_LEVEL | The specified dimensions for aggregation. |
NEW_CUSTOMER_COUNT | Number of customers who are new to the brand in the period. |
TOTAL_CUSTOMER_COUNT | Total number of customers who purchased in the period. |
NEW_CUSTOMER_PCT | Percentage of customers who are new to the brand. |
NEW_CUSTOMER_SALES | Total sales from customers who are new to the brand. |
TOTAL_SALES | Total sales from all customers in the period. |
NEW_CUSTOMER_SALES_PCT | Percentage of sales from customers who are new to the brand. |
Example result
| PARAMS_JSON | DELIVERED_ENTITY_BRAND | NEW_CUSTOMER_COUNT | TOTAL_CUSTOMER_COUNT | NEW_CUSTOMER_PCT | NEW_CUSTOMER_SALES | TOTAL_SALES | NEW_CUSTOMER_SALES_PCT |
|---|---|---|---|---|---|---|---|
| {"start_date":"2025-01-01", "end_dat ... } | BRAND_NAME_1 | 450 | 1200 | 37.5% | $12,500 | $45,000 | 27.8% |
Data collection and classification
The New to Brand template organizes and categorizes the data using the following methods:
- Minimum user threshold. Returns results when at least 100 unique users are present in the analysis period.
- Date validation. Prevents analysis of data that is too old (more than 3 years) or in the future.
- Aggregated results. Returns aggregated metrics; individual customer purchase data is never exposed.
- Historical boundary enforcement. Limits lookback analysis to defined time periods.
- Parameter validation. Validates parameters; invalid parameters result in empty result sets.
Use cases
The following use cases are examples of how this template works:
- Campaign effectiveness. Measures the success of marketing campaigns in acquiring new customers to your brand.
- Market expansion analysis. Understands brand penetration and growth in new customer segments.
- Customer acquisition tracking. Monitors new customer acquisition trends over time.
- Competitive analysis. Compares new customer acquisition rates across different brands or categories.
- Seasonal pattern analysis. Identifies seasonal trends in new customer acquisitions.
Best practices
Consider the following best practices when running this query:
- Choose appropriate lookback windows. Use 26 weeks for shorter marketing cycles and seasonal analysis, and use 52 weeks for comprehensive annual analysis.
- Align with business cycles. Select analysis periods that correspond to marketing campaigns or business reporting periods.
- Consider seasonality. Account for seasonal shopping patterns when interpreting new customer percentages.
- Use consistent time periods. Compare the results across similar time periods to identify trends.
- Filter by relevant brands/categories. Focus your analysis on specific brands or categories of interest.
- Account for external factors. Consider market conditions and marketing activities when interpreting results.
Methodology
This template employs various methodologies to gather, analyze, and interpret data.
Historical comparison approach
The New to Brand calculation methodology identifies and quantifies customer acquisition patterns by distinguishing between new and returning customers for specific brands over defined time periods. The methodology employs a historical comparison approach to classify customers based on their previous purchase behavior.
Calculation method
The calculation framework consists of four phases.
Phase 1: Customer cohort definition
The analysis begins by selecting all customers who made purchases during the specified analysis period.
CONSUMER_STATS AS (
SELECT
USER_ID,
DELIVERED_ENTITY_BRAND,
MIN(DELIVERED_DATE_PT) AS first_delivered_date,
MIN(DELIVERED_DATE_PT) - interval 'lookback_weeks' AS user_lookback_dt,
SUM(FINAL_CHARGE_AMT) AS sales
FROM order_data
WHERE DELIVERED_DATE_PT BETWEEN 'start_date' AND 'end_date'
GROUP BY USER_ID, DELIVERED_ENTITY_BRAND
)
Phase 2: Historical purchase analysis
For each customer in the cohort, the methodology examines a customer's purchase history during the lookback window.
CONSUMER_TRANSACTION_STATS AS (
SELECT
A.USER_ID,
A.DELIVERED_ENTITY_BRAND,
COUNT(DISTINCT CASE
WHEN A.DELIVERED_DATE_PT >= B.user_lookback_dt
AND A.DELIVERED_DATE_PT < B.first_delivered_date
THEN A.ORDER_DELIVERY_ID
END) AS deliveries,
SUM(CASE
WHEN A.DELIVERED_DATE_PT >= 'start_date'
AND A.DELIVERED_DATE_PT < 'end_date'
THEN A.FINAL_CHARGE_AMT
END) AS period_sales
FROM order_data A
INNER JOIN CONSUMER_STATS B ON A.USER_ID = B.USER_ID
GROUP BY A.USER_ID, A.DELIVERED_ENTITY_BRAND
)
Phase 3: Customer classification
Customers are classified as "new to brand" based on their purchase history in the lookback window relative to their first purchase in the analysis period.
- New to Brand:
deliveries = 1(only their first purchase in the analysis period; no prior purchases in the 26-week lookback window) - Returning to Brand:
deliveries > 1(first purchase in analysis period plus additional purchases in the 26-week lookback window)
Phase 4: Metrics computation
The final metrics are calculated using aggregated customer classification results.
SELECT
SUM(CASE
WHEN DELIVERIES = 1 THEN SALES
ELSE 0
END) AS NEW_CUSTOMER_SALES ,
SUM(SALES) AS TOTAL_SALES ,
DIV0(COUNT(DISTINCT CASE
WHEN DELIVERIES = 1 THEN USER_ID
END), COUNT(DISTINCT USER_ID)) * 100 AS NEW_CUSTOMER_PCT ,
DIV0(SUM(CASE
WHEN DELIVERIES = 1 THEN SALES
ELSE 0
END), SUM(SALES)) * 100 AS NEW_CUSTOMER_SALES_PCT
Lookback window selection
This methodology supports the following standardized lookback windows:
- 26 weeks (6 months). Appropriate for seasonal analysis and shorter marketing cycles
- 52 weeks (12 months). Comprehensive annual customer behavior analysis
The lookback window selection impacts classification sensitivity.
- Shorter windows (26 weeks) increase the number of new customers but may misclassify seasonal shoppers.
- Longer windows (52 weeks) provide more comprehensive historical context but may undercount new customers.
Temporal alignment
The calculation ensures data and process consistencies.
- Analysis window. Clearly defines start and end dates for customer activity measurement.
- Lookback window. Historical periods precede each customer's first purchase in the analysis window.
- Non-overlapping windows. Ensures lookback windows don't overlap with analysis windows.
Limitations and considerations
Keep in mind the following limitations and considerations when using this template:
- Brand switching. Customers who move between brands in the same portfolio might be classified incorrectly.
- Seasonal patterns. Products with strong seasonality might have inflated rates of new customers.
- Data completeness. Results rely on having complete historical data during the lookback window.
- Business context. Consider marketing activities and business cycles when interpreting results.
- Comparative analysis. Results are more meaningful when comparing data over multiple time periods.
- Market dynamics. External factors in the market can also impact customer acquisition trends.
- Minimum threshold enforcement. Results require at least 100 unique users for statistical significance.