Skip to main content

Creator Resolution Pattern

Use this pattern at the top of any section or template to resolve the creator from either context:
{% liquid
  if metaobject
    assign cc_creator = metaobject
  else
    assign cc_handle = cart.attributes['cc-creator-handle']
    assign cc_creator = metaobjects.creator[cc_handle]
  endif
  
  assign has_creator = cc_creator != blank
%}
Why two branches?
  • On metaobject page templates (landing pages), the metaobject variable is the creator — use it directly
  • On all other pages (PDP, homepage, collection pages), resolve the creator from cart attributes set by the SDK

Available Fields

Out-of-the-Box Base Fields

These fields are available by default in CreatorCommerce (no additional custom field setup required).
GroupFields
Creator identitycc-creator-id, cc-creator-first-name, cc-creator-last-name, cc-creator-email, cc-creator-handle, cc-creator-is-onboarded, cc-creator-profile-picture
Creator shopcc-creator-shop-id, cc-creator-shop-handle, cc-creator-shop-title, cc-creator-shop-url, cc-creator-shop-description, cc-creator-shop-theme-primary-color
Collaborationcc-collab-id, cc-collab-relationship-manager, cc-collab-tier, cc-collab-tier-key, cc-collab-discount-amount, cc-collab-discount-type, cc-collab-tier-discount-amount, cc-collab-tier-discount-type, cc-collab-affiliate-code, cc-collab-discount-code, cc-collab-affiliate-link
Shopify refscc-creator-collection, cc-creator-metaobject, cc-collab-metaobject, cc-creator-customer
Channelcc-channel-handle, cc-channel-myshopify-domain, cc-channel-brandkit-primary-color, cc-channel-brandkit-title, cc-channel-brandkit-primary-logo, cc-channel-integrations-klaviyo-enabled, cc-channel-default-messaging-enabled
Campaigncc-campaign-id, cc-campaign-title
Some stores may expose legacy cc-channel-myshopify-domian alongside cc-channel-myshopify-domain. Treat the correctly spelled key as canonical and support the typo variant only for backward compatibility.

Identity

FieldAccessTypeExample
Creator IDcc_creator.cc-creator-idText"6997d1305fe142fd13cff4b6"
First namecc_creator.cc-creator-first-nameText"Sarah"
Last namecc_creator.cc-creator-last-nameText"Jones"
Emailcc_creator.cc-creator-emailText"jill+test@creatorcommerce.shop"
Creator handlecc_creator.cc-creator-handleText"jill-650"
Shop handlecc_creator.cc-creator-shop-handleText"sarah-jones"
Shop titlecc_creator.cc-creator-shop-titleText"Sarah's Shop"
Shop URLcc_creator.cc-creator-shop-urlURL"https://drops.shop/jill-650/nuuds"
Shop descriptioncc_creator.cc-creator-shop-descriptionText"Skincare enthusiast..."
Is onboardedcc_creator.cc-creator-is-onboardedBooleantrue

Media

FieldAccessType
Profile picturecc_creator.cc-creator-profile-pictureURL
Cover imagecc_creator.data.value['cc-creator-cover-image']URL
Theme primary colorcc_creator.cc-creator-shop-theme-primary-colorColor hex

Collaboration (Discount & Affiliate)

FieldAccessExample
Discount codecc_creator.cc-collab-discount-code"SARAH15"
Discount amountcc_creator.cc-collab-discount-amount"15"
Discount typecc_creator.cc-collab-discount-type"Percentage" or "Fixed"
Affiliate codecc_creator.cc-collab-affiliate-code"SARAH27668"
Affiliate linkcc_creator.cc-collab-affiliate-linkURL
Relationship managercc_creator.data.value['cc-collab-relationship-manager']"social-snowball"
Collab tiercc_creator.data.value['cc-collab-tier']"CC // Tier 1"
Collab IDcc_creator.data.value['cc-collab-id']"6997d1305fe142fd13cff4d7"
Tier keycc_creator.data.value['cc-collab-tier-key']"28002"
Tier discount amountcc_creator.data.value['cc-collab-tier-discount-amount']"20"
Tier discount typecc_creator.data.value['cc-collab-tier-discount-type']"Percentage"

Brand Kit (Channel)

FieldAccess
Brand primary colorcc_creator.cc-channel-brandkit-primary-color
Brand secondary colorcc_creator.cc-channel-brandkit-secondary-color
Brand titlecc_creator.cc-channel-brandkit-title
Brand descriptioncc_creator.cc-channel-brandkit-description
Brand logocc_creator.cc-channel-brandkit-primary-logo
Brand banner imagecc_creator.cc-channel-brandkit-banner-image
Channel handlecc_creator.data.value['cc-channel-handle']
MyShopify domaincc_creator.data.value['cc-channel-myshopify-domain']
Klaviyo enabledcc_creator.data.value['cc-channel-integrations-klaviyo-enabled']
Default messaging enabledcc_creator.data.value['cc-channel-default-messaging-enabled']

Campaign

FieldAccess
Campaign IDcc_creator.data.value['cc-campaign-id']
Campaign titlecc_creator.data.value['cc-campaign-title']

Social Handles (Coming Soon)

FieldAccess
Instagramcc_creator.cc-instagram-handle
TikTokcc_creator.cc-creator-tiktok-handle
YouTubecc_creator.cc-creator-youtube-handle

Working with Drops

Drops are the core data structure for creator-curated product lists. They live in cc_creator.data.value['cc-creator-drops'] as a JSON array.

Drop Structure

Each drop contains:
FieldKeyType
Drop IDcc-creator-drop-idString
Handlecc-creator-drop-handleString
Titlecc-creator-drop-titleString
Descriptioncc-creator-drop-descriptionString
Collection IDcc-creator-drop-collection-idString (Shopify collection ID)
Productscc-creator-drop-productsArray
Mediacc-creator-drop-mediaArray

Product Structure (within a Drop)

Each product in cc-creator-drop-products contains:
FieldKeyType
Product IDcc-creator-drop-product-shopify-idString (Shopify product ID)
Enhancement notecc-creator-drop-product-enhancement-noteString (creator’s review)
Enhancement mediacc-creator-drop-product-enhancement-mediaArray
Enhancement variantcc-creator-drop-product-enhancement-variantString (variant ID)
Product notecc-creator-drop-product-noteString

Iterating Drops

{% if cc_creator.data.value['cc-creator-drops'] %}
  {% for drop in cc_creator.data.value['cc-creator-drops'] %}
    <h2>{{ drop['cc-creator-drop-title'] }}</h2>
    <p>{{ drop['cc-creator-drop-description'] }}</p>
    
    {% for product in drop['cc-creator-drop-products'] %}
      <div class="product-card">
        <p>Product ID: {{ product['cc-creator-drop-product-shopify-id'] }}</p>
        
        {% if product['cc-creator-drop-product-enhancement-note'] != blank %}
          <blockquote>"{{ product['cc-creator-drop-product-enhancement-note'] }}"</blockquote>
        {% endif %}
      </div>
    {% endfor %}
  {% endfor %}
{% endif %}

Matching Current Product to a Drop

On product pages, check if the current product exists in any creator drop:
{% assign shopify_product_id = product.id | append: '' %}
{% for drop in cc_creator.data.value['cc-creator-drops'] %}
  {% for cc_product in drop['cc-creator-drop-products'] %}
    {% if cc_product['cc-creator-drop-product-shopify-id'] == shopify_product_id %}
      <!-- This product is in the creator's drop -->
      {% if cc_product['cc-creator-drop-product-enhancement-note'] != blank %}
        <p class="creator-note">{{ cc_product['cc-creator-drop-product-enhancement-note'] }}</p>
      {% endif %}
    {% endif %}
  {% endfor %}
{% endfor %}
Always convert product.id to a string with | append: '' before comparing with JSON-stored IDs. Shopify IDs are integers; JSON stores them as strings. Direct comparison will fail.

Fallback Handling

Always provide fallbacks for missing data. The fallback value should be neutral — it should make sense to a shopper even when no creator is present.

Quick Fallback Pattern

{% liquid
  assign creator_name = cc_creator.cc-creator-first-name | default: 'Our Expert'
  assign creator_bio = cc_creator.cc-creator-shop-description | default: ''
  assign creator_color = cc_creator.cc-creator-shop-theme-primary-color | default: '#000000'
%}

Fallback Strategy by Field Type

Field TypeHas Creator + Has DataHas Creator + Missing DataNo Creator
Name / textShow creator valueUse `default:` neutral textUse section settings value
Profile pictureShow creator imageShow initials or section fallback imageShow section settings image or hide
Bio / descriptionShow creator bioHide element entirelyShow section settings text or hide
Discount codeShow discount UIHide discount UI entirelyHide discount UI entirely
Discount amountCalculate + show priceHide price modificationShow original price only
Brand colorApply CSS variableUse `default:` theme colorUse theme default
Drops / productsIterate creator dropsShow section collection fallbackShow section collection fallback
Social handlesShow linked iconsHide individual missing iconsHide social section entirely

Conditional Rendering Pattern

For UI elements that should only appear when data exists (not just default values):
{%- comment -%} Only show the discount banner if there's an actual code {%- endcomment -%}
{% if cc_creator and cc_creator.cc-collab-discount-code != blank %}
  <div class="discount-banner">
    Use code <strong>{{ cc_creator.cc-collab-discount-code | escape }}</strong>
    for {{ cc_creator.cc-collab-discount-amount | escape }}% off
  </div>
{% endif %}

{%- comment -%} Only show bio if it exists — don't show empty space {%- endcomment -%}
{% if cc_creator and cc_creator.cc-creator-shop-description != blank %}
  <p class="creator-bio">{{ cc_creator.cc-creator-shop-description | escape }}</p>
{% endif %}

Three-State Handling

Best practice for robust sections — handle all three states:
{% if cc_creator and cc_creator.cc-creator-first-name != blank %}
  {%- comment -%} State 1: Creator present, data available {%- endcomment -%}
  <h2>Shop {{ cc_creator.cc-creator-first-name | escape }}'s Picks</h2>
{% elsif cc_creator %}
  {%- comment -%} State 2: Creator present, specific data missing {%- endcomment -%}
  <h2>Shop Curated Picks</h2>
{% else %}
  {%- comment -%} State 3: No creator context at all {%- endcomment -%}
  <h2>{{ section.settings.heading }}</h2>
{% endif %}

Custom Fields (Customer Fields)

Custom fields let merchants extend the creator data model with additional fields specific to their program. These fields live inside the data JSON and are accessed differently depending on their level.

Field Levels

LevelDescriptionAccess Pattern
Creator-levelCustom fields on the creator (e.g., cc-bio, cc-shoe-size)cc_creator.data.value['cc-field-name']
Drop-levelCustom fields on a drop (e.g., cc-featured-media, cc-drop-theme)drop['cc-field-name'] (within drops iteration)
Product-levelCustom fields on a product within a drop (e.g., cc-shoe-size, cc-fit-notes)product['cc-field-name'] (within products iteration)

Accessing Custom Fields

{%- comment -%} Creator-level custom field {%- endcomment -%}
{% assign creator_bio = cc_creator.data.value['cc-bio'] %}
{% if creator_bio != blank %}
  <p>{{ creator_bio | escape }}</p>
{% endif %}

{%- comment -%} Drop-level custom field {%- endcomment -%}
{% for drop in cc_creator.data.value['cc-creator-drops'] %}
  {% assign featured_media = drop['cc-featured-media'] %}
  {% if featured_media != blank %}
    <img src="{{ featured_media }}" alt="Featured">
  {% endif %}
{% endfor %}

{%- comment -%} Product-level custom field {%- endcomment -%}
{% for drop in cc_creator.data.value['cc-creator-drops'] %}
  {% for product in drop['cc-creator-drop-products'] %}
    {% assign shoe_size = product['cc-shoe-size'] %}
    {% if shoe_size != blank %}
      <span>Creator wears size {{ shoe_size | escape }}</span>
    {% endif %}
  {% endfor %}
{% endfor %}

Custom Fields + Filtering

Custom fields are useful for filtering creators in directories or products in grids:
{%- comment -%} Filter creators by a custom field value {%- endcomment -%}
{% for creator in metaobjects.creator %}
  {% assign creator_data = creator.data.value %}
  {% if creator_data['cc-specialty'] == 'yoga' %}
    {%- comment -%} Show this creator {%- endcomment -%}
  {% endif %}
{% endfor %}
See Custom Fields Reference for a full list of common custom field patterns.

The data JSON Field

The creator.data field contains the complete JSON representation of the Creator Primitive. While most top-level fields have their own dedicated metaobject fields, data is useful for:
  • Accessing deeply nested values (drops, products, enhancements)
  • Reading campaign and collab details
  • Building complex conditional logic
Access pattern:
{{ cc_creator.data.value['field-name'] }}