1. First Create or edit an existing template
Follow the link here
2. Once you are in the editing screen add the smart field (see screenshot)
{{ invoices.0.extra_data.matters.0.display_number}}
3. See Preview:
This article will explain how you can easily add matter number into your email templates - no need to do this action manually.
Follow the link here
{{ invoices.0.extra_data.matters.0.display_number}}