SaaSquatch Help Center

Your handlebar template files are provided with variables called a "context". This reference explains each of these fields.

Example

tenantAlias
string

The active tenant's alias

companyName
string

The name of the company for the referral program

programDetails
object

The details of the incentives used for the referral program.

Expand Details
referredRewardDetails
object

Details of the reward that could be earned -- but is not yet earned.

Expand Details
type
string

The type of reward.

Possible values:PCT_DISCOUNT, FUELTANK, CREDIT, or INTENGRATION

unit
string

An identifier for the unit of the reward. E.g. "credit-in-cents", "freemb", "giftcard20", "tshirt", "freemonth". Only works with CREDIT

credit
integer

The amount of credit that this referral code is valid for. e.g. for $20 this object would have credit=2000, unit="cents". Only works for CREDIT

discountPercent
integer

The percent discount that the referral code is valid for. E.g. "10" for "10%". Only works with PCT_DISCOUNT

monthsDiscountIsValid
integer

When this reward is set to expire. Only works with PCT_DISCOUNT

valueInCents
integer

The value of the reward in cents. Works with: INTEGRATION

rewardDetails
string

JSON object containing details about the reward. Works with: INTEGRATION

referrerRewardDetails
object

Details of the reward that could be earned -- but is not yet earned.

Expand Details
type
string

The type of reward.

Possible values:PCT_DISCOUNT, FUELTANK, CREDIT, or INTENGRATION

unit
string

An identifier for the unit of the reward. E.g. "credit-in-cents", "freemb", "giftcard20", "tshirt", "freemonth". Only works with CREDIT

credit
integer

The amount of credit that this referral code is valid for. e.g. for $20 this object would have credit=2000, unit="cents". Only works for CREDIT

discountPercent
integer

The percent discount that the referral code is valid for. E.g. "10" for "10%". Only works with PCT_DISCOUNT

monthsDiscountIsValid
integer

When this reward is set to expire. Only works with PCT_DISCOUNT

valueInCents
integer

The value of the reward in cents. Works with: INTEGRATION

rewardDetails
string

JSON object containing details about the reward. Works with: INTEGRATION

user
object

An object describing an individual user. Users are used in SaaSquatch to track people/contacts/leads. When a referral happens, it always happens between two Users.

Expand Details
id
string

The unique identifier provided for this user.

accountId
string

The unique identifier of the Account that this user belongs to.

referralCode
string

The referral code used for sharing by this user

email
string

The email address provided for the user. SaaSquatch uses this to notify someone when they have a successful referral.

imageUrl
string

Optionally used in widgets, emails, and themes. If you provide a absolute profile image URL the minimum image size is 80px x 80px.

firstName
string

The user's first name

lastName
string

The user's last name

firstSeenIP
string
readonly

The user's IP address on indentification

lastSeenIP
string
readonly

The user's last known IP address

dateCreated
integer
readonly

The Unix time stamp of when the user was created

emailHash
string
readonly

The hash of the user's email address

referralSource
string
readonly

The domain from which the user was registered

locale
string

The user's locale, used for Internationalization. The locale must be of the format 'language_COUNTRY' where the language code must be lowercase and the country code must be uppercase. The separator must be an underscore.

shareLinks
object
readonly

Share link for an individual user.

Expand Details
shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

mobileShareLink
string

The Share Link for mobile devices.

mobileFacebookShareLink
string

The Share Link for Facebook on mobile devices.

mobileTwitterSharelink
string

The Share Link for Twitter on mobile devices.

mobileEmailShareLink
string

The Share Link for Email on mobile devices.

EMBED
object

An individual user's Share links for use in EMBED.

Expand Details
shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

POPUP
object

An individual user's Share links for use in POPUP.

Expand Details
shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

HOSTED
object

An individual user's Share links for use in HOSTED.

Expand Details
shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

MOBILE
object

An individual user's Share links for use in MOBILE.

Expand Details
shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

EMAIL
object

An individual user's Share links for use in EMAIL.

Expand Details
shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

referrals
array

The referrals made by the active user

Expand Details
id
string

Unique identifier for the Referral object

referrerRewardDeniedOrCancelled
boolean

If this referral's referrer reward is currently in a cancelled state or has otherwise been prevented (denied) via moderation

referredRewardDeniedOrCancelled
boolean

If the referral's referred reward is currently in a cancelled state or has otherwise been prevented (denied) via moderation

referredReward
object

Details of an individual reward.

Expand Details
dateGiven
integer

Timestamp of when this reward was earned.

dateExpires
integer

Timestamp of when this reward is set to expire.

dateCancelled
integer

Timestamp if the reward is cancellable and has been cancelled, the date it was cancelled on. Null if not never cancelled.

unit
string

An identifier for the unit of the reward. E.g. 'credit-in-cents', 'freemb', 'giftcard20', 'tshirt', 'freemonth' or '%'

name
string

The displayable name for the reward

value
integer

The value of the reward

referrerReward
object

Details of an individual reward.

Expand Details
dateGiven
integer

Timestamp of when this reward was earned.

dateExpires
integer

Timestamp of when this reward is set to expire.

dateCancelled
integer

Timestamp if the reward is cancellable and has been cancelled, the date it was cancelled on. Null if not never cancelled.

unit
string

An identifier for the unit of the reward. E.g. 'credit-in-cents', 'freemb', 'giftcard20', 'tshirt', 'freemonth' or '%'

name
string

The displayable name for the reward

value
integer

The value of the reward

moderationStatus
string

"When referrals are manually managed, each referral has a PENDING state until it is explicitly moderated."

Possible values:PENDING, or ACTIONED

referredModerationStatus
string

"Used to identify the referred user's moderation status and affect Reward cancellation."

Possible values:PENDING, APPROVED, or DENIED

referrerModerationStatus
string

"Used to identify the referrer user's moderation status and affect Reward cancellation."

Possible values:PENDING, APPROVED, or DENIED

dateReferralStarted
integer

Timestamp of when this referral was started.

dateReferralPaid
integer

Timestamp of when this referral was marked as PAID.

dateReferralEnded
integer

Timestamp of when this referral was ended.

dateModerated
integer

Timestamp of when this referral was last moderated.

referredUser
object

An object describing an individual user. Users are used in SaaSquatch to track people/contacts/leads. When a referral happens, it always happens between two Users.

Expand Details
id
string

The unique identifier provided for this user.

accountId
string

The unique identifier of the Account that this user belongs to.

referralCode
string

The referral code used for sharing by this user

email
string

The email address provided for the user. SaaSquatch uses this to notify someone when they have a successful referral.

imageUrl
string

Optionally used in widgets, emails, and themes. If you provide a absolute profile image URL the minimum image size is 80px x 80px.

firstName
string

The user's first name

lastName
string

The user's last name

firstSeenIP
string
readonly

The user's IP address on indentification

lastSeenIP
string
readonly

The user's last known IP address

dateCreated
integer
readonly

The Unix time stamp of when the user was created

emailHash
string
readonly

The hash of the user's email address

referralSource
string
readonly

The domain from which the user was registered

locale
string

The user's locale, used for Internationalization. The locale must be of the format 'language_COUNTRY' where the language code must be lowercase and the country code must be uppercase. The separator must be an underscore.

shareLinks
object
readonly

Share link for an individual user.

Expand Details
shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

mobileShareLink
string

The Share Link for mobile devices.

mobileFacebookShareLink
string

The Share Link for Facebook on mobile devices.

mobileTwitterSharelink
string

The Share Link for Twitter on mobile devices.

mobileEmailShareLink
string

The Share Link for Email on mobile devices.

EMBED
object

An individual user's Share links for use in EMBED.

Expand Details
shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

POPUP
object

An individual user's Share links for use in POPUP.

Expand Details
shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

HOSTED
object

An individual user's Share links for use in HOSTED.

Expand Details
shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

MOBILE
object

An individual user's Share links for use in MOBILE.

Expand Details
shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

EMAIL
object

An individual user's Share links for use in EMAIL.

Expand Details
shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

referralsLength
integer

The total number of referrals made by this user

rewardBalances
array

An array of reward balances for this user

Expand Details
type
string

The type of reward.

Possible values:PCT_DISCOUNT, CREDIT, or FUELTANK

unit
string

An identifier for the unit of the reward. E.g. "credit-in-cents", "freemb", "giftcard20", "tshirt", "freemonth". Only works with CREDIT

count
integer

"The number of rewards earned. Usually is equal to the number of successful referrals made. E.g. An account has $80 of credit due to the referral program. $60 from making referrals, $20 from being referred. The count would be 4 rewards, each worth $20. Only works for CREDIT"

totalAssignedCredit
integer

The total assignedCredit for all reward credits of the same unit type. Only works with types: CREDIT

totalRedeemedCredit
integer

The total redeemedCredit for all reward credits of the same unit type. Only works with types: CREDIT

totalDiscountPercent
integer

The total discountPercent from all rewards. Only works with types: PCT_DISCOUNT

referredDiscountPercent
integer

The total discountPercent from rewards with rewardSource = REFERRED Only works with types: PCT_DISCOUNT

referrerDiscountPercent
integer

The total discountPercent from rewards with rewardSource = FRIEND_SIGNUP Only works with types: PCT_DISCOUNT

totalFuelTankCodes
integer

The number of earned fueltank rewards. Only works with type: FUELTANK

shareLinks
object

Share link for an individual user.

Expand Details
shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

mobileShareLink
string

The Share Link for mobile devices.

mobileFacebookShareLink
string

The Share Link for Facebook on mobile devices.

mobileTwitterSharelink
string

The Share Link for Twitter on mobile devices.

mobileEmailShareLink
string

The Share Link for Email on mobile devices.

EMBED
object

An individual user's Share links for use in EMBED.

Expand Details
shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

POPUP
object

An individual user's Share links for use in POPUP.

Expand Details
shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

HOSTED
object

An individual user's Share links for use in HOSTED.

Expand Details
shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

MOBILE
object

An individual user's Share links for use in MOBILE.

Expand Details
shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

EMAIL
object

An individual user's Share links for use in EMAIL.

Expand Details
shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

referredBy
object

Details of who referred the current user

Expand Details
id
string

Unique identifier for the Referral object

referrerRewardDeniedOrCancelled
boolean

If this referral's referrer reward is currently in a cancelled state or has otherwise been prevented (denied) via moderation

referredRewardDeniedOrCancelled
boolean

If the referral's referred reward is currently in a cancelled state or has otherwise been prevented (denied) via moderation

referredReward
object

Details of an individual reward.

Expand Details
dateGiven
integer

Timestamp of when this reward was earned.

dateExpires
integer

Timestamp of when this reward is set to expire.

dateCancelled
integer

Timestamp if the reward is cancellable and has been cancelled, the date it was cancelled on. Null if not never cancelled.

unit
string

An identifier for the unit of the reward. E.g. 'credit-in-cents', 'freemb', 'giftcard20', 'tshirt', 'freemonth' or '%'

name
string

The displayable name for the reward

value
integer

The value of the reward

referrerReward
object

Details of an individual reward.

Expand Details
dateGiven
integer

Timestamp of when this reward was earned.

dateExpires
integer

Timestamp of when this reward is set to expire.

dateCancelled
integer

Timestamp if the reward is cancellable and has been cancelled, the date it was cancelled on. Null if not never cancelled.

unit
string

An identifier for the unit of the reward. E.g. 'credit-in-cents', 'freemb', 'giftcard20', 'tshirt', 'freemonth' or '%'

name
string

The displayable name for the reward

value
integer

The value of the reward

moderationStatus
string

"When referrals are manually managed, each referral has a PENDING state until it is explicitly moderated."

Possible values:PENDING, or ACTIONED

referredModerationStatus
string

"Used to identify the referred user's moderation status and affect Reward cancellation."

Possible values:PENDING, APPROVED, or DENIED

referrerModerationStatus
string

"Used to identify the referrer user's moderation status and affect Reward cancellation."

Possible values:PENDING, APPROVED, or DENIED

dateReferralStarted
integer

Timestamp of when this referral was started.

dateReferralPaid
integer

Timestamp of when this referral was marked as PAID.

dateReferralEnded
integer

Timestamp of when this referral was ended.

dateModerated
integer

Timestamp of when this referral was last moderated.

referredByUser
object

An object describing an individual user. Users are used in SaaSquatch to track people/contacts/leads. When a referral happens, it always happens between two Users.

Expand Details
id
string

The unique identifier provided for this user.

accountId
string

The unique identifier of the Account that this user belongs to.

referralCode
string

The referral code used for sharing by this user

email
string

The email address provided for the user. SaaSquatch uses this to notify someone when they have a successful referral.

imageUrl
string

Optionally used in widgets, emails, and themes. If you provide a absolute profile image URL the minimum image size is 80px x 80px.

firstName
string

The user's first name

lastName
string

The user's last name

firstSeenIP
string
readonly

The user's IP address on indentification

lastSeenIP
string
readonly

The user's last known IP address

dateCreated
integer
readonly

The Unix time stamp of when the user was created

emailHash
string
readonly

The hash of the user's email address

referralSource
string
readonly

The domain from which the user was registered

locale
string

The user's locale, used for Internationalization. The locale must be of the format 'language_COUNTRY' where the language code must be lowercase and the country code must be uppercase. The separator must be an underscore.

shareLinks
object
readonly

Share link for an individual user.

Expand Details
shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

mobileShareLink
string

The Share Link for mobile devices.

mobileFacebookShareLink
string

The Share Link for Facebook on mobile devices.

mobileTwitterSharelink
string

The Share Link for Twitter on mobile devices.

mobileEmailShareLink
string

The Share Link for Email on mobile devices.

EMBED
object

An individual user's Share links for use in EMBED.

Expand Details
shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

POPUP
object

An individual user's Share links for use in POPUP.

Expand Details
shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

HOSTED
object

An individual user's Share links for use in HOSTED.

Expand Details
shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

MOBILE
object

An individual user's Share links for use in MOBILE.

Expand Details
shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

EMAIL
object

An individual user's Share links for use in EMAIL.

Expand Details
shareLink
string

The unique share link the user can refer their friends with. The Share Link contains the Referral Code for making referrals and a source for Analytics purposes.

facebookShareLink
string

The Share Link for Facebook.

twitterShareLink
string

The Share Link for Twitter.

emailShareLink
string

The Share Link for Email.

linkedinShareLink
string

The Share Link for linkedin.

variables
object

The stored values for the variables. See theme variables for more info.

variablesSchema
object

The JSON Schema that defines the format of the theme variables. See theme variables for more info.

mode
string

The mode the widget has been loaded in

Possible values:POPUP, EMBED, or NOCONTENT

assetVersion
string

A unique hash used to version assets.

headerVersion
string

A unique version number used internally.

newReferral
object

Details of a user who was referred by the current user (Available only in REFERRAL_STARTED email context)

convertedReferral
object

Details of a user who was referred by the current user (Available only in REFERRAL_CONVERTED email context)

locale
string

The user locale, used for Internationalization. The locale must be of the format language_COUNTRY where the language code must be lowercase and the country code must be uppercase. The separator must be an underscore. Examples en or en_US or zh_CN

{
  "tenantAlias": "abdsds5124abewet",
  "companyName": "Acme Corp",
  "programDetails": {
    "referredRewardDetails": {
      "CREDIT": {
        "type": "CREDIT",
        "unit": "CENTS",
        "credit": 2500
      },
      "PCT_DISCOUNT": {
        "type": "PCT_DISCOUNT",
        "discountPercent": 20,
        "unit": "%"
      }
    },
    "referrerRewardDetails": {
      "CREDIT": {
        "type": "CREDIT",
        "unit": "CENTS",
        "credit": 2500
      },
      "PCT_DISCOUNT": {
        "type": "PCT_DISCOUNT",
        "discountPercent": 20,
        "unit": "%"
      }
    }
  },
  "user": {
    "id": "898746321",
    "accountId": "987321",
    "email": "hello@example.com",
    "firstName": "Henk",
    "lastName": "Thompson",
    "referralCode": "HENKTHOMPSON",
    "imageUrl": "",
    "firstSeenIP": "10.230.163.157",
    "lastSeenIP": "184.66.242.57",
    "dateCreated": 1467222395030,
    "emailHash": "180bc1412a038746af9b37fb782724a2",
    "referralSource": "http://unifiedtestapp.herokuapp.com/",
    "locale": null,
    "shareLinks": {
      "shareLink": "http://ssqt.co/mvbcF5",
      "facebookShareLink": "http://ssqt.co/mmbcF5",
      "twitterShareLink": "http://ssqt.co/mRbcF5",
      "emailShareLink": "http://ssqt.co/mLbcF5",
      "linkedinShareLink": "http://ssqt.co/mLbcF5",
      "mobileShareLink": "http://ssqt.co/mebcF5",
      "mobileFacebookShareLink": "http://ssqt.co/mnbcF5",
      "mobileTwitterShareLink": "http://ssqt.co/mCbcF5",
      "mobileEmailShareLink": "http://ssqt.co/mEbcF5",
      "EMBED": {
        "shareLink": "http://ssqt.co/mQbcF5",
        "facebookShareLink": "http://ssqt.co/mwbcF5",
        "twitterShareLink": "http://ssqt.co/mcbcF5",
        "emailShareLink": "http://ssqt.co/mJbcF5",
        "linkedinShareLink": "http://ssqt.co/mHbcF5"
      },
      "POPUP": {
        "shareLink": "http://ssqt.co/m5bcF5",
        "facebookShareLink": "http://ssqt.co/m9bcF5",
        "twitterShareLink": "http://ssqt.co/mMbcF5",
        "emailShareLink": "http://ssqt.co/mobcF5",
        "linkedinShareLink": "http://ssqt.co/m7bcF5"
      },
      "HOSTED": {
        "shareLink": "http://ssqt.co/mtbcF5",
        "facebookShareLink": "http://ssqt.co/mubcF5",
        "twitterShareLink": "http://ssqt.co/mSbcF5",
        "emailShareLink": "http://ssqt.co/mlbcF5",
        "linkedinShareLink": "http://ssqt.co/mYbcF5"
      },
      "MOBILE": {
        "shareLink": "http://ssqt.co/mebcF5",
        "facebookShareLink": "http://ssqt.co/mnbcF5",
        "twitterShareLink": "http://ssqt.co/mCbcF5",
        "emailShareLink": "http://ssqt.co/mEbcF5",
        "linkedinShareLink": "http://ssqt.co/m3bcF5"
      },
      "EMAIL": {
        "shareLink": "http://ssqt.co/mPbcF5",
        "facebookShareLink": "http://ssqt.co/mTbcF5",
        "twitterShareLink": "http://ssqt.co/mGbcF5",
        "emailShareLink": "http://ssqt.co/mbbcF5",
        "linkedinShareLink": "http://ssqt.co/m1bcF5"
      }
    }
  },
  "referrals": [
    {
      "id": "abdsds5124abewet",
      "referredReward": {},
      "referrerReward": {},
      "moderationStatus": "PENDING",
      "referredModerationStatus": "PENDING",
      "referrerModerationStatus": "PENDING",
      "referredUser": {
        "id": "898746321",
        "accountId": "987321",
        "email": "hello@example.com",
        "firstName": "Henk",
        "lastName": "Thompson",
        "referralCode": "HENKTHOMPSON",
        "imageUrl": "",
        "firstSeenIP": "10.230.163.157",
        "lastSeenIP": "184.66.242.57",
        "dateCreated": 1467222395030,
        "emailHash": "180bc1412a038746af9b37fb782724a2",
        "referralSource": "http://unifiedtestapp.herokuapp.com/",
        "locale": null,
        "shareLinks": {
          "shareLink": "http://ssqt.co/mvbcF5",
          "facebookShareLink": "http://ssqt.co/mmbcF5",
          "twitterShareLink": "http://ssqt.co/mRbcF5",
          "emailShareLink": "http://ssqt.co/mLbcF5",
          "linkedinShareLink": "http://ssqt.co/mLbcF5",
          "mobileShareLink": "http://ssqt.co/mebcF5",
          "mobileFacebookShareLink": "http://ssqt.co/mnbcF5",
          "mobileTwitterShareLink": "http://ssqt.co/mCbcF5",
          "mobileEmailShareLink": "http://ssqt.co/mEbcF5",
          "EMBED": {
            "shareLink": "http://ssqt.co/mQbcF5",
            "facebookShareLink": "http://ssqt.co/mwbcF5",
            "twitterShareLink": "http://ssqt.co/mcbcF5",
            "emailShareLink": "http://ssqt.co/mJbcF5",
            "linkedinShareLink": "http://ssqt.co/mHbcF5"
          },
          "POPUP": {
            "shareLink": "http://ssqt.co/m5bcF5",
            "facebookShareLink": "http://ssqt.co/m9bcF5",
            "twitterShareLink": "http://ssqt.co/mMbcF5",
            "emailShareLink": "http://ssqt.co/mobcF5",
            "linkedinShareLink": "http://ssqt.co/m7bcF5"
          },
          "HOSTED": {
            "shareLink": "http://ssqt.co/mtbcF5",
            "facebookShareLink": "http://ssqt.co/mubcF5",
            "twitterShareLink": "http://ssqt.co/mSbcF5",
            "emailShareLink": "http://ssqt.co/mlbcF5",
            "linkedinShareLink": "http://ssqt.co/mYbcF5"
          },
          "MOBILE": {
            "shareLink": "http://ssqt.co/mebcF5",
            "facebookShareLink": "http://ssqt.co/mnbcF5",
            "twitterShareLink": "http://ssqt.co/mCbcF5",
            "emailShareLink": "http://ssqt.co/mEbcF5",
            "linkedinShareLink": "http://ssqt.co/m3bcF5"
          },
          "EMAIL": {
            "shareLink": "http://ssqt.co/mPbcF5",
            "facebookShareLink": "http://ssqt.co/mTbcF5",
            "twitterShareLink": "http://ssqt.co/mGbcF5",
            "emailShareLink": "http://ssqt.co/mbbcF5",
            "linkedinShareLink": "http://ssqt.co/m1bcF5"
          }
        }
      }
    }
  ],
  "rewardBalances": [
    {
      "CREDIT": {
        "type": "CREDIT",
        "count": "4",
        "totalAssignedCredit": "10000",
        "totalRedeemedCredit": "0",
        "unit": "cents"
      },
      "PCT_DISCOUNT": {
        "type": "PCT_DISCOUNT",
        "totalDiscountPercent": "30",
        "referredDiscountPercent": "10",
        "referrerDiscountPercent": "20"
      },
      "FUELTANK": {
        "type": "FUELTANK",
        "totalFuelTankCodes": 1
      },
      "type": "CREDIT",
      "unit": "cents",
      "totalAssignedCredit": 4000,
      "totalRedeemedCredit": 1490
    }
  ],
  "shareLinks": {
    "shareLink": "http://ssqt.co/mvbcF5",
    "facebookShareLink": "http://ssqt.co/mmbcF5",
    "twitterShareLink": "http://ssqt.co/mRbcF5",
    "emailShareLink": "http://ssqt.co/mLbcF5",
    "linkedinShareLink": "http://ssqt.co/mLbcF5",
    "mobileShareLink": "http://ssqt.co/mebcF5",
    "mobileFacebookShareLink": "http://ssqt.co/mnbcF5",
    "mobileTwitterShareLink": "http://ssqt.co/mCbcF5",
    "mobileEmailShareLink": "http://ssqt.co/mEbcF5",
    "EMBED": {
      "shareLink": "http://ssqt.co/mQbcF5",
      "facebookShareLink": "http://ssqt.co/mwbcF5",
      "twitterShareLink": "http://ssqt.co/mcbcF5",
      "emailShareLink": "http://ssqt.co/mJbcF5",
      "linkedinShareLink": "http://ssqt.co/mHbcF5"
    },
    "POPUP": {
      "shareLink": "http://ssqt.co/m5bcF5",
      "facebookShareLink": "http://ssqt.co/m9bcF5",
      "twitterShareLink": "http://ssqt.co/mMbcF5",
      "emailShareLink": "http://ssqt.co/mobcF5",
      "linkedinShareLink": "http://ssqt.co/m7bcF5"
    },
    "HOSTED": {
      "shareLink": "http://ssqt.co/mtbcF5",
      "facebookShareLink": "http://ssqt.co/mubcF5",
      "twitterShareLink": "http://ssqt.co/mSbcF5",
      "emailShareLink": "http://ssqt.co/mlbcF5",
      "linkedinShareLink": "http://ssqt.co/mYbcF5"
    },
    "MOBILE": {
      "shareLink": "http://ssqt.co/mebcF5",
      "facebookShareLink": "http://ssqt.co/mnbcF5",
      "twitterShareLink": "http://ssqt.co/mCbcF5",
      "emailShareLink": "http://ssqt.co/mEbcF5",
      "linkedinShareLink": "http://ssqt.co/m3bcF5"
    },
    "EMAIL": {
      "shareLink": "http://ssqt.co/mPbcF5",
      "facebookShareLink": "http://ssqt.co/mTbcF5",
      "twitterShareLink": "http://ssqt.co/mGbcF5",
      "emailShareLink": "http://ssqt.co/mbbcF5",
      "linkedinShareLink": "http://ssqt.co/m1bcF5"
    }
  },
  "referredBy": {
    "id": "abdsds5124abewet",
    "referredReward": {},
    "referrerReward": {},
    "moderationStatus": "PENDING",
    "referredModerationStatus": "PENDING",
    "referrerModerationStatus": "PENDING",
    "referredByUser": {
      "id": "898746321",
      "accountId": "987321",
      "email": "hello@example.com",
      "firstName": "Henk",
      "lastName": "Thompson",
      "referralCode": "HENKTHOMPSON",
      "imageUrl": "",
      "firstSeenIP": "10.230.163.157",
      "lastSeenIP": "184.66.242.57",
      "dateCreated": 1467222395030,
      "emailHash": "180bc1412a038746af9b37fb782724a2",
      "referralSource": "http://unifiedtestapp.herokuapp.com/",
      "locale": null,
      "shareLinks": {
        "shareLink": "http://ssqt.co/mvbcF5",
        "facebookShareLink": "http://ssqt.co/mmbcF5",
        "twitterShareLink": "http://ssqt.co/mRbcF5",
        "emailShareLink": "http://ssqt.co/mLbcF5",
        "linkedinShareLink": "http://ssqt.co/mLbcF5",
        "mobileShareLink": "http://ssqt.co/mebcF5",
        "mobileFacebookShareLink": "http://ssqt.co/mnbcF5",
        "mobileTwitterShareLink": "http://ssqt.co/mCbcF5",
        "mobileEmailShareLink": "http://ssqt.co/mEbcF5",
        "EMBED": {
          "shareLink": "http://ssqt.co/mQbcF5",
          "facebookShareLink": "http://ssqt.co/mwbcF5",
          "twitterShareLink": "http://ssqt.co/mcbcF5",
          "emailShareLink": "http://ssqt.co/mJbcF5",
          "linkedinShareLink": "http://ssqt.co/mHbcF5"
        },
        "POPUP": {
          "shareLink": "http://ssqt.co/m5bcF5",
          "facebookShareLink": "http://ssqt.co/m9bcF5",
          "twitterShareLink": "http://ssqt.co/mMbcF5",
          "emailShareLink": "http://ssqt.co/mobcF5",
          "linkedinShareLink": "http://ssqt.co/m7bcF5"
        },
        "HOSTED": {
          "shareLink": "http://ssqt.co/mtbcF5",
          "facebookShareLink": "http://ssqt.co/mubcF5",
          "twitterShareLink": "http://ssqt.co/mSbcF5",
          "emailShareLink": "http://ssqt.co/mlbcF5",
          "linkedinShareLink": "http://ssqt.co/mYbcF5"
        },
        "MOBILE": {
          "shareLink": "http://ssqt.co/mebcF5",
          "facebookShareLink": "http://ssqt.co/mnbcF5",
          "twitterShareLink": "http://ssqt.co/mCbcF5",
          "emailShareLink": "http://ssqt.co/mEbcF5",
          "linkedinShareLink": "http://ssqt.co/m3bcF5"
        },
        "EMAIL": {
          "shareLink": "http://ssqt.co/mPbcF5",
          "facebookShareLink": "http://ssqt.co/mTbcF5",
          "twitterShareLink": "http://ssqt.co/mGbcF5",
          "emailShareLink": "http://ssqt.co/mbbcF5",
          "linkedinShareLink": "http://ssqt.co/m1bcF5"
        }
      }
    }
  },
  "variables": {
    "jsOptions": {
      "widget": {
        "defaultWidgetType": "REFERRER_WIDGET"
      },
      "conversionUrls": [
        "^https:\\/\\/example\\.com\\/thank\\-you([^a-zA-Z0-9.\\-_~!$&'()*+,;=:@/]+?.*$|$)"
      ],
      "widgetUrlMappings": [
        {
          "widgetType": "CONVERSION_WIDGET",
          "showAsCTA": true,
          "displayOnLoad": true,
          "url": "^https:\\/\\/example\\.com\\/widgetPage\\/([^a-zA-Z0-9.\\-_~!$&'()*+,;=:@/]+?.*$|$)"
        }
      ]
    },
    "widget": {
      "REFERRER_WIDGET": {
        "configuration": {
          "themeMapping": "widget"
        },
        "content": {
          "widgetCustomization": {
            "widgetFont": "\"Helvetica Neue\",Helvetica,Arial,sans-serif",
            "headerColor": "#4486E1",
            "heading": "Give ${{math programDetails.referredRewardDetails.credit ' / 100'}} and Get ${{math programDetails.referrerRewardDetails.credit ' / 100'}}!",
            "headerDetails": "Give a friend ${{math programDetails.referredRewardDetails.credit ' / 100'}} credit off {{companyName}} and receive ${{math programDetails.referrerRewardDetails.credit ' / 100'}} for yourself when they pay their first bill.",
            "shareCodeDetails": "Share the link below or use the code **{{user.referralCode}}**",
            "registrationHeader": "Thanks for sending your first referral!<br>Give us your email to ensure you get rewarded when your referral is used."
          },
          "shareMessaging": {
            "emailShareSubject": "Get ${{math programDetails.referredRewardDetails.credit ' / 100'}} off {{companyName}}",
            "emailShareBody": "Sign up for a {{companyName}} account and we both get ${{math programDetails.referredRewardDetails.credit ' / 100'}} free credit. Use this link {{shareLinks.emailShareLink}}",
            "facebookShareImageURL": "",
            "facebookShareSubject": "Facebook Title in SaaSquatch Portal",
            "facebookShareBody": "Facebook Share body in SaaSquatch Portal",
            "twitterShareBody": "Sign up for a {{companyName}} account and we both get ${{math programDetails.referredRewardDetails.credit ' / 100'}} free credit. Use this link {{shareLinks.twitterShareLink}}",
            "smsShareBody": "Sign up for a {{companyName}} account and we both get ${{math programDetails.referredRewardDetails.credit ' / 100'}} free credit. Use this link {{share-link 'SMS'}}"
          }
        },
        "cta": {
          "configuration": {
            "themeMapping": "cta-widget"
          },
          "content": {
            "buttonSide": "right",
            "buttonPosition": "bottom",
            "buttonColor": "#4486E1",
            "buttonWidth": 230,
            "buttonText": "Refer Friends For Rewards"
          }
        }
      },
      "CONVERSION_WIDGET": {
        "configuration": {
          "themeMapping": "conversion-widget"
        },
        "content": {
          "widgetCustomization": {
            "widgetHeaderImage": "{{assets 'images/conversion.png'}}",
            "widgetFont": "\"Helvetica Neue\",Helvetica,Arial,sans-serif",
            "headerColor": "#444",
            "heading": "You were Successfully Referred to {{companyName}}",
            "headerDetails": "Use the Referral Code<br><span id=\"squatch-share-code\">{{referredBy.referredByUser.referralCode}}</span><br>at checkout to receive your referral discount",
            "buttonCopy": "COPY CODE"
          }
        },
        "cta": {
          "configuration": {
            "themeMapping": "cta-widget"
          },
          "content": {
            "buttonSide": "right",
            "buttonPosition": "bottom",
            "buttonColor": "#4486E1",
            "buttonWidth": 230,
            "buttonText": "Refer Friends For Rewards"
          }
        }
      }
    },
    "email": {
      "REFERRER_REWARD_LIMIT_REACHED": {
        "configuration": {
          "fromName": "{{companyName}}",
          "fromAddress": "referral@mail.saasquat.ch",
          "subject": "You have hit the reward limit!",
          "themeMapping": "emails/referrer-reward-limit"
        },
        "content": {
          "shareCTA": "However, you can keep referring new users and giving ${{programDetails.referrerRewardDetails.credit}} off with your code. - **{{user.referralCode}}**",
          "hasShareLink": true,
          "shareButtonHeader": "Refer and Earn ${{math programDetails.referrerRewardDetails.credit ' / 100'}} of Credit",
          "headerImageUrl": "{{assets 'images/email/reward-limit-header.png'}}",
          "headerContent": "#Reward Limit\nYou have successfully referred the maximum!",
          "bodyContent": "Thanks for spreading the word about {{companyName}}. You've referred so many new people that you've earned the maximum amount of available credit."
        }
      },
      "REFERRAL_CONVERTED": {
        "configuration": {
          "fromName": "{{companyName}}",
          "fromAddress": "referral@mail.saasquat.ch",
          "subject": "Congrats! You have earned ${{math programDetails.referrerRewardDetails.credit ' / 100'}} of free credit with {{companyName}}",
          "themeMapping": "emails/referral-converted"
        },
        "content": {
          "shareCTA": "Keep sharing your code and earn more discounts - **{{user.referralCode}}**",
          "hasShareLink": true,
          "shareButtonHeader": "Refer and Earn ${{math programDetails.referrerRewardDetails.credit ' / 100'}} of Credit",
          "headerImageUrl": "{{assets 'images/email/referral-converted-header.png'}}",
          "headerContent": "#Congratulations\nYour friend has signed up for a {{companyName}} Account!",
          "bodyContent": "You have now earned ${{math programDetails.referrerRewardDetails.credit ' / 100'}} of free credit with {{companyName}}. Refer more friends to save even more!"
        }
      },
      "REFERRAL_STARTED": {
        "configuration": {
          "fromName": "{{companyName}}",
          "fromAddress": "referral@mail.saasquat.ch",
          "subject": "​{{stringEmptyHandler newReferral.referredUser.firstName onEmpty='A friend'}}​ helped you get one step closer to free credit with {{companyName}}​!",
          "themeMapping": "emails/referral-started"
        },
        "content": {
          "shareCTA": "Keep sharing your code and earn more discounts - **{{user.referralCode}}**",
          "hasShareLink": true,
          "shareButtonHeader": "Refer and Earn ${{math programDetails.referrerRewardDetails.credit ' / 100'}} of Credit",
          "headerImageUrl": "{{assets 'images/email/referral-started-header.png'}}",
          "headerContent": "#Good News!\nYour friend has signed up for a free account with {{companyName}}!",
          "bodyContent": "{{stringEmptyHandler newReferral.referredUser.firstName onEmpty='A friend'}}​ is currently trying out {{companyName}}. As a thank you from us, if they become a paying user, you will automatically receive ${{math programDetails.referrerRewardDetails.credit ' / 100'}} of free credit with {{companyName}}"
        }
      }
    }
  },
  "variablesSchema": {
    "title": "Example Theme Variables Schema",
    "type": "object",
    "properties": {
      "jsOptions": {
        "type": "object",
        "properties": {
          "widget": {
            "type": "object",
            "properties": {
              "defaultWidgetType": {
                "type": "string",
                "title": "Default Widget Type",
                "default": "REFERRER_WIDGET",
                "enum": [
                  "REFERRER_WIDGET",
                  "CONVERSION_WIDGET"
                ],
                "options": {
                  "enum_titles": [
                    "Referrer's Widget",
                    "Referred User Widget"
                  ]
                }
              }
            }
          },
          "conversionUrls": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "widgetUrlMappings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string"
                },
                "showAsCTA": {
                  "type": "boolean"
                },
                "displayOnLoad": {
                  "type": "boolean"
                },
                "widgetType": {
                  "type": "string",
                  "enum": [
                    "REFERRER_WIDGET",
                    "CONVERSION_WIDGET"
                  ],
                  "options": {
                    "enum_titles": [
                      "Referrer's Widget",
                      "Referred User Widget"
                    ]
                  }
                }
              }
            }
          }
        }
      },
      "widget": {
        "type": "object",
        "properties": {
          "REFERRER_WIDGET": {
            "type": "object",
            "properties": {
              "configuration": {
                "properties": {
                  "themeMapping": {
                    "default": "widget"
                  }
                }
              },
              "content": {
                "properties": {
                  "widgetCustomization": {
                    "title": "Customize Referral Widget",
                    "properties": {
                      "widgetFont": {
                        "default": "\"Helvetica Neue\",Helvetica,Arial,sans-serif"
                      },
                      "headerColor": {
                        "default": "#4486E1"
                      },
                      "heading": {
                        "default": "Give ${{math programDetails.referredRewardDetails.credit ' / 100'}} and Get ${{math programDetails.referrerRewardDetails.credit ' / 100'}}!"
                      },
                      "headerDetails": {
                        "default": "Give a friend ${{math programDetails.referredRewardDetails.credit ' / 100'}} credit off {{companyName}} and receive ${{math programDetails.referrerRewardDetails.credit ' / 100'}} for yourself when they pay their first bill."
                      },
                      "shareCodeDetails": {
                        "type": "string",
                        "format": "markdown",
                        "title": "Call To Action Text",
                        "default": "Share the link below or use the code **{{user.referralCode}}**",
                        "options": {
                          "input_height": "100px",
                          "validate": [
                            "handlebars"
                          ]
                        }
                      },
                      "registrationHeader": {
                        "type": "string",
                        "format": "markdown",
                        "title": "Registration Header",
                        "default": "Thanks for sending your first referral!<br>Give us your email to ensure you get rewarded when your referral is used.",
                        "options": {
                          "input_height": "100px",
                          "validate": [
                            "handlebars"
                          ]
                        }
                      }
                    },
                    "$ ref": "#/definitions/widget/definitions/content/definitions/generalBody"
                  },
                  "shareMessaging": {
                    "$ ref": "#/definitions/widget/definitions/content/definitions/shareContent",
                    "required": [
                      "emailShareBody",
                      "emailShareSubject",
                      "facebookShareSubject",
                      "facebookShareBody",
                      "twitterShareBody",
                      "smsShareBody"
                    ]
                  }
                }
              },
              "cta": {
                "type": "object",
                "properties": {
                  "configuration": {
                    "$ ref": "#/definitions/widget/definitions/cta/definitions/configuration"
                  },
                  "content": {
                    "properties": {
                      "buttonText": {
                        "default": "Refer Friends For Rewards"
                      }
                    },
                    "$ ref": "#/definitions/widget/definitions/cta/definitions/content"
                  }
                }
              }
            }
          },
          "CONVERSION_WIDGET": {
            "type": "object",
            "properties": {
              "configuration": {
                "properties": {
                  "themeMapping": {
                    "default": "conversion-widget"
                  }
                }
              },
              "content": {
                "properties": {
                  "widgetCustomization": {
                    "title": "Customize Referred Widget",
                    "properties": {
                      "widgetHeaderImage": {
                        "type": "string",
                        "format": "text",
                        "minLength": 1,
                        "title": "Heading Image Url:",
                        "default": "{{assets 'images/conversion.png'}}"
                      },
                      "widgetFont": {
                        "default": "\"Helvetica Neue\",Helvetica,Arial,sans-serif"
                      },
                      "headerColor": {
                        "default": "#444"
                      },
                      "heading": {
                        "default": "You were Successfully Referred to {{companyName}}"
                      },
                      "headerDetails": {
                        "default": "Use the Referral Code<br><span id=\"squatch-share-code\">{{referredBy.referredByUser.referralCode}}</span><br>at checkout to receive your referral discount"
                      },
                      "buttonCopy": {
                        "type": "string",
                        "format": "text",
                        "minLength": 1,
                        "title": "Button Copy",
                        "default": "COPY CODE"
                      }
                    },
                    "$ ref": "#/definitions/widget/definitions/content/definitions/generalBody"
                  }
                }
              },
              "cta": {
                "type": "object",
                "properties": {
                  "configuration": {
                    "$ ref": "#/definitions/widget/definitions/cta/definitions/configuration"
                  },
                  "content": {
                    "properties": {
                      "buttonText": {
                        "default": "Get Rewarded"
                      }
                    },
                    "$ ref": "#/definitions/widget/definitions/cta/definitions/content"
                  }
                }
              }
            }
          }
        }
      },
      "email": {
        "type": "object",
        "properties": {
          "REFERRER_REWARD_LIMIT_REACHED": {
            "type": "object",
            "properties": {
              "configuration": {
                "properties": {
                  "subject": {
                    "default": "You have hit the reward limit!"
                  },
                  "themeMapping": {
                    "default": "emails/referrer-reward-limit"
                  }
                },
                "$ ref": "#/definitions/email/definitions/configuration"
              },
              "content": {
                "properties": {
                  "headerImageUrl": {
                    "default": "{{assets 'images/email/reward-limit-header.png'}}"
                  },
                  "headerContent": {
                    "default": "#Reward Limit\nYou have successfully referred the maximum!"
                  },
                  "bodyContent": {
                    "default": "Thanks for spreading the word about {{companyName}}. You've referred so many new people that you've earned the maximum amount of available credit."
                  },
                  "shareCTA": {
                    "default": "However, you can keep referring new users and giving ${{programDetails.referrerRewardDetails.credit}} off with your code. - **{{user.referralCode}}**"
                  }
                },
                "$ ref": "#/definitions/email/definitions/shareContent"
              }
            }
          },
          "REFERRAL_CONVERTED": {
            "type": "object",
            "properties": {
              "configuration": {
                "properties": {
                  "subject": {
                    "default": "Congrats! You have earned ${{math programDetails.referrerRewardDetails.credit ' / 100'}} of free credit with {{companyName}}"
                  },
                  "themeMapping": {
                    "default": "emails/referral-converted"
                  }
                },
                "$ ref": "#/definitions/email/definitions/configuration"
              },
              "content": {
                "properties": {
                  "headerImageUrl": {
                    "default": "{{assets 'images/email/referral-converted-header.png'}}"
                  },
                  "headerContent": {
                    "default": "#Congratulations\nYour friend has signed up for a {{companyName}} Account!"
                  },
                  "bodyContent": {
                    "default": "You have now earned ${{math programDetails.referrerRewardDetails.credit ' / 100'}} of free credit with {{companyName}}. Refer more friends to save even more!"
                  }
                },
                "$ ref": "#/definitions/email/definitions/shareContent"
              }
            }
          },
          "REFERRAL_STARTED": {
            "type": "object",
            "properties": {
              "configuration": {
                "properties": {
                  "subject": {
                    "default": "​{{stringEmptyHandler newReferral.referredUser.firstName onEmpty='A friend'}}​ helped you get one step closer to free credit with {{companyName}}​!"
                  },
                  "themeMapping": {
                    "default": "emails/referral-started"
                  }
                },
                "$ ref": "#/definitions/email/definitions/configuration"
              },
              "content": {
                "properties": {
                  "headerImageUrl": {
                    "default": "{{assets 'images/email/referral-started-header.png'}}"
                  },
                  "headerContent": {
                    "default": "#Good News!\nYour friend has signed up for a free account with {{companyName}}!"
                  },
                  "bodyContent": {
                    "default": "{{stringEmptyHandler newReferral.referredUser.firstName onEmpty='A friend'}}​ is currently trying out {{companyName}}. As a thank you from us, if they become a paying user, you will automatically receive ${{math programDetails.referrerRewardDetails.credit ' / 100'}} of free credit with {{companyName}}"
                  }
                },
                "$ ref": "#/definitions/email/definitions/shareContent"
              }
            }
          }
        }
      }
    },
    "definitions": {
      "widget": {
        "definitions": {
          "content": {
            "definitions": {
              "generalBody": {
                "type": "object",
                "properties": {
                  "widgetFont": {
                    "type": "string",
                    "title": "Widget Font:",
                    "enum": [
                      "\"Helvetica Neue\",Helvetica,Arial,sans-serif",
                      "'Lato',sans-serif",
                      "'Times New Roman'",
                      "Arial",
                      "Courier",
                      "Tahoma",
                      "Verdana",
                      "Georgia"
                    ],
                    "options": {
                      "enum_titles": [
                        "Helvetica Neue",
                        "Lato",
                        "Times New Roman",
                        "Arial",
                        "Courier",
                        "Tahoma",
                        "Verdana",
                        "Georgia"
                      ]
                    }
                  },
                  "headerColor": {
                    "type": "string",
                    "format": "text",
                    "minLength": 1,
                    "title": "Heading Text Color (hex code):",
                    "options": {
                      "validate": [
                        "hex-color"
                      ]
                    }
                  },
                  "heading": {
                    "type": "string",
                    "minLength": 1,
                    "format": "markdown",
                    "title": "Heading Text:",
                    "options": {
                      "input_height": "100px",
                      "validate": [
                        "handlebars"
                      ]
                    }
                  },
                  "headerDetails": {
                    "type": "string",
                    "minLength": 1,
                    "format": "markdown",
                    "title": "Body Text:",
                    "options": {
                      "input_height": "100px",
                      "validate": [
                        "handlebars"
                      ]
                    }
                  }
                }
              },
              "shareContent": {
                "title": "Share Messaging",
                "type": "object",
                "properties": {
                  "emailShareSubject": {
                    "type": "string",
                    "description": "Email share subject",
                    "minLength": 4,
                    "default": "Get ${{math programDetails.referredRewardDetails.credit ' / 100'}} off {{companyName}}"
                  },
                  "emailShareBody": {
                    "type": "string",
                    "description": "Email share body",
                    "minLength": 4,
                    "default": "Sign up for a {{companyName}} account and we both get ${{math programDetails.referredRewardDetails.credit ' / 100'}} free credit. Use this link {{shareLinks.emailShareLink}}"
                  },
                  "facebookShareImageURL": {
                    "type": "string",
                    "description": "Facebook URL Image",
                    "default": ""
                  },
                  "facebookShareSubject": {
                    "type": "string",
                    "description": "Facebook share subject",
                    "minLength": 4,
                    "default": "Get ${{math programDetails.referredRewardDetails.credit ' / 100'}} off {{companyName}}"
                  },
                  "facebookShareBody": {
                    "type": "string",
                    "description": "Facebook share subject",
                    "minLength": 4,
                    "default": "Sign up for a {{companyName}} account and we both get ${{math programDetails.referredRewardDetails.credit ' / 100'}} free credit. Use this link {{shareLinks.facebookShareLink}}"
                  },
                  "twitterShareBody": {
                    "type": "string",
                    "description": "Twitter share body",
                    "minLength": 4,
                    "default": "Sign up for a {{companyName}} account and we both get ${{math programDetails.referredRewardDetails.credit ' / 100'}} free credit. Use this link {{shareLinks.twitterShareLink}}"
                  },
                  "smsShareBody": {
                    "type": "string",
                    "description": "SMS share body",
                    "minLength": 4,
                    "default": "Sign up for a {{companyName}} account and we both get ${{math programDetails.referredRewardDetails.credit ' / 100'}} free credit. Use this link {{share-link 'SMS'}}"
                  }
                }
              }
            }
          },
          "cta": {
            "definitions": {
              "configuration": {
                "type": "object",
                "properties": {
                  "themeMapping": {
                    "default": "cta-widget"
                  }
                }
              },
              "content": {
                "type": "object",
                "title": "Customize CTA Button",
                "properties": {
                  "buttonSide": {
                    "type": "string",
                    "title": "Button Side:",
                    "default": "right",
                    "enum": [
                      "left",
                      "right",
                      "center"
                    ],
                    "options": {
                      "enum_titles": [
                        "Left Side",
                        "Right Side",
                        "Center"
                      ]
                    }
                  },
                  "buttonPosition": {
                    "type": "string",
                    "title": "Button Position:",
                    "default": "bottom",
                    "enum": [
                      "top",
                      "bottom",
                      "middle"
                    ],
                    "options": {
                      "enum_titles": [
                        "Top",
                        "Bottom",
                        "Middle"
                      ]
                    }
                  },
                  "buttonColor": {
                    "type": "string",
                    "format": "text",
                    "minLength": 1,
                    "title": "Button Color (hex code):",
                    "default": "#4486E1",
                    "options": {
                      "validate": [
                        "hex-color"
                      ]
                    }
                  },
                  "buttonText": {
                    "type": "string",
                    "title": "Button Text",
                    "format": "markdown",
                    "propertyOrder": 4,
                    "options": {
                      "validate": [
                        "handlebars"
                      ],
                      "input_height": "50px"
                    }
                  },
                  "buttonWidth": {
                    "type": "integer",
                    "title": "Button Width",
                    "format": "number",
                    "default": 230
                  }
                }
              }
            }
          }
        }
      },
      "email": {
        "definitions": {
          "configuration": {
            "type": "object",
            "title": "Email Defaults",
            "properties": {
              "fromName": {
                "type": "string",
                "title": "From Name",
                "default": "{{companyName}}",
                "propertyOrder": 1,
                "minLength": 1,
                "options": {
                  "validate": [
                    "handlebars"
                  ]
                }
              },
              "fromAddress": {
                "type": "string",
                "title": "From Address",
                "format": "email",
                "default": "referral@mail.saasquat.ch",
                "propertyOrder": 2,
                "minLength": 5,
                "options": {
                  "validate": [
                    "email"
                  ]
                }
              },
              "subject": {
                "type": "string",
                "title": "Subject",
                "format": "textarea",
                "default": "Referral Update",
                "propertyOrder": 3,
                "minLength": 1,
                "options": {
                  "validate": [
                    "handlebars"
                  ],
                  "input_height": "50px"
                }
              },
              "themeMapping": {
                "options": {
                  "hidden": true
                }
              }
            }
          },
          "generalContent": {
            "type": "object",
            "properties": {
              "headerImageUrl": {
                "type": "string",
                "title": "Header Image URL",
                "propertyOrder": 1,
                "options": {
                  "validate": [
                    "handlebars"
                  ]
                }
              },
              "headerContent": {
                "type": "string",
                "title": "Header Content",
                "format": "markdown",
                "propertyOrder": 2,
                "options": {
                  "validate": [
                    "handlebars"
                  ],
                  "input_height": "50px"
                }
              },
              "bodyContent": {
                "type": "string",
                "title": "Body Content",
                "format": "markdown",
                "propertyOrder": 3,
                "options": {
                  "validate": [
                    "handlebars"
                  ],
                  "input_height": "50px"
                }
              },
              "footer": {
                "type": "string",
                "title": "Footer",
                "format": "markdown",
                "propertyOrder": 1001,
                "options": {
                  "validate": [
                    "handlebars"
                  ],
                  "input_height": "50px"
                }
              }
            }
          },
          "shareContent": {
            "type": "object",
            "properties": {
              "shareCTA": {
                "type": "string",
                "title": "Share Code CTA",
                "format": "markdown",
                "propertyOrder": 4,
                "default": "Keep sharing your code and earn more discounts - **{{user.referralCode}}**",
                "options": {
                  "validate": [
                    "handlebars"
                  ],
                  "input_height": "50px"
                }
              },
              "hasShareLink": {
                "type": "boolean",
                "format": "checkbox",
                "title": "Enable Share Link",
                "propertyOrder": 5,
                "default": true
              },
              "shareButtonHeader": {
                "type": "string",
                "title": "Share Button Header",
                "format": "markdown",
                "propertyOrder": 6,
                "default": "Refer and Earn ${{math programDetails.referrerRewardDetails.credit ' / 100'}} of Credit",
                "options": {
                  "validate": [
                    "handlebars"
                  ],
                  "input_height": "50px"
                }
              }
            }
          }
        }
      }
    },
    "required": [
      "jsOptions",
      "widget",
      "email"
    ]
  }
} */}
In this Article: