Parent File Ref For overview Please refer to the parent file - Property - Services
Assessment APIs:
Key Functionality:
The assessment set of services inside the property module is used for assessing the value of a property in a given time frame and collect taxes for the same. Assessment is a snapshot of Property for a given transaction on that Property. These APIs provide functionalities to create/update/search the assessments. An assessment cannot exist without a property. Postman Collection
Configuration Details:
MDMS CONFIG:
...
Configs:
Assessment shares most of the configs with Property as mentioned above, only exclusive properties are mentioned in this section.
IDGEN:
name | value | description |
---|---|---|
assessment id |
...
format | PB-AS-[cy:yyyy-MM-dd]-[SEQ_EG_PT_ASSM] |
...
kafka create assessment topic | save-pt-assessment | |
kafka update assesmsent topic | update-pt-assessment | |
| true/false | Workflow integration can be controlled by the following two properties |
...
|
...
|
...
|
The first property switches workflow on or off, while the second property provides a way to control which field change can trigger workflow. A businessService needs to be created using the workflow
/egov-workflow-v2/egov-wf/businessservice/_create API .
Sample businessService create API body for Assessment workflow:
...
breakoutMode | wide |
---|
...
PERSISTER CONFIG: https://raw.githubusercontent.com/egovernments/configs/master/egov-persister/assessment-persister.yml?token=AE4Z2KFWEQBDCUY6AZLGGIK6AM3QQ
Code Block |
---|
serviceMaps: serviceName: property-services mappings: - version: 1.0 description: Persists assessment details to eg_pt_asmt_assessment table fromTopic: save-pt-assessment isTransaction: true queryMaps: - query: INSERT INTO eg_pt_asmt_assessment(id, tenantid, assessmentnumber, financialyear, propertyid, status, source, channel, assessmentdate, additionaldetails, createdby, createdtime, lastmodifiedby, lastmodifiedtime) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: Assessment jsonMaps: - jsonPath: $.Assessment.id - { jsonPath: $.Assessment.tenantId - "sla"jsonPath: null,$.Assessment.assessmentNumber - "state"jsonPath: null,$.Assessment.financialYear - "applicationStatus"jsonPath: null,$.Assessment.propertyId - "docUploadRequired"jsonPath: false,$.Assessment.status - "isStartState"jsonPath: true,$.Assessment.source - "isTerminateState"jsonPath: false,$.Assessment.channel - "isStateUpdatable"jsonPath: true,$.Assessment.assessmentDate - jsonPath: "actions": [$.Assessment.additionalDetails type: JSON { dbType: JSONB - "action": "INITIATE",jsonPath: $.Assessment.auditDetails.createdBy - jsonPath: $.Assessment.auditDetails.createdTime "nextState": "INITIATED", - jsonPath: $.Assessment.auditDetails.lastModifiedBy - "roles"jsonPath: [$.Assessment.auditDetails.lastModifiedTime - query: INSERT INTO eg_pt_asmt_unitusage (tenantid, id, assessmentid, unitid, "CITIZEN"usagecategory, occupancytype, occupancydate, active, createdby, createdtime, lastmodifiedby, lastmodifiedtime) VALUES (?, ?, ?, ?, ?, ?, ?, "PT_CEMP" ?, ?, ?, ?, ?); basePath: Assessment.unitUsageList.* ] jsonMaps: - } jsonPath: $.Assessment.unitUsageList.*.tenantId - ]jsonPath: $.Assessment.unitUsageList.*.id - jsonPath: }, $.Assessment[?({id} in @.unitUsageList[*].id)].id {- jsonPath: $.Assessment.unitUsageList.*.unitId - "sla"jsonPath: null,$.Assessment.unitUsageList.*.usageCategory - "state": "INITIATED",jsonPath: $.Assessment.unitUsageList.*.occupancyType - jsonPath: "applicationStatus": "INITIATED",$.Assessment.unitUsageList.*.occupancyDate - jsonPath: $.Assessment.unitUsageList.*.active "docUploadRequired": false, - jsonPath: $.Assessment.unitUsageList.*.auditDetails.createdBy "isStartState": true, - jsonPath: $.Assessment.unitUsageList.*.auditDetails.createdTime "isTerminateState": false, - jsonPath: $.Assessment.unitUsageList.*.auditDetails.lastModifiedBy - "actions"jsonPath: [$.Assessment.unitUsageList.*.auditDetails.lastModifiedTime - query: INSERT INTO { "action": "APPLY", eg_pt_asmt_document (id, tenantid, entityid, documenttype, filestoreid, documentuid, status, createdby, lastmodifiedby, createdtime, lastmodifiedtime) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: $.Assessment.documents.* "nextState": "APPLIED", jsonMaps: - "roles"jsonPath: [$.Assessment.documents.*.id - jsonPath: $.Assessment.tenantId "CITIZEN", - jsonPath: $.Assessment.id - "PT_CEMP"jsonPath: $.Assessment.documents.*.documentType - jsonPath: $.Assessment.documents.*.fileStoreId ] - jsonPath: $.Assessment.documents.*.documentUid - }, jsonPath: $.Assessment.documents.*.status - jsonPath: $.Assessment.documents.*.auditDetails.createdBy { - jsonPath: $.Assessment.documents.*.auditDetails.lastModifiedBy "action": "INITIATE", - jsonPath: $.Assessment.documents.*.auditDetails.createdTime - jsonPath: $.Assessment.documents.*.auditDetails.lastModifiedTime "nextState": "INITIATED", - version: 1.0 description: Updates assessment details to "roles": [eg_pt_asmt_assessment table fromTopic: update-pt-assessment isTransaction: true queryMaps: "CITIZEN", - query: INSERT INTO eg_pt_asmt_assessment_audit SELECT *, (SELECT extract(epoch from now())) "PT_CEMP" FROM eg_pt_asmt_assessment WHERE id = ?; basePath: Assessment ] jsonMaps: - } jsonPath: $.Assessment.id - query: INSERT ] }, INTO eg_pt_asmt_unitusage_audit SELECT *, (SELECT extract(epoch from now())) FROM eg_pt_asmt_unitusage WHERE id = ?; { basePath: Assessment.unitUsageList.* "sla"jsonMaps: null, - "state": "APPLIED",jsonPath: $.Assessment.unitUsageList.*.id - query: UPDATE eg_pt_asmt_assessment SET financialyear "applicationStatus": "APPLIED"= ?, status = ?, source = ?, assessmentDate = ?, additionaldetails "docUploadRequired": false= ?, lastmodifiedby = ?, lastmodifiedtime = ? WHERE id "isStartState": false,= ?; basePath: Assessment "isTerminateState": false, jsonMaps: - "isStateUpdatable"jsonPath: true,$.Assessment.financialYear - jsonPath: "actions": [$.Assessment.status - jsonPath: $.Assessment.source { - jsonPath: $.Assessment.assessmentDate - "action": "FORWARD",jsonPath: $.Assessment.additionalDetails type: JSON "nextState": "FIELDINSPECTION", dbType: JSONB - "roles"jsonPath: [$.Assessment.auditDetails.lastModifiedBy - jsonPath: $.Assessment.auditDetails.lastModifiedTime "PT_DOC_VERIFIER" - jsonPath: $.Assessment.id - query: INSERT ] }, { "action": "REJECT", INTO eg_pt_asmt_unitusage (tenantid, id, assessmentId, unitid, usageCategory, occupancyType, occupancyDate, active, createdby, createdtime, lastmodifiedby, lastmodifiedtime) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON CONFLICT (id) DO UPDATE SET usageCategory = ?, occupancyType = ?, occupancyDate = ?, active = ?, lastmodifiedby = ?, lastmodifiedtime = ?; "nextState"basePath: "REJECTED",Assessment.unitUsageList.* jsonMaps: - "roles"jsonPath: [$.Assessment.unitUsageList.*.tenantId - jsonPath: $.Assessment.unitUsageList.*.id "PT_DOC_VERIFIER" - jsonPath: $.Assessment[?({id} in @.unitUsageList[*].id)].id - ]jsonPath: $.Assessment.unitUsageList.*.unitId - jsonPath: $.Assessment.unitUsageList.*.usageCategory }, - jsonPath: $.Assessment.unitUsageList.*.occupancyType { - jsonPath: $.Assessment.unitUsageList.*.occupancyDate - jsonPath: $.Assessment.unitUsageList.*.active "action" : "SENDBACKTOCITIZEN", - jsonPath: $.Assessment.unitUsageList.*.auditDetails.createdBy - "nextState" : "INITIATED",jsonPath: $.Assessment.unitUsageList.*.auditDetails.createdTime "roles":["PT_DOC_VERIFIER"] - jsonPath: $.Assessment.unitUsageList.*.auditDetails.lastModifiedBy - jsonPath: $.Assessment.unitUsageList.*.auditDetails.lastModifiedTime } - jsonPath: $.Assessment.unitUsageList.*.usageCategory ] - },jsonPath: $.Assessment.unitUsageList.*.occupancyType - {jsonPath: $.Assessment.unitUsageList.*.occupancyDate - "sla": null,jsonPath: $.Assessment.unitUsageList.*.active - "state": "REJECTED",jsonPath: $.Assessment.unitUsageList.*.auditDetails.lastModifiedBy - "applicationStatus": "REJECTED",jsonPath: $.Assessment.unitUsageList.*.auditDetails.lastModifiedTime - "isStateUpdatable"query: false,INSERT INTO eg_pt_asmt_document (id, tenantid, entityid, documenttype, filestoreid, documentuid, status, "docUploadRequired": falsecreatedby, lastmodifiedby, createdtime, lastmodifiedtime) VALUES (?, ?, ?, ?, ?, ?, ?, "isStartState": false?, ?, ?) ON CONFLICT (id) DO UPDATE documenttype = ?, documentuid "isTerminateState": true },= ?, status = ?, lastmodifiedby = ?, lastmodifiedtime = ?; basePath: $.Assessment.documents.* { jsonMaps: "sla": 86400000, - jsonPath: $.Assessment.documents.*.id "state": "FIELDINSPECTION", - jsonPath: $.Assessment.tenantId - "applicationStatus"jsonPath: "FIELDINSPECTION",$.Assessment.id - jsonPath: "docUploadRequired": false,$.Assessment.documents.*.documentType - jsonPath: $.Assessment.documents.*.fileStoreId "isStartState": false, - jsonPath: $.Assessment.documents.*.documentUid "isStateUpdatable": true, - jsonPath: $.Assessment.documents.*.status "isTerminateState": false, - jsonPath: $.Assessment.documents.*.auditDetails.createdBy - "actions"jsonPath: [$.Assessment.documents.*.auditDetails.lastModifiedBy - jsonPath: $.Assessment.documents.*.auditDetails.createdTime { - jsonPath: $.Assessment.documents.*.auditDetails.lastModifiedTime - "action": "FORWARD",jsonPath: $.Assessment.documents.*.documentType - jsonPath: $.Assessment.documents.*.documentUid "nextState": "PENDINGAPPROVAL", - jsonPath: $.Assessment.documents.*.status - "roles": [jsonPath: $.Assessment.documents.*.auditDetails.lastModifiedBy - jsonPath: "PT_FIELD_INSPECTOR" ] $.Assessment.documents.*.auditDetails.lastModifiedTime |
Workflow Congif:
The first property switches workflow on or off, while the second property provides a way to control which field change can trigger the workflow. A businessService needs to be created using the workflow /egov-workflow-v2/egov-wf/businessservice/_create API.
Sample businessService create API body for Assessment workflow:
Code Block |
---|
{ "RequestInfo": { "apiId": "Rainmaker", "action": "", "did": }1, "key": "", {"msgId": "20170310130900|en_IN", "requesterId": "", "ts": 1513579888683, "actionver": "REJECT.01", "authToken": "b39181b1-5c6b-484a-b825-6be2f62012b8" }, "nextStateBusinessServices": "REJECTED",[ { "rolestenantId": ["pb", "businessService": "ASMT", "business": "PT_FIELD_INSPECTOR"pt-services", "businessServiceSla": 172800000, "states": [ ] { }, "sla": null, { "state": null, "actionapplicationStatus": "SENDBACK"null, "nextStatedocUploadRequired": "APPLIED", false, "rolesisStartState": [true, "isTerminateState": false, "PT_FIELD_INSPECTOR" "isStateUpdatable": true, ] "actions": [ } { ] }"action": "INITIATE", { "nextState": "INITIATED", "sla": 43200000, "stateroles": "PENDINGAPPROVAL", [ "applicationStatus": "PENDINGAPPROVALCITIZEN", "docUploadRequired": false, "PT_CEMP" "isStartState": false, ] "isStateUpdatable": false, } "isTerminateState": false, ] }, "actions": [ { { "sla": null, "actionstate": "APPROVEINITIATED", "nextStateapplicationStatus": "PENDINGPAYMENTINITIATED", "rolesdocUploadRequired": [ false, "PT_APPROVER" "isStartState": true, "isTerminateState": false, ] "actions": [ }, { "action": "REJECTAPPLY", "nextState": "REJECTEDAPPLIED", "roles": [ "PT_APPROVERCITIZEN", "PT_CEMP" ] }, { "action": "SENDBACKINITIATE", "nextState": "FIELDINSPECTIONINITIATED", "roles": [ "CITIZEN", "PT_APPROVERCEMP" ] } ] }, { "sla": 43200000null, "state": "PENDINGPAYMENTAPPLIED", "applicationStatus": "PENDINGPAYMENTAPPLIED", "docUploadRequired": false, "isStartState": false, "isTerminateState": false, "isStateUpdatable": falsetrue, "actions": [ { "action": "PAYFORWARD", "nextState": "APPROVEDFIELDINSPECTION", "roles": [ "CITIZENPT_DOC_VERIFIER", ] "PT_CEMP", }, "SYSTEM_PAYMENT" { ] }, { "action": "ADHOCREJECT", "nextState": "PENDINGPAYMENTREJECTED", "roles": [ "PT_DOC_CEMPVERIFIER" ] }, ] { }, "action" { : "SENDBACKTOCITIZEN", "sla": null, "statenextState" : "APPROVEDINITIATED", "applicationStatusroles": "APPROVED",["PT_DOC_VERIFIER"] } ] }, { "isStateUpdatable "sla": falsenull, "docUploadRequiredstate": false"REJECTED", "isStartStateapplicationStatus": false"REJECTED", "isTerminateStateisStateUpdatable": truefalse, } "docUploadRequired": false, ] } ] } |
Other system level configs are same as PT-Registry as mentioned above.
Notification:
Payment Notification:
Code Block |
---|
"isStartState": false, { "codeisTerminateState": "PT_NOTIFICATION_PAYMENT_FAIL",true "message": "Dear Citizen}, Your payment of Rs. <insert amount to pay> for Property{ Tax Unique ID <insert ID> has failed. Your assessment is pending. Please try again. Ignore this message if you have completed your payment. You can pay your Property Tax online here - <payLink>", "sla": 86400000, "state": "FIELDINSPECTION", "moduleapplicationStatus": "rainmaker-ptFIELDINSPECTION", "locale": "en_IN" }"docUploadRequired": false, { "codeisStartState": "PT_NOTIFICATION_PAYMENT_OFFILE"false, "message "isStateUpdatable": "Dear Citizen, Your Property Tax payment of Rs. <amount> has been accepted. Mode of Payment: <insert mode of payment> Pending Amount: <Enter pending amount>.",true, "isTerminateState": false, "actions": [ { "module": "rainmaker-pt", "localeaction": "en_IN" FORWARD", }, { "codenextState": "PT_NOTIFICATION_PAYMENT_ONLINEPENDINGAPPROVAL", "message "roles": [ "Dear Citizen, Your payment of Rs.< insert amount paid> with payment transaction id < insert payment transaction id from PG> has been made successfully. Assessment for Property Tax Unique ID <insert Property Tax Assessment ID> was succesful. Property Tax due is Rs.<pt due>." "PT_FIELD_INSPECTOR" ] }, "module": "rainmaker-pt", { "localeaction": "en_INREJECT", }, { "codenextState": "PT_NOTIFICATION_PAYMENT_PARTIAL_OFFLINEREJECTED", "message": "Dear Citizen, Your Property Tax payment of Rs. <amount>"roles": [ has been accepted. Mode of Payment: <insert mode of payment> Pending Amount: <Enter pending amount>. You can pay your Property Tax online here - <payLink>", "PT_FIELD_INSPECTOR" ] "module": "rainmaker-pt", }, "locale": "en_IN" }, { "code": "PT_NOTIFICATION_PAYMENT_PARTIAL_ONLINE", "messageaction": "Dear CitizenSENDBACK", Your payment of Rs.< insert amount paid> with payment transaction id < insert payment transaction id from PG> has been made successfully. Assessment for Property Tax Unique ID <insert ID> was succesful. Property Tax due is Rs.<pt due>. You can pay your Property Tax here - <payLink>","nextState": "APPLIED", "roles": [ "PT_FIELD_INSPECTOR" "module": "rainmaker-pt", ] "locale": "en_IN" } |
Assessment Notification:
...
|
...
|
...
] |
...
}, |
...
|
...
{ |
...
|
...
"sla": |
...
43200000, |
...
|
...
" |
...
state": " |
...
PENDINGAPPROVAL", " |
...
applicationStatus": " |
...
PENDINGAPPROVAL", " |
...
docUploadRequired": |
...
false, " |
...
isStartState": |
...
false, "isStateUpdatable": |
...
false, |
...
|
...
" |
...
isTerminateState": |
...
false, " |
...
actions": |
...
[ { |
...
|
...
|
...
" |
...
action": " |
...
APPROVE", |
...
|
...
" |
...
nextState": " |
...
PENDINGPAYMENT", |
...
"roles": [ |
...
"PT_APPROVER" |
...
|
...
|
...
] |
...
|
...
|
...
}, |
...
|
...
|
...
|
...
{ |
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
"action": "REJECT", |
...
|
...
" |
...
nextState": " |
...
REJECTED", |
...
|
...
|
...
" |
...
roles": |
...
[ |
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
"PT_APPROVER" |
...
] |
...
|
...
}, |
...
For adding localization for any status append ASMT_
prefix to the status and for adding a message for any status add ASMT_MSG_
before the status.
Assessment(Property Calculator) -
The calculator service Prepares and property tax and files the demand in the billing service for payment. It has an estimate API to give the estimated property tax without persisting data and a calculate API to create demand for payments.
The calculator service resides in the municipal-services git repo of eGov.
...
{
"action": "SENDBACK",
"nextState": "FIELDINSPECTION",
"roles": [
"PT_APPROVER"
]
}
]
},
{
"sla": 43200000,
"state": "PENDINGPAYMENT",
"applicationStatus": "PENDINGPAYMENT",
"docUploadRequired": false,
"isStartState": false,
"isTerminateState": false,
"isStateUpdatable": false,
"actions": [
{
"action": "PAY",
"nextState": "APPROVED",
"roles": [
"CITIZEN",
"PT_CEMP",
"SYSTEM_PAYMENT"
]
},
{
"action": "ADHOC",
"nextState": "PENDINGPAYMENT",
"roles": [
"PT_CEMP"
]
}
]
},
{
"sla": null,
"state": "APPROVED",
"applicationStatus": "APPROVED",
"isStateUpdatable": false,
"docUploadRequired": false,
"isStartState": false,
"isTerminateState": true
}
]
}
]
}
|
Other system-level configs are the same as PT-Registry as mentioned above.
Notification Configs:
Payment Notification:
Code Block |
---|
{
"code": "PT_NOTIFICATION_PAYMENT_FAIL",
"message": "Dear Citizen, Your payment of Rs. <insert amount to pay> for Property Tax Unique ID <insert ID> has failed. Your assessment is pending. Please try again. Ignore this message if you have completed your payment. You can pay your Property Tax online here - <payLink>",
"module": "rainmaker-pt",
"locale": "en_IN"
},
{
"code": "PT_NOTIFICATION_PAYMENT_OFFILE",
"message": "Dear Citizen, Your Property Tax payment of Rs. <amount> has been accepted. Mode of Payment: <insert mode of payment> Pending Amount: <Enter pending amount>.",
"module": "rainmaker-pt",
"locale": "en_IN"
},
{
"code": "PT_NOTIFICATION_PAYMENT_ONLINE",
"message": "Dear Citizen, Your payment of Rs.< insert amount paid> with payment transaction id < insert payment transaction id from PG> has been made successfully. Assessment for Property Tax Unique ID <insert Property Tax Assessment ID> was succesful. Property Tax due is Rs.<pt due>.",
"module": "rainmaker-pt",
"locale": "en_IN"
},
{
"code": "PT_NOTIFICATION_PAYMENT_PARTIAL_OFFLINE",
"message": "Dear Citizen, Your Property Tax payment of Rs. <amount> has been accepted. Mode of Payment: <insert mode of payment> Pending Amount: <Enter pending amount>. You can pay your Property Tax online here - <payLink>",
"module": "rainmaker-pt",
"locale": "en_IN"
},
{
"code": "PT_NOTIFICATION_PAYMENT_PARTIAL_ONLINE",
"message": "Dear Citizen, Your payment of Rs.< insert amount paid> with payment transaction id < insert payment transaction id from PG> has been made successfully. Assessment for Property Tax Unique ID <insert ID> was succesful. Property Tax due is Rs.<pt due>. You can pay your Property Tax here - <payLink>",
"module": "rainmaker-pt",
"locale": "en_IN"
}
|
Assessment Notification:
Code Block |
---|
{
"code": "ASMT_APPLIED",
"message": "Applied",
"module": "rainmaker-pt",
"locale": "en_IN"
},
{
"code": "ASMT_APPROVED",
"message": "Approved",
"module": "rainmaker-pt",
"locale": "en_IN"
},
{
"code": "ASMT_CREATE",
"message": "Dear {OWNER_NAME}, Your assessment with {ASSESSMENTNUMBER} for financial year {FINANCIALYEAR} and property id {PROPERTYID} is created.",
"module": "rainmaker-pt",
"locale": "en_IN"
},
{
"code": "ASMT_UPDATE",
"message": "Dear {OWNER_NAME}, Your assessment with {ASSESSMENTNUMBER} for financial year {FINANCIALYEAR} and property id {PROPERTYID} is reassessed.",
"module": "rainmaker-pt",
"locale": "en_IN"
},
{
"code": "ASMT_MSG_APPLIED",
"message": "Dear {OWNER_NAME}, Your assessment with {ASSESSMENTNUMBER} for financial year {FINANCIALYEAR} and property id {PROPERTYID} is updated to {STATUS}.",
"module": "rainmaker-pt",
"locale": "en_IN"
},
{
"code": "ASMT_MSG_APPROVED",
"message": "Dear {OWNER_NAME}, Your assessment with {ASSESSMENTNUMBER} for financial year {FINANCIALYEAR} and property id {PROPERTYID} is {STATUS}.",
"module": "rainmaker-pt",
"locale": "en_IN"
}
|
For adding localization for any status append ASMT_
prefix to the status and for adding a message for any status add ASMT_MSG_
before the status.
Assessment(Property Calculator) -
The calculator service Prepares and property tax and files the demand in the billing service for payment. It has the ‘estimate’ API to give the estimated property tax without persisting data and a calculated API to create demand for payments.
The calculator service PT Calculator
Integration
Integration Scope
Assessment integration helps citizens to assess their property with ease and helps them verify their tax values by themselves which gives more control to the citizens and hep the municipality collect taxes with ease.
Integration Benefits
Easy to create and simple process of self-assessment to avoid the hassle.
Integrated payment for multiple years enables by digit platform.
Steps to Integration
Customer can create an assessment on a given property using the
/assessment/_create
Search the assessment and its workflow status by using
/assessment/_search
endpoint/assessment/_update
endpoint to update the assessment and its workflow states as per need.
Reference Docs: - please refer property document https://digit-discuss.atlassian.net/wiki/spaces/DD/pages/1620181050/Property+Services#Doc-Links
API LIST:
Title | Link |
/assessment/_create | |
/assessment/_update | |
/assessment/_search |