Theme Field Reference
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
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
referrals array | The referrals made by the active user Expand Details
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
referralsLength integer | The total number of referrals made by this user | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rewardBalances array | An array of reward balances for this user Expand Details
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
shareLinks object | Share link for an individual user. Expand Details
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
referredBy object | Details of who referred the current user Expand Details
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
convertedReferral object | Details of a user who was referred by the current user (Available only in | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
locale string | The user locale, used for Internationalization.
The locale must be of the format |
{
"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"
]
}
} */}