Skip to main content

email_default_preview

Creates, updates, deletes, gets or lists an email_default_preview resource.

Overview​

Nameemail_default_preview
TypeResource
Idokta.brands.email_default_preview

Fields​

The following fields are returned by SELECT queries:

Successfully generated a preview of the email template's default content.

NameDatatypeDescription
_linksobjectSpecifies link relations (see Web Linking) available using the JSON Hypertext Application Language specification. This object is used for dynamic discovery of related resources and lifecycle operations.
bodystringThe email's HTML body
subjectstringThe email's subject

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_email_default_previewselectbrandId, templateName, subdomainlanguageRetrieves a preview of an Email Template's default content. All variable references are populated using the current user's context. For example, ${user.profile.firstName}.

<x-lifecycle class="ea"></x-lifecycle> Defaults to the current user's language given the following:
- Custom languages for Okta Email Templates is enabled
- An additional language is specified for the language parameter

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
brandIdstringThe ID of the brand
subdomainstring(default: my-org)
templateNamestringThe name of the email template
languagestringThe language to use for the email. Defaults to the current user's language if unspecified.

SELECT examples​

Retrieves a preview of an Email Template's default content. All variable references are populated using the current user's context. For example, $&#123;user.profile.firstName&#125;.

<x-lifecycle class="ea"></x-lifecycle> Defaults to the current user's language given the following:
- Custom languages for Okta Email Templates is enabled
- An additional language is specified for the language parameter

SELECT
_links,
body,
subject
FROM okta.brands.email_default_preview
WHERE brandId = '{{ brandId }}' -- required
AND templateName = '{{ templateName }}' -- required
AND subdomain = '{{ subdomain }}' -- required
AND language = '{{ language }}'
;