Current Lesson
Course Content
Course Content

Code in emails

This guide is still super rough, but we wanted to get it out there while we keep working on it.

Get in touch with your questions or issues.

Interpolations

Insert this string between curly braces, eg. {{interpolation_key}} or {{global.some_key}} or {{field.some_key}}.

Contact related:

  • name: first names

  • firstname: first names

  • lastname: last name

  • fullname: first and last names

  • email

  • ref: affiliate ref string of referring affiliate

  • username: their Simplero ID

  • password: their password, if it was auto-generated by the system. If they changed their password, this will be blank.

  • signup_reminder: reminder of why they signed up

  • subjectprefix: prefix for the subject from the list, product, or affiliate program sent to

  • footer: footer text from the list, product, or affiliate program sent to

  • content_url: link to content for this list subscriber / purchase / participant / affiliate

  • manage_url: subscription page

  • ref: affiliate that referred this contact (if the contact is linked to an affiliate of ours)

  • own_ref: affiliate name (when contact is an affiliate of ours, otherwise will show empty)

  • contact_admin_url: contact record admin page

Purchase related:

  • purchase_url

  • edit_purchase_url

  • purchase_id

  • product_id

  • product_name

  • product_internal_name

  • product internal name - URL paramaterized:

  • product_category

  • product category - URL paramaterized: product_category_key

  • quantity

  • price_name

  • currency_code

  • coupon_code

  • received_price

  • received_tax

  • received_total

  • incoming_price

  • incoming_tax

  • incoming_total

  • sales_price

  • sales_tax

  • sales_total

  • last_charge_tx_id

  • last_charge_tx_gateway_id

Other:

  • manage_url: link to manage their subscription

  • open_image_url: URL of the image we use to track open rates

  • field.(interpolation key) for each custom field with interpolation key set

  • field.(interpolation key)_(subfield) for each custom field with interpolation key set & subfield

  • field_(id) for each custom field

  • field_(id)_(subfield) for each custom field and subfield

  • global.(key) for each global snippet

Special cases:

Facebook URL fields, telephone fields, and Twitter handle fields all ordinarily output an HTML link. In these cases you will follow the format below:

URL fields:  

 (note the spacing between text and brackets and the "_plain" at the end of the key) 

Liquid objects available

  • customer: Contact object

  • field: Contact custom fields object

  • global: Global snippets object

  • internal_name: course, product, site, group and worksheet

Global snippets

If you insert a global snippet using {{global.some_key}}, these will be replaced as the very first thing while processing the email.

This means that your snippet can contain other interpolations, or even Liquid code, and those will be evaluated in the exact same way as if you'd typed the contents of your global snippet directly into the email itself.

However, if it contains another global snippet, then that won't be replaced in the same way again. It will work, but it'll be interpreted as a Liquid expression.

Also, if you use the global snippet in a Liquid expression, eg. {{ global.some_key | upcase }}, then we will NOT be evaluating any other interpolations or Liquid code inside that global snippet.magic links  content link dynamic link purchase link payment link purchase url

Last updated 27 Feb 2023.