> 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/complaints-management/deploy/customise/frontend/customise-ui/inboxsearchcomposer.md).

# InboxSearchComposer

## **Overview** <a href="#undefined" id="undefined"></a>

Follow the details below to customise the inbox search composer.

### **Usage Contexts**&#x20;

* Complaint Inbox
* Assignment View
* SLA Tracking

### **Component Structure**

* **Sections**:
  * `search` – Search fields.
  * `filter` – Filter fields.
  * `links` – Quick action links.
  * `searchResult` – Table view with optional column customisations.

## **Steps**

1. **Add Search Field**

   ```
   javascript{
     label: "EVENTS_DATERANGE_LABEL",
     type: "dateRange",
     populators: { name: "range" }
   }
   ```
2. **Add Filter Field**

   ```
   javascript{
     type: "radio",
     label: "",
     populators: {
       name: "assignedToMe",
       options: [
         { code: "ASSIGNED_TO_ME", name: "ASSIGNED_TO_ME" },
         { code: "ASSIGNED_TO_ALL", name: "ASSIGNED_TO_ALL" }
       ],
       optionsKey: "name"
     }
   }
   ```
3. **Add Link**

   ```
   javascript{
     text: "ES_PGR_NEW_COMPLAINT",
     url: "/employee/pgr/create-complaint",
     roles: ["SUPERUSER", "PGR-ADMIN", "HELPDESK_USER"],
     hyperlink: true
   }
   ```
4. **Add Column in Search Results**

   ```
   javascript{
     label: "WF_INBOX_HEADER_SLA_DAYS_REMAINING",
     jsonPath: "businessObject.serviceSla",
     additionalCustomization: true,
     key: "state"
   }
   ```
5. **Add Custom Component**
   * Same pattern as FormComposer:

     ```
     javascript{
       type: "component",
       key: "locality",
       component: "PGRBoundaryComponent",
       populators: { name: "locality" }
     }
     ```
6. **Backend-Driven Components**

   ```
   javascript{
     label: "ES_PGR_FILTER_STATUS",
     type: "workflowstatesfilter",
     populators: {
       name: "status",
       labelPrefix: "CS_COMMON_",
       businessService: "PGR",
       onlylabelPrefix: true
     }
   }
   ```
7. **Dynamic Config Updates**
   * Use `preProcessMDMSConfigInboxSearch` to change filter/search fields dynamically.
8. **Data Transformation**
   * Add to [`UICustomisations`](https://github.com/egovernments/Citizen-Complaint-Resolution-System/blob/SB-PGR-CITIZEN/frontend/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/configs/UICustomizations.js) to preprocess the request, postprocess the response, or change table rendering.

***

## **Best Practices** <a href="#undefined" id="undefined"></a>

* Keep `key` and `populators.name` same for consistency.
* Use `validation` for inputs to ensure correct data entry.
* Modularise configs so the same fields can be reused in multiple forms.
* Test dynamic updates to verify inter-field dependencies.


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.digit.org/complaints-management/deploy/customise/frontend/customise-ui/inboxsearchcomposer.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
