THANKS-SAM20 instead of a random string.
Personalised templates only apply to the Created in Mention Me option. If a reward is Managed in Shopify (you pre-create the discount and link it), you set codes in Shopify instead. See the Shopify fulfilment guide for the difference between the two options.
This page covers discount code templates for the Referral product. For influencer discount code templates, see Setting Up Automatic Shopify Discount Code Generation.
Available tokens
Combine these tokens with free text to build your template:
All tokens resolve to uppercase, and spaces and special characters (other than hyphens and underscores) are removed automatically.
Example templates
How token values are resolved
The tokens always resolve to the referring customer’s name - that is, the person who made the referral, not the friend who was referred.- For a referee reward (the friend’s discount code), the system walks back to the referrer who introduced them.
- For a referrer reward (the advocate’s own reward), the system uses their own name.
Collision handling
If a generated code already exists in Shopify, Mention Me automatically appends a random 6-letter suffix to make it unique. For example, ifSAM20 is taken, the code might become SAM20QRTVWZ.
If a name token is blank (the customer has no name on file), the suffix alone forms the code, ensuring every discount code is non-empty.
Template length
Templates can be up to 128 characters long. The token placeholders (e.g.{REFERRER_FIRST_NAME}) count towards this limit, but the actual rendered code will typically be shorter since names replace the longer placeholder text.
Non-numeric amounts
The{AMOUNT} token only renders for numeric reward values (e.g. 10, 20). For description-based rewards (e.g. “a free handbag”), {AMOUNT} renders as empty. Decimal amounts have their separator stripped, so 5.99 renders as 599. Plan your template accordingly if you use non-monetary or fractional rewards.