Document placeholders and tips to update
I. Common Placeholders
Placeholders are used to display dynamic data in the document. According to the document type, we can use placeholders in these fields:
Pdf: Display Name, Description, and Content
Email / SMS: Subject, Description, and Content
Formatting
Both HTML content and Subject/Description can consume placeholder by using “@Model” and then Property name and Child property separated with a period.
Example of an email subject
@Model.PolicyHolder.Reference FORSIKRINGSOVERSIKT
Example of HTML snippet showing premium
<p>Your Premium: @Model.Price.TotalPeriodPremiumIncTax.FormattedValue</p>
II. Placeholders details
a. Policyholder information
All the information of the policyholder will get through the placeholder @Model.Policyholder.{info}
You can define the DateTime format as .ToString("dd.MM.yyyy")
. For example, @Model.InsuranceContext.ShortCreationDate.Value?.ToString("dd.MM.yyyy")
Seamless information | Placeholder in document |
---|---|
ID | @Model.PolicyHolder.Id |
NIN | @Model.PolicyHolder.NIN |
Reference | @Model.PolicyHolder.Reference |
Name | @Model.PolicyHolder.Name |
Date Of Birth | @Model.PolicyHolder?.DateOfBirth |
Postal Address | @Model.PolicyHolder.Addresses.VisitingAddress?.PostalAddress |
Invoice Address | @Model.PolicyHolder.Addresses.VisitingAddress?.InvoiceAddress |
City | @Model.PolicyHolder?.City |
Phone Number | @Model.PolicyHolder?.PhoneNumber |
@Model.PolicyHolder?.Email | |
Organization Context | @Model.PolicyHolder.OrganizationContext |
b. Policy information
All the information of the policy will get through the placeholder @Model.InsuranceContext.{info}
Seamless information | Placeholder in document |
---|---|
Reference | @Model.InsuranceContext.Reference |
Product Name | @Model.InsuranceContext.ProductName |
Start Date | @Model.InsuranceContext.StartDate.FormattedValue |
End Date | @Model.InsuranceContext.EndDate.FormattedValue |
Creation Date | @Model.InsuranceContext.ShortCreationDate .FormattedValue |
Effective Date | @Model.InsuranceContext.EffectiveDate.FormattedValue |
Expiry Date | @Model.InsuranceContext.ExpiryDate .FormattedValue |
Payment Method | @Model.InsuranceContext.PaymentMethod |
Payment Frequency | @Model.InsuranceContext.PaymentFrequency |
Renewal Date | @Model.InsuranceContext.ShortRenewalDate.FormattedValue |
Renewal Count | @Model.InsuranceContext.RenewalCount |
Adjustment Count | @Model.InsuranceContext.AdjustmentCount |
Termination Reason (Only available in Policy Termination Email) | @Model.InsuranceContext.TerminationReason |
Termination Effective Date (Only available in Policy Termination Email) | @Model.InsuranceContext.TerminationEffectiveDate.FormattedValue |
d. Questions value in a policy
All the questions tag of the policy/ quote will get through the placeholder @Model.InsuranceContext.{info}
Seamless information | Placeholder in document |
---|---|
It depends on what question tags are defined in the product definition. | Given that the product has the question InsuredPersonNameTag, its placeholder will be: @Model.Product.InsuredPersonNameTag.FormattedValue (date time or amount) or @Model.Product.InsuredPersonNameTag.Value |
d. Premium policy
All the premium elements (i.e. currency, annual premium, etc.) of the policy/ quote will get through the placeholder @Model.Price.{info}
Seamless information | Placeholder in document |
---|---|
Currency Code | @Model.Price.CurrencyCode |
Annual Tariff Premium | @Model.Price.AnnualPremium.FormattedValue |
Annual Premium Include Tax | @Model.Price.AnnualPremiumIncTax.FormattedValue |
Annual Tax | @Model.Price.AnnualTax.FormattedValue |
Period Tariff Premium | @Model.Price.TotalPeriodPremium.FormattedValue |
Total Period Premium Include Tax | @Model.Price.TotalPeriodPremiumIncTax.FormattedValue |
Total Period Tax | @Model.Price.TotalPeriodTax.FormattedValue |
Delta Period Premium Include Tax | @Model.Price.DeltaPeriodPremiumIncTax.FormattedValue |
Product Commission | @Model.Price.ProductCommission.Value |
Annual Product Commission Amount | @Model.Price.AnnualProductCommissionAmount.FormattedValue |
Total Product Commission Amount | @Model.Price.TotalProductCommissionAmount.FormattedValue |
Sales Commission | @Model.Price.SalesCommission.Value |
Annual Sales Commission Amount | @Model.Price.AnnualSalesCommissionAmount.FormattedValue |
Total Sales Commission Amount | @Model.Price.AnnualPremiumIncTax.FormattedValue |
Annual Customer Discount Rate | @Model.Price.AnnualCustomerDiscountRate.Value |
Annual Customer Discount | @Model.Price.AnnualCustomerDiscount.FormattedValue |
Total Period Customer Discount Rate | @Model.Price.TotalPeriodCustomerDiscountRate.Value |
Total Period Customer Discount | @Model.Price.TotalPeriodCustomerDiscount.FormattedValue |
e. Covers in a policy
When your policy has more than one cover, there is a code below to loop for all the covers. And the cover premium will be broken down as Annual or Period depending on your code
@foreach (var coverBreakdown in Model.AnnualCoverBreakdown) {
<p>Cover Name: @coverBreakdown.CoverName.FormattedValue</p>
<p>Premium: @coverBreakdown.Premium.FormattedValue</p>
}
Seamless information | Placeholder in document |
---|---|
Cover Id | @coverBreakdown.CoverId.FormattedValue |
Cover Name | @coverBreakdown.CoverName.FormattedValue |
Cover Display Name | @coverBreakdown.CoverDisplayName.FormattedValue |
Premium | @coverBreakdown.Premium.FormattedValue |
Tax | @coverBreakdown.Tax.FormattedValue |
Premium Include Tax | @coverBreakdown.PremiumIncTax.FormattedValue |
Customer Discount Rate | @coverBreakdown.CustomerDiscountRate.FormattedValue |
Customer Discount | @coverBreakdown.CustomerDiscount.FormattedValue |
f. Salesperson of a policy
All the salesperson information of the policy/ quote will get through the placeholder @Model.SalesPerson.{info}
Seamless information | Placeholder in document |
---|---|
Id | @Model.SalesPerson.Id |
Name | @Model.SalesPerson.Name |
OrganizationName | @Model.SalesPerson.OrganizationName |
@Model.SalesPerson.Email | |
PhoneNumber | @Model.SalesPerson.PhoneNumber |
g. Sales channel of a policy
All the sales channel information of the policy/ quote will get through the placeholder @Model.SalesChannel.{info}
Seamless information | Placeholder in document |
---|---|
Id | @Model.SalesChannel.Id |
Name | @Model.SalesChannel.Name |
h. Identify policy type
This placeholder is used for identifying policy type, especially when you need to show/ hide information based on the policy type.
The example below if showing the text on policies only, and hides when the document is a quote document
@if (Model.DocumentContext.DocumentUsage == "NewBusiness" || Model.DocumentContext.DocumentUsage == "MTA" || Model.DocumentContext.DocumentUsage == "Renewal")
{
<h2 class="text-uppercase">FORSIKRINGSTILBUD</h2>
}
Seamless information | Placeholder in document |
---|---|
Policy type | Model.DocumentContext.DocumentUsage |
III. Tips when updating a document template
Always close your tags when you open it
For example, when you open the tag <h1> then you need to closed it as </h1>
No space between @ and the placeholder
For example, Seamless will show an error when you define your document template as @ Model
Use the Document Templates menu in Insurance → Document Templates
When you are not sure whether your data is always available or optional data (e.g. Optional cover can be chosen or not), then you need to mark
?
before your attribute as the exampleModel.PolicyHolder?.Name
To show information based on some conditions, you can use @If as the example below
@If (Model.DocumentContext.DocumentUsage == "NewBusiness") // this case the @ is defined at the If and won't be defined in the placeholder
{ <h1> This is a new business policy </h1> }
Else //you won't need to write @ before else
{ <h1> This is not a new business policy </h1> }
Contact Contemi team to support you in building a perfect document
Related content
If you would like to request an article, drop us a mail at seamless.support@seamless.insure