Email template options

ou812

Member
Nov 2, 2016
121
14
18
64
I am looking for a list of attributes we can use in the email custom templates, this {{ $attributes['dialed_user'] }} adds the mailbox number "200", I want to show the mailbox name "Sales". I could not find a list of available attributes, how can I ajust to show name.

Thanks,
 
To display Sales, set the mailbox’s Description field to Sales, then use:

{{ $attributes['voicemail_description'] ?? '' }}

To fall back to the mailbox number when its description is empty:

{{ ($attributes['voicemail_description'] ?? '') ?: $attributes['dialed_user'] }}

The main attributes available in voicemail notification templates are:
AttributeContents
voicemail_descriptionMailbox Description, such as Sales
dialed_user or voicemail_idMailbox number, such as 200
origination_callee_id_nameMatching extension’s number and caller ID name, such as 200 - Sales; empty if no matching extension
caller_id_nameCaller’s name
caller_id_numberCaller’s number
message_dateMessage date/time in the account’s timezone
message_durationRecording duration
message_textTranscription, when available
new_messagesNew-message count for the mailbox
voicemail_download_urlRecording download link, when link delivery is enabled and audio exists
voicemail_file_modeattach, link, or blank
Use each attribute as {{ $attributes['attribute_name'] }}. Available attributes depend on the email type.
Update both the HTML and Plain text versions of your custom template. If you use both Default and Transcription voicemail templates, update both.

One preview limitation: its sample data currently omits voicemail_description. The fallback expression therefore shows the sample mailbox number in Preview; actual notifications receive the saved description.