Child pages (Children Display)toc | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
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:
...
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 |
...
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