> 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="https://content.gitbook.com/content/Oahp3xBKoPsr1r1NAaNj/blobs/tiD9VmiGQ3b4ZdbUCDq0/estimate-template.png" 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
