Skip to main content

User Defined Functions (UDFs)

Cybersyn's User Defined Functions (UDFs) are accessible through native applications on the Snowflake Marketplace. UDFs are a powerful tool for creating custom segments and answering specific business questions, providing functionality similar to raw transaction data access but with greater usability. We currently support three UDFs:

Market Sizing

The Market Sizing UDF estimates the number of U.S. consumers who are either current or potential buyers of a selected merchant. This UDF identifies shoppers and non-shoppers in the consumer spending panel based on a specific segment definition. A model assigns propensity scores to non-shoppers based on how closely their shopping behaviors resemble those of existing shoppers. Non-shoppers with propensity scores higher than the median score of current shoppers are classified as part of the total addressable market. The total addressable market is broken down by geography in order to highlight where penetration is high and low.

Customer Segments

The Consumer Segments UDF enables detailed comparisons of demographic and shopping behavior across two customized consumer groups. Segments can be tailored by merchant, spending thresholds, and time periods, allowing for highly specific analyses. For example: a segment could be defined as "consumers who spent at least $100 at Walmart during Q2 2023".

The output provides relative comparisons between the two segments, highlighting areas where one segment's spending or demographic representation is significantly higher or lower than the other. For example, a 20% value for the 35-44 age group indicates that this group contributes 20% more to total sales in Segment 1 than in Segment 2. This could occur if the 35-44 age group accounts for 12% of sales in Segment 1 and 10% in Segment 2, resulting in a 20% relative difference.

The following breakdowns are available for comparing customer segments:

  • Demographic Profiles are based on self-reported information from panelists in the Consumer Spending panel
  • Merchant Affinity in Shopping Profiles reflects shopping behaviors observed in the panel.
  • Category and Brand Affinity are derived from a combination of Consumer Spending and Point-of-Sale (POS) data, matched using statistical methods.

Switching

The Switching UDF analyzes customer churn and switching behavior for a selected merchant by comparing two time periods. It segments customers based on their purchasing patterns during these periods, helping to identify behavior changes over time. The UDF defines the following customer groups:

  • Churned: Customers who made purchases in the baseline period but did not return in the reference period.
  • New: Customers who made their first purchase in the reference period.
  • Repeat: Customers who made purchases in both the baseline and reference periods.

The UDF compares key metrics like share of sales, transactions, and average order value (AOV) between these groups across both periods, providing insights into how customer behavior has shifted.