Short Tags Reference
Short tags are variables that make it easy to include dynamic data like referral links and referral codes in your widget messaging. Short tags are aliases for the longer tags used by theme developers when they design widgets. This reference list the short tags you can use to customize messaging in the web portal.
The portal share message editor lets you change the default messages used for sharing. These messages can include short tags and template fields as Handlebars-style variables to make it easy to include dynamic data in your widget messaging. Some popular short codes examples are {{referralcode}}
and {{twittersharelink}}
. All short tags are aliases to longer commonly used template fields and simplify things like converting cents to dollars. Check out the developer reference at the bottom of this page for complete details.
Supported Short Tags
Short Tag | Example | Description | |
---|---|---|---|
{{company_name}} string | Acme Co. | The name of the company for the referral program as configured on your portal settings page. | |
{{email_share_link}} string | http://ssqt.co/125gasb0 | The link that should be used to establish a referral via email. Use this in the email share body tab of your portal share message editor. | |
{{facebook_share_link}} string | http://ssqt.co/125gasb1 | The link that should be used to establish a referral via Facebook. Use this in the Facebook share body tab of your portal share message editor. | |
{{twitter_share_link}} string | http://ssqt.co/125gasb2 | The link that should be used to establish a referral via Twitter. Use this in the Twitter share body tab of your portal share message editor. | |
{{referral_code}} string | BOBTESTERSON | The code that the sharing user will use to establish referrals. If your program includes a place to enter a referral code then include this code in the body of your share messages. | |
{{referrer_percent_discount}} integer | 10 | The percent discount that the referring user will receive upon successfully referring a friend. | Works with PCT_DISCOUNT |
{{referred_percent_discount}} integer | 10 | The percent discount that will be given to the referred user. | Works with PCT_DISCOUNT |
{{referrer_percent_length}} integer | 12 | The duration in months for which the referring user's discount is valid. E.g. 10% off your monthly bill for "12" months. | Works with PCT_DISCOUNT |
{{referred_percent_length}} integer | 12 | The duration in months for which the referred user's discount is valid. E.g. 10% off your monthly bill for "12" months. | Works with PCT_DISCOUNT |
{{referrer_reward_unit}} string | cents | The unit of the credit given to the referring user upon successfully referring a friend. E.g for $20 we would have | Works with CREDIT |
{{referred_reward_unit}} string | cents | The unit of the credit given to the referred user. E.g for $20 we would have | Works with CREDIT |
{{referrer_dollar_amount}} integer | 20 | The dollar amount for credit given to a referring user upon successfully referring a friend. This amount is equal to the | Works with CREDIT |
{{referred_dollar_amount}} integer | 20 | The dollar amount for credit given to a referred user. This amount is equal to the | Works with CREDIT |
{{referrer_reward_amount}} integer | 5 | The amount of credit that will be given to the referring user upon successfully referring a friend. E.g. "5" months free usage. | Works with CREDIT |
{{referred_reward_amount}} integer | 5 | The amount of credit that will be given to the referred user. E.g. "5" months free usage. | Works with CREDIT |
{{email_converted_header_image}} string | https://d35vcmgdka52pk.cloudfront.net/images/referral-converted.png | The url for the image pulled in the | |
{{email_started_header_image}} string | https://d35vcmgdka52pk.cloudfront.net/images/referral-started.png | The url for the image pulled in the | |
{{email_reward_limit_header_image}} string | https://d35vcmgdka52pk.cloudfront.net/images/referral-friend-name.png | The url for the image pulled in the | |
{{email_converted_friend_name}} string | John Smith | In the | |
{{email_started_friend_name}} string | John Smith | In the |
Mappings Developer Reference
Every short tag gets wrapped to a long tag that is uses one of the theme context fields or helpers. Embedded template fields with corresponding short tag aliases will be replaced with their respective short tags when viewed in the portal share message editor. It is a two-way transformation so as a developer, you will always see the longer form and will never see short tags in variables, theme context, or anywhere except for the portal itself.
Short Tag Seen in the portal | Mapped Handlebars Tag Seen in the API and theme field context | |
{{company_name}} | {{companyName}} | |
{{email_share_link}} | {{shareLinks.emailShareLink}} | |
{{facebook_share_link}} | {{shareLinks.facebookShareLink}} | |
{{twitter_share_link}} | {{shareLinks.twitterShareLink}} | |
{{referral_code}} | {{user.referralCode}} | |
{{referrer_percent_discount}} | {{programDetails.referrerRewardDetails.discountPercent}} | |
{{referred_percent_discount}} | {{programDetails.referredRewardDetails.discountPercent}} | |
{{referrer_percent_length}} | {{programDetails.referrerRewardDetails.monthsDiscountValid}} | |
{{referred_percent_length}} | {{programDetails.referredRewardDetails.monthsDiscountValid}} | |
{{referrer_reward_unit}} | {{programDetails.referrerRewardDetails.unit}} | |
{{referred_reward_unit}} | {{programDetails.referredRewardDetails.unit}} | |
{{referrer_dollar_amount}} | {{math programDetails.referrerRewardDetails.credit ' / 100'}} | |
{{referred_dollar_amount}} | {{math programDetails.referredRewardDetails.credit ' / 100'}} | |
{{referrer_reward_amount}} | {{programDetails.referrerRewardDetails.credit}} | |
{{referred_reward_amount}} | {{programDetails.referredRewardDetails.credit}} |