# Fallback values for empty tokens

**URL:** <https://forum.mautic.org/t/fallback-values-for-empty-tokens/6802>\
**Category:** Product Support\
**Created:** [December 9, 2016, 3:24pm UTC](https://forum.mautic.org/t/fallback-values-for-empty-tokens/6802 "2016-12-09T15:24:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![david92938](https://avatars.discourse-cdn.com/v4/letter/d/fbc32d/32.png) [@david92938](https://forum.mautic.org/u/david92938)\
**Post date:** [December 9, 2016, 3:24pm UTC](https://forum.mautic.org/t/fallback-values-for-empty-tokens/6802/1 "2016-12-09T15:24:44Z")

</div>

How do I indicate a falback for empty tokens in emails?  
  
  
  
For example, I have this line in my email:

Quote:

QuoteIn helps companies like {contactfield=company} respond to requests...

  
Ideally, this would display the contact's company name, but if the field is empty, it results in:  

Quote:

QuoteIn helps companies like respond to requests...

  
I would like to do something like this: {contactfield=company fallback='your company'} where it uses standard text if the field is blank. This would set the indicated text to the following:  

Quote:

QuoteIn helps companies like your company respond to requests...

  
Is there currently a way to do this?

---

<div class="post-metadata">

**Author:** ![david92938](https://avatars.discourse-cdn.com/v4/letter/d/fbc32d/32.png) [@david92938](https://forum.mautic.org/u/david92938)\
**Post date:** [December 9, 2016, 3:24pm UTC](https://forum.mautic.org/t/fallback-values-for-empty-tokens/6802/2 "2016-12-09T15:24:44Z")

</div>

How do I indicate a falback for empty tokens in emails?

For example, I have this line in my email:

> [@](#):
>
> QuoteIn helps companies like {contactfield=company} respond to requests…

Ideally, this would display the contact’s company name, but if the field is empty, it results in:

> [@](#):
>
> QuoteIn helps companies like respond to requests…

I would like to do something like this: {contactfield=company fallback=‘your company’} where it uses standard text if the field is blank. This would set the indicated text to the following:

> [@](#):
>
> QuoteIn helps companies like your company respond to requests…

Is there currently a way to do this?

---

<div class="post-metadata">

**Author:** ![octavian](https://avatars.discourse-cdn.com/v4/letter/o/54ee81/32.png) [@octavian](https://forum.mautic.org/u/octavian)\
**Post date:** [March 22, 2017, 1:43pm UTC](https://forum.mautic.org/t/fallback-values-for-empty-tokens/6802/3 "2017-03-22T13:43:23Z")

</div>

Anyone? I’m looking for the same thing…

---

<div class="post-metadata">

**Author:** ![adiux](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/adiux/32/5793_2.png) [@adiux](https://forum.mautic.org/u/adiux)\
**Post date:** [February 16, 2023, 6:33pm UTC](https://forum.mautic.org/t/fallback-values-for-empty-tokens/6802/4 "2023-02-16T18:33:26Z")

</div>

I know this is an old thread but since it has no answer and is well indexed with Google I pick it up again.

As per the [documentation](https://docs.mautic.org/en/setup/variables) Mautic allows (now) to set a fallback value like this:  
`Hi {contactfield=firstname|there},`

However, as per my tests it is not possible to add two separate words as the original posters asks. This would always output your company:  
`helps {contactfield=company|your company}`
