Create a language or brand variant
Create another presentation of a template, give it attributes, and review it before you publish the catalog.
User guide navigation
On this page
Before you begin
Use a variant when the purpose of the document and the data contract stay the same, but the language, brand, or layout differs. You need Content Author access to a template in a catalog you can edit. If you want to maintain the purpose or contract on its own, create a new template.
Create the presentation
- Open the template’s Variants tab and choose + New variant.
- Enter a Title, such as English — Corporate. Keep the Slug (ID) Epistola fills in.
- Choose Create variant.
- Open the new variant with Open editor (the pencil) on its card.
- Build its layout and wording. A new variant starts as a blank document. Epistola does not change or translate the Default variant.
- Use fields from the shared data contract. Preview the result with realistic examples.
You do not publish a variant on its own. Your changes go into the catalog’s next release. They reach documents when you publish the catalog with Publish…. How that works is in From template to document.
The card shows Not checked yet until you choose Mark ready or publish the catalog. A later edit makes it Not checked yet again.
Add attributes
Attributes describe the presentation, for authors and for connected systems. For example, brand=corporate stands for a corporate layout. The attribute definition must already exist in a catalog. How to create one is in Attributes.
- Choose Settings (the gear) on the variant’s card.
- Under Add attribute, choose the attribute and choose Add.
- Select or type its value. The value must match the definition exactly, including upper and lower case.
- Choose Save.
The picker names each attribute with its catalog, such as Brand (letters.brand). That way you can tell two attributes with the same name apart.
The System catalog already has language, locale, and country. Use those, and do not create your own attributes with these keys. Which values you can use is explained in Attributes and Code Lists.
Two variants of one template cannot have the same set of attributes, because no request could tell them apart. Epistola refuses the save and names the other variant. Variants without attributes are the exception: a request can only reach them by their key.
When variants have attributes, a filter bar appears above the cards. It only narrows the cards you see.
Decide how it is selected
Agree with the integration owner how the caller selects a variant. Does it name the variant with variantKey, or does it send attribute criteria?
- Required criteria limit which variants qualify.
- Optional criteria affect which variant is preferred.
- If no variant matches the required criteria, Epistola falls back to the default variant.
- If two variants share the best score, Epistola returns an error, because the choice is ambiguous.
The scoring rules are in Attributes.
Review the default variant on purpose. It must suit all the cases that can fall back to it. To make another variant the default, choose Make default on its card.
Attributes classify and select. They do not translate text or replace business rules.
Review all presentations
Preview each variant with short and long input. Check wording, dates and numbers (these depend on the locale), fonts, and page layout. If a brand needs different styling, a theme on the variant can override the template default.
Use Review a template, then Publish a template. Give the integration owner the variant key and the selection criteria you agreed on.
Documentation
Guided tour
Epistola is open source, not free of cost. The organisations that use it fund its development, through Epistola or an Official Partner. We are steward-owned: fair prices, no profit maximisation. How Epistola is funded →