> For the complete documentation index, see [llms.txt](https://docs.digit.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digit.org/works/setup/configure-works/service-configuration/estimate-template.md).

# Estimate Template

## Overview

Requirement of creating an estimate template that can be used to create an estimate, This template has SOR and NON-SOR line items, which will be copied while creating an estimate.

**Why Choose MDMS V2?**

According to the requirement, the Estimate service has no dependency on other services. The only dependency is with SOR which is a part of MDMS-V2. It stores the data and for that the MDMS service is sufficient. We finalized this approach to reduce the overhead of creating and maintaining a new service.&#x20;

**Figma Design**

<figure><img src="/files/ehwq1w3E3szyqxK5KUbb" alt=""><figcaption></figcaption></figure>

## MDMS Schema&#x20;

```
{
           "id": "2e42e1fc-fa18-459f-bdc4-5dfcfc1b0b10",
           "tenantId": "pg",
           "code": "WORKS.EstimateTemplateTest",
           "description": "WORKS.EstimateTemplateTest",
           "definition": {
               "type": "object",
               "title": "Generated schema for Estimate Template",
               "$schema": "http://json-schema.org/draft-07/schema#",
               "required": [
                   "templateId",
                   "templateName",
                   "projectType",
                   "projectSubType",
                   "lineItems"
               ],
               "x-unique": [
                   "templateId"
               ],
               "properties": {
                   "lineItems": {
                       "type": "array",
                       "items": {
                           "type": "object",
                           "required": [
                               "lineItemType"
                           ],
                           "properties": {
                               "uom": {
                                   "type": "string"
                               },
                               "sorCode": {
                                   "type": "string"
                               },
                               "description": {
                                   "type": "string"
                               },
                               "lineItemType": {
                                   "type": "string",
                                   "default": "LIT"
                               }
                           },
                           "additionalProperties": false
                       }
                   },
                   "templateId": {
                       "type": "string",
                       "default": "TMP"
                   },
                   "projectType": {
                       "type": "string"
                   },
                   "templateName": {
                       "type": "string"
                   },
                   "projectSubType": {
                       "type": "string"
                   },
                   "templateDescription": {
                       "type": "string"
                   }
               },
               "x-ui-schema": {
                   "ui:order": [
                       "templateId",
                       "templateName",
                       "templateDescription",
                       "projectType",
                       "projectSubType",
                       "lineItems"
                   ],
                   "templateId": {
                       "format": [
                           "preprocess"
                       ],
                       "formatType": "autogenerate",
                       "ui:readonly": true,
                       "autogenerate": "works.template.number"
                   }
               },
               "x-ref-schema": [
                   {
                       "fieldPath": "lineItems.*.sorCode",
                       "schemaCode": "WORKS-SOR.SOR"
                   },
                   {
                       "fieldPath": "lineItems.*.uom",
                       "schemaCode": "common-masters.UOM"
                   }
               ]
           },
           "isActive": true,
           "auditDetails": {
               "createdBy": null,
               "lastModifiedBy": null,
               "createdTime": 1702025336295,
               "lastModifiedTime": 1702025336295
           }
}
```

#### &#x20;<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digit.org/works/setup/configure-works/service-configuration/estimate-template.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
