Introduction

Liquid is an open-source template language created by Shopify. ReferralCandy uses Liquid to enable you to insert dynamic content in emails and pages in your referral marketing campaign.

For example, you might want to include each advocate’s name in the referral email. In the example below, “Amy” is the name of an advocate and you want to insert each advocate’s names into emails:

“Hi Amy! You are awesome!"

You can do this by using the first_name attribute of the advocate object that is available in the referral email template:

“Hi ##{{ advocate.first_name }}! You are awesome!"

##{{ advocate.first_name }} will be replaced by each advocate's name when the emails are sent out to each advocate.

Common typos

Each liquid should be written in full for it to work properly. Here's a liquid that displays your advocate's first name, written in full:

##{{ advocate.first_name }}

Here's a few common typos:

  • Missing closing bracket - ##{{ advocate.first_name }
  • Missing letter - ##{{ advocate.first_nam }}
  • Missing opening bracket - { advocate.first_name }}

Page Content

Basics of filters & tags

(go to top)

You can use all standard filters and standard tags listed in the Liquid for Designers documentation.

In addition, ReferralCandy provides a few additional filters and tags for your use:

Liquid Variables

(go to top)

Layout Variables

(go to top)

These 3 liquid variables MUST be included in layout file i.e. layouts/page.liquid or layouts/embed.liquid:

Global Variables

(go to top)

These liquid variables can be used in all templates:

List of Liquid objects

(go to top)

This is a list of all the liquid objects that ReferralCandy supports. Each email or page has different liquid objects that each are able to access, which we will go through in the next section.

Liquid objects available to each page or email

(go to top)

Each email or page has different liquid objects that each are able to access. See the list below to determine what each page or email has access to:

Referral Email

(go to top)

Referral emails are sent to advocates to invite them to join your referral program. They encourage advocates to share your product with their friends.

Reminder Email

(go to top)

Reminder Emails are sent to advocates at fixed intervals to keep them updated on the latest offerings of your referral program. They also encourage them to share your product with their friends.

Advocate Join Page

(go to top)

The Advocate Join Page explains what your referral program is about and invites visitors to fill in their details to join your referral program.

Advocate Sharing Page

(go to top)

The Advocate Sharing Page is a page specific to an advocate that contains the referral link and social media sharing buttons the advocate can use to share about your referral program.

Friend Offer Landing Page

(go to top)

The Friend Offer Landing Page is shown to an advocate's friend when they click on the advocate's referral link. It displays a Friend Offer coupon code that can be used at your store, and encourages the friend to start shopping.

Reward Pending Email

(go to top)

The Reward Pending Email is sent to an advocate the moment ReferralCandy detects that a purchase is made through the advocate's referral link.

Reward Successful Email

The Reward Successful Email is sent to an advocate when a referral they've made becomes eligible for a reward.

Reward Ineligible Email

(go to top)

The Reward Ineligible Email is sent to an advocate when a referral they've made (that was pending review) is cancelled, or when the associated purchase was returned.

Advocate Create Password Page

(go to top)

The Advocate Create Password Page tells advocates to create a password to access their Rewards Page.

Advocate Login Page

(go to top)

The Advocate Login Page is a page unique to the advocate with a login form. Once they submit the correct email and password, they will be redirected to their Rewards Page.

Advocate Rewards Page

(go to top)

The Advocate Rewards Page is where advocates configure their rewards settings, and view their referral activity history, as well as earned rewards.

Advocate Messaging Preferences Page

(go to top)

The Advocate Messaging Preferences Page is where advocates configure their preference for the frequency in which they receive emails sent on your behalf by ReferralCandy.

Post-Purchase Popup

(go to top)

The Post-Purchase Popup shows up right after each advocate’s purchase, to encourage them to share your product with their friends.

Liquid Objects

(go to top)

These are all the liquid objects supported by ReferralCandy. Some liquid objects can only be used in certain templates.

advocate

(go to top)

Information about a person who has been enrolled in your referral campaign.

advocate.portal

(go to top)

Information about an advocate's ReferralCandy Portal.

campaign

(go to top)

Information about the referral campaign.

offer

(go to top)

Information about the Friend Offer that was given to the advocate to give out to friends at the point that the referral link is generated.

offer_setup

(go to top)

Friend Offer settings of the referral campaign as you have it currently configured for your referral campaign on your dashboard.

pending_referred_purchases

(go to top)

Referred purchases of an advocate that count towards rewards, but are still within the review period.


You can use {% for purchase in pending_referred_purchases %} to access each pending referred purchase. See purchase for a list of purchase information that you can use.

purchase

(go to top)

Purchase made by a customer in your store.

referral_link

(go to top)

A unique link given to each advocate when they are enrolled in your referral program. When a advocate's friend clicks on their referral link, the friend will be brought to a landing page, which shows them the coupon code (Friend Offer) that can be used at your store.

reward

(go to top)

A Referral Reward earned by an advocate.

reward_setup

(go to top)

Referral Reward settings of the referral campaign as you have it currently configured for your referral campaign on your dashboard.

rewards

(go to top)

Referral Rewards earned by an advocate.

You can use {% for reward in rewards %} to access each earned reward. See reward for a list of reward information that you can use.

Did this answer your question?