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
Variable | Description | Sample Value |
---|---|---|
%project.name% | Project name | Luxora Fashion |
%project.logo% | Logo image URL | https://cdn.trifft.io/files/66b2364eb4d87235677746.png |
%project.config.earn_and_burn.enabled% | Whether Earn & Burn is enabled | true |
%project.config.earn_and_burn.exchange_rate% | Exchange rate for points | 1 |
%project.config.earn_and_burn.max_fixed_discount% | Max fixed discount (in cents) | null |
%project.config.earn_and_burn.max_percentage_discount% | Max % discount allowed | 50 |
%project.config.earn_and_burn.step% | Redemption step size | 10 |
%project.config.demo.enabled% | Demo mode enabled? | false |
%project.config.demo.type% | Demo type | LOGGED_IN |
%project.config.referral.shopify_price_rule_id% | Shopify price rule ID used for referrals | null |
Member Variables
Variable | Description | Sample Value |
---|---|---|
%member.id% | Unique member ID | 8cabb75b-d05e-42e3-8c70-41c74b791b1a |
%member.points% | Current point balance | 59097 |
%member.referral.is_enabled% | Referral program status | false |
%member.referral.referral_code% | Member's referral code | H11TL1 |
%member.referral.referral_url% | Member's referral URL | https://3ft.us/ref/s/H11TL1 |
Member Tier Variables
Variable | Description | Sample Value |
---|---|---|
%member.tier.type% | Type of progression | POINTS |
%member.tier.amount% | Progression amount | 591 |
%member.tier.progress_start% | Tier start threshold | 0 |
%member.tier.progress_end% | Tier end threshold | 1000 |
%member.tier.progress_percent% | Progress % to next tier | 59 |
%member.tier.progress_remaining% | Remaining to next tier | 409 |
%member.tier.current_tier.name% | Current tier name | Bronze |
%member.tier.next_tier.name% | Next tier name | Silver |
Product Variable (only on product pages)
Variable | Description | Sample Value |
---|---|---|
%product.points% | Number of points earned for this product | 59 |
%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:
Updated 4 days ago