Set Up Models

Customize datasets for audience building without altering your underlying data architecture.

The Why

Here at GrowthLoop, our goal is to empower you to maximize the value of your data warehouse by building audiences and activating them across sales and marketing channels. This may sometimes require your analytics team to quickly manipulate underlying datasets to better support customer segmentation. That’s why we’re introducing GrowthLoop Models as a way for analysts to create custom data models for audience building - without altering your underlying data architecture.

GrowthLoop Models allows you to curate new data assets quickly and flexibly from within the GrowthLoop platform. Use this feature to:

  • Join tables to enrich datasets with new columns
  • Materialize commonly-used calculated fields like total purchase count last 7 days or lifetime spend
  • Alias columns with business-friendly labels
  • Perform rules-based customer exclusion
  • Narrow down large datasets to the most relevant columns

These data models are stored as views in your data warehouse and surface as datasets for audience segmentation in the GrowthLoop app.

The How

  1. Navigate to the Models tab on the left side of the GrowthLoop app.
models navigation

  1. Click Create Model.
  2. Provide a name for your model and decide whether you want the model Enabled or Disabled.
    1. Enabled: Your model will become immediately available as a dataset for audience segmentation.
    2. Disabled: Your model will be kept in “draft mode” and will not be available as a dataset. You can come back and Enable the model at another time.
model name
  1. Write a SQL query to describe the structure of your new data model. Common use cases include:
    1. Using a WHERE clause to limit values pulled into the view
    2. Limiting your SELECT clause to a subset of relevant fields
    3. Aliasing columns to provide business users with more intuitive field names
    4. Joining in additional tables to enrich the data available within the view
model sql input

This example query selects a subset of fields (customer_id, email, city, and state) from a table of customer data. It aliases the email column to email_address and limits the values in the table to customer records from New York.

  1. Click Preview Model on the bottom right. This will generate a preview of the new data model below the query builder. You can continue to modify your query and refresh the preview until you are satisfied with the structure of the data model.
preview model

  1. Once satisfied with the new data model, click Save Model. This data model will be generated as a view inside the GrowthLoop_system schema in your data warehouse. It will also appear as a data model on your Models page within the GrowthLoop app.
save models models list

You can check for this new view in GrowthLoop_system. It will appear as "model_<your_model_name>":

view model

  1. You are now able to connect your custom view to GrowthLoop to perform audience segmentation. In the GrowthLoop platform, click Datasets, then New Dataset.
new dataset
  1. Choose your Dataset Type and then locate your view by selecting the correct Dataset and Table from the dropdowns below. You can alias your model in the app with a different name if desired.
model dataset setup
  1. Identify the Unique Key of your model, select the Default Fields that will be shown automatically when the model is used for segmentation, and add any Labels that match the fields in the model.
  2. Select your desired options for the Primary Fields section (note that this is for the Users dataset type - if you selected a different dataset type, you will be asked instead for the fields used to join this model to your Users table). Click Save.

Your model is now available to use for segmentation in the GrowthLoop Audience Builder!

Experiencing any issues with GrowthLoop Models? Reach out to us at [email protected] and we’ll be in touch shortly!