Shortcodes for reference

Retainful lets you personalize your emails with the help of shortcodes. For example, you can include the name of the customer in the subject / body of the email using the short code.

So when an email is sent to the customer, the short code will be replaced with his name automatically.

IMPORTANT: Short codes should always have "TWO" open curly braces and two closing curly braces.

Example: {{example_shortcode}}

List of Short codes

Here is a list of popular short codes that you can use in both the Subject Lines and Email body

Customer

  • {{customer_name}} - Name of the customer (only if the customer provided one)

  • {{customer.email}} - The email address used by the customer at the checkout.

  • {{customer.phone}} - The phone number entered by customer at the checkout would be returned.

Cart / Order

  • {{abandoned_checkout_url}} - This will include a unique recovery link for the cart in the abandoned cart emails only. This redirects the customer to the store, recovers the cart and lets the customer to finish the order

  • {{abandoned_checkout_url_with_coupon_code}}- Same as the {{abandoned_checkout_url}} . But if you used the coupon block to offer a coupon code, then this will apply the coupon code automatically in the cart / checkout. If no coupon block found, this will still work like the {{abandoned_checkout_url}} short code

  • {{retainful_coupon}} - Displays the coupon code generated by the coupon block in the email editor. See more

  • {{order_number}} - The order number (applicable only for WooCommerce platform)

  • {{order_status}} - Order status (available only in post purchase emails. For abandoned carts, this value may not be available all the time)

  • {{woocommerce_totals.total_price}} - Grand total (applicable only for WooCommerce platform)

  • {{subtotal_price}} - Order subtotal (applicable only for WooCommerce platform)

  • {{woocommerce_totals.total_tax}} - Total tax amount (applicable only for WooCommerce platform)

  • {{woocommerce_totals.total_discounts}} - Total discount applied (applicable only for WooCommerce platform)

  • {{woocommerce_totals.total_shipping}} - Total shipping amount (applicable only for WooCommerce platform)

  • {{completed_at | date: "%Y-%m-%d"}} - Order date (applicable only for WooCommerce platform) [NOTE: Since there are multiple dates that WooCommerce maintains (order creation date, paid date, completed (fulfilled date)), we only capture the "paid date" as the order date.]

  • {{payment_method.name}} - Payment method (applicable only for WooCommerce platform)

Billing Address

  • {{billing_address.first_name}} - First Name of the customer

  • {{billing_address.last_name}} - Last Name of the customer

  • {{billing_address.city}} - The city chosen by the customer at the billing address.

  • {{billing_address.country}} - Country selected in billing address.

  • {{billing_address.zip}} - Zip code mentioned at the billing address.

  • {{billing_address.address1}} - The street address mentioned at the billing address is called address1. That information would be returned.

  • {{billing_address.address2}} - The extra information entered in the street address part is collected as address2.

  • {{billing_address.province}} - The state/province chosen at the billing address.

  • {{billing_address.province_code}} - The two letter code of the selected province.

  • {{billing_address.country_code}} - The two letter code of the selected country.

Shipping address

  • {{shipping_address.lastname}} - Last name of the customer in the shipping address.

  • {{shipping_address.name}} - Customer's name - both the first name and the last name.

  • {{shipping_address.city}} - The city chosen by the customer at the shipping address.

  • {{shipping_address.country}} - Country selected in shipping address.

  • {{shipping_address.zip}} - Zip code mentioned at the shipping address.

  • {{shipping_address.address1}} - The street address mentioned at the shipping address is called address1. That information would be returned.

  • {{shipping_address.address2}} - The extra information entered in the street address part is collected as address 2.

  • {{shipping_address.province}} - The state/province chosen at the shipping address.

  • {{shipping_address.province_code}} - The two letter code of the selected province.

  • {{shipping_address.country_code}} - The two letter code of the selected country.

Shop / Store

  • {{shop.name}} - This will return the name of the shop.

  • {{shop.email}} - Shows the shop's email address specified in your Woocommerce store settings.

  • {{shop.address}} - Displays the shop's address mentioned in your Woocommerce store settings.

  • {{shop.domain}} - The shop URL would be returned.

  • {{shop.address1}} - The address line 1 parameter of your Woocommerce store address would be returned.

  • {{shop.address2}} - The address line 2 parameter of your Woocommerce store address would be returned.

  • {{shop.currency}} - The default currency of the store.

  • {{shop.city}} - The city chosen at the shop's address.

  • {{shop.zip}} - The zip code mentioned in the shop address.

  • {{shop.province_code}} - The two letter code of the chosen province.

  • {{shop.country_code}} - The two-letter code of the country chosen in the store address.

Last updated