Skip to main content
The default helper function allows you to specify a fallback value when a shortcode field is empty. This ensures your emails always display something meaningful, even when data is missing.

Syntax

The syntax for this helper function is:
Where:
  • default is the function name
  • shortcode_value is the primary value you want to display
  • fallback_default_value is what will be displayed if the shortcode_value is empty

Examples

Using a String Fallback

If lead.full_name exists:
If lead.full_name is empty:

Using Another Shortcode as Fallback

If company.contact_phone exists:
If company.contact_phone is empty:

Best Practices

  • Always use default values for critical personalization fields
  • Keep default values generic but professional
  • Test your templates with both filled and empty fields
  • Consider using other shortcodes as fallbacks when appropriate
  • Preview your templates to ensure the fallbacks work as expected