Use this file to discover all available pages before exploring further.
The Employment Offer Letter sample demonstrates how multiple TemplateMark features work together in a real-world business document. It includes nested concepts, date formatting, monetary values, conditional sections, and clauses.
The model defines a comprehensive employment offer structure:
namespace org.accordproject.employment@1.0.0/** * Represents a monetary value with currency */concept MonetaryAmount { o Double doubleValue o String currencyCode}/** * Optional probation details */concept Probation { o Integer months}/** * Main template model for the employment offer */@templateconcept EmploymentOffer { o String candidateName o String companyName o String roleTitle o MonetaryAmount annualSalary o DateTime startDate o Probation probation optional}
Key Features:
Nested Concepts: MonetaryAmount and Probation are used within EmploymentOffer
DateTime Type: startDate field for date handling
Optional Field: probation field marked as optional
Structured Data: Salary includes both amount and currency code
DATE: {{startDate as "DD MMMM YYYY"}}Dear {{candidateName}},We are pleased to offer you the position of **{{roleTitle}}** at **{{companyName}}**.Your employment with {{companyName}} will commence on {{startDate as "DD MMMM YYYY"}}.{{#clause annualSalary}}Your annual gross salary will be **{{doubleValue as "0,0"}} {{currencyCode}}**, payable in accordance with company policies.{{/clause}}{{#if probation}}{{#clause probation}}This offer includes a probation period of **{{months}} months**, during which your performance and suitability for the role will be evaluated.{{/clause}}{{/if}}We are excited about the opportunity to work with you and look forward to your contribution to the team.Sincerely, **Human Resources**{{companyName}}
Key Features:
Date Formatting: {{startDate as "DD MMMM YYYY"}} formats dates
Number Formatting: {{doubleValue as "0,0"}} adds thousand separators
When rendered with the data above, this template produces:DATE: 01 February 2025Dear Ishan Gupta,We are pleased to offer you the position of Junior AI Engineer at Tech Innovators Inc..Your employment with Tech Innovators Inc. will commence on 01 February 2025.Your annual gross salary will be 85,000 USD, payable in accordance with company policies.This offer includes a probation period of 3 months, during which your performance and suitability for the role will be evaluated.We are excited about the opportunity to work with you and look forward to your contribution to the team.Sincerely, Human Resources
Tech Innovators Inc.
import { TemplateMarkTransformer } from '@accordproject/markdown-template';const MODEL = `namespace org.accordproject.employment@1.0.0concept MonetaryAmount { o Double doubleValue o String currencyCode}concept Probation { o Integer months}@templateconcept EmploymentOffer { o String candidateName o String companyName o String roleTitle o MonetaryAmount annualSalary o DateTime startDate o Probation probation optional}`;const TEMPLATE = `DATE: {{startDate as "DD MMMM YYYY"}}Dear {{candidateName}},We are pleased to offer you the position of **{{roleTitle}}** at **{{companyName}}**.Your employment with {{companyName}} will commence on {{startDate as "DD MMMM YYYY"}}.{{#clause annualSalary}}Your annual gross salary will be **{{doubleValue as "0,0"}} {{currencyCode}}**, payable in accordance with company policies.{{/clause}}{{#if probation}}{{#clause probation}}This offer includes a probation period of **{{months}} months**, during which your performance and suitability for the role will be evaluated.{{/clause}}{{/if}}We are excited about the opportunity to work with you and look forward to your contribution to the team.Sincerely, **Human Resources** {{companyName}}`;const DATA = { "$class": "org.accordproject.employment@1.0.0.EmploymentOffer", "candidateName": "Ishan Gupta", "companyName": "Tech Innovators Inc.", "roleTitle": "Junior AI Engineer", "annualSalary": { "$class": "org.accordproject.employment@1.0.0.MonetaryAmount", "doubleValue": 85000, "currencyCode": "USD" }, "startDate": "2025-02-01T09:00:00.000Z", "probation": { "$class": "org.accordproject.employment@1.0.0.Probation", "months": 3 }};const transformer = new TemplateMarkTransformer();const result = await transformer.generate({ model: MODEL, template: TEMPLATE, data: DATA});console.log(result);