Generating quotes using the Smartcat Template Engine

Smartcat allows you to generate quotes in PDF format. For this purpose, you can use the standard template or create your own templates using the Smartcat Template Engine technology. It can be used to create a single template for all clients or individual templates for each client.

Below is the data model used to generate quotes in PDF format. These objects and their respective fields can be used to develop custom templates using the Smartcat Template Engine technology.

Company

Information about the company that issued the quote

Field name

Data type

Description

Name

string

Company name as in profile

LegalName

string

Legal name

 

The standard template uses the company’s legal name, if available. Otherwise, the name provided in the company’s profile is used:

<<if [Company.LegalName != null]>>

<<[Company.LegalName]>><<else>><<[Company.Name]>><</if>>

 

Client

Client details

Field name

Data type

Description

Name

string

Name

Vat

string

VAT number or other tax ID

ContactName

string

Contact person's name

ContactEmail

string

Contact person's email

Comment

string

Comment specified for a client in Smartcat

Website string Client's website
LegalName string Client's company legal name
Address string Address

 

Below is an example of how to use the Client object:

<<[Client.Name]>>

VAT: <<[Client.Vat]>>

 

Project

Project details

Field name

Data type

Description

Name

string

Name

Number

string

Project number

Filenames

string[]

File names in a project
including extensions

SourceLanguage

string

Source language

TargetLanguages

string

Target languages

WorkflowStages

string

Workflow stages

Managers

ProjectManager[]

List of project managers

ProjectManager

FullName

string

Project manager’s full name

Email

string

Email address

PhoneNumber

string

Phone number

 

Below is an example of how to use the Project object. Let’s display the details of the first two managers if they are included in the list of managers:

<<if [Project.Managers.Any()]>>

<<foreach [m in Project.Managers.Take(2)]>><<[m.FullName]>>,

<<[m.Email]>>

<<next>><<if [m.FullName != null]>><<[m.FullName]>>,

<<[m.Email]>><</if>><</foreach>>

<</if>>

 

Quote

Quote details

Field name

Data type

Description

Number

string

Quote number

TotalCost

decimal

Total project cost

Currency

string

Alphabetic currency code

CurrencySymbol

string

Currency sign

DueDate

DateTime

Quote validity

Services

Service[]

List of services

Service

Name

string

Service name

SourceLanguage

string

Source language

TargetLanguage

string

Target language

UnitCount

decimal

Number of service units

Rate

decimal

Rate per unit

TotalCost

decimal

Total service cost

UnitType

string

Type of units payable

DetalizationRows

DetalizationRow[]

List of elements included in the service breakdown

DetalizationRow

Name

string

Unit category name. E.g.: 102% matches, repetitions

UnitCount

decimal

Number of units within a breakdown element

Rate

decimal

Discounted rate per payable unit

TotalCost

decimal

Total cost of a breakdown element

UnitType

string

Type of units payable

Below is an example of how to use the Quote object. Let's display the list of services specifying the source and target languages:

<<foreach [s in Quote.Services]>><<[s.Name]>>

<<if [s.TargetLanguage != null]>><<[s.SourceLanguage]>> - <<[s.TargetLanguage]>><</if>>

<</foreach>>

Like it?

2

Similar articles:

    No related articles