Using TRIFFT Variables in the "Custom Block"

TRIFFT variables let you personalize content in Shopify using data from the TRIFFT Loyalty Platform. They can be inserted into Custom block App block within Shopify.

💡

Some variables are useful for displaying directly to customers (e.g., %member.points%), while others are more suitable for debugging or internal QA (e.g., %project.config.demo.enabled%).


How It Works

TRIFFT variables follow this structure:

%namespace.variable%
%namespace.variable.subvariable%

These variables will be automatically replaced with values based on the visitor’s loyalty data or your TRIFFT project configuration.

Examples:

Welcome to %project.name%!
You have %member.points% points.
Use your referral link: %member.referral.referral_url%

⚠️

Do not use HTML or Liquid syntax in this block. Shopify Rich Text blocks only support plain text with inline variables.

⚠️

Output from array-type variables (like %member.referral.referred_friends%) is not supported.


Full Variable Reference

Project Variables

VariableDescriptionSample Value
%project.name%Project nameLuxora Fashion
%project.logo%Logo image URLhttps://cdn.trifft.io/files/66b2364eb4d87235677746.png
%project.config.earn_and_burn.enabled%Whether Earn & Burn is enabledtrue
%project.config.earn_and_burn.exchange_rate%Exchange rate for points1
%project.config.earn_and_burn.max_fixed_discount%Max fixed discount (in cents)null
%project.config.earn_and_burn.max_percentage_discount%Max % discount allowed50
%project.config.earn_and_burn.step%Redemption step size10
%project.config.demo.enabled%Demo mode enabled?false
%project.config.demo.type%Demo typeLOGGED_IN
%project.config.referral.shopify_price_rule_id%Shopify price rule ID used for referralsnull

Member Variables

VariableDescriptionSample Value
%member.id%Unique member ID8cabb75b-d05e-42e3-8c70-41c74b791b1a
%member.points%Current point balance59097
%member.referral.is_enabled%Referral program statusfalse
%member.referral.referral_code%Member's referral codeH11TL1
%member.referral.referral_url%Member's referral URLhttps://3ft.us/ref/s/H11TL1

Member Tier Variables

VariableDescriptionSample Value
%member.tier.type%Type of progressionPOINTS
%member.tier.amount%Progression amount591
%member.tier.progress_start%Tier start threshold0
%member.tier.progress_end%Tier end threshold1000
%member.tier.progress_percent%Progress % to next tier59
%member.tier.progress_remaining%Remaining to next tier409
%member.tier.current_tier.name%Current tier nameBronze
%member.tier.next_tier.name%Next tier nameSilver

Product Variable (only on product pages)

VariableDescriptionSample Value
%product.points%Number of points earned for this product59

ℹ️

%product.points% only works when the block is placed on a product page. It retrieves the product's price, sends it to the backend, and returns the number of points that would be earned for that item. If used outside of a product page, it displays "%product.points%".


Styling & Layout in Shopify

Customize the TRIFFT App Block using built-in Shopify controls:

  • Vertical and horizontal margin
  • Section-specific custom CSS

Related Resources

Guides:

Videos: