> 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/access/configurator-management-guide/role-state-action-mapping.md).

# Role State Action Mapping

A primer on Role - State - Action

#### State: where the complaint is right now

A state is the complaint's current standing or status.

PENDINGFORASSIGNMENT means: someone has to decide who will handle this. PENDINGATLME means: a specific person (Last Mile Employee - LME) now owns the work. RESOLVED means: the department believes the work is finished.

A complaint occupies exactly one state at any moment. States in the real world can also be seen as public-facing facts. What your citizen sees on their phone as "Assigned to field staff" is this same value, translated. So a state is simultaneously an internal bookkeeping record and a promise made to the public.

#### Action: a move that is permitted

An action is a legal move. ASSIGN, RESOLVE, REJECT, REOPEN, RATE, COMMENT.

Two properties matter more than they first appear:

* An action is only ever available from a specific state. RESOLVE exists inside PENDINGATLME and nowhere else. You cannot resolve a complaint nobody has been assigned to. The sequence is enforced by structure, not by staff discipline or training.
* An action names its destination. Every action carries a nextState. This makes the process a directed graph rather than a checklist, which is why the system can always answer "what could happen next?"

Some actions loop back to the same state. COMMENT does this. It is a move that produces a record without changing anyone's obligations.

#### Role: who holds the authority

A role is a bundle of authority attached to people, not a job title and not a person.

GRO, PGR\_LME, CITIZEN, CSR, SUPERVISOR, AUTO\_ESCALATE.

The distinction from job titles is practical. A single municipal officer may hold GRO for the sanitation department and PGR\_LME for a locality they personally cover. One human, two authorities, evaluated separately every time they touch a complaint. Reorganising a department therefore means reassigning roles, not rewriting the workflow.

{% hint style="info" %}
Note the last role in that list. AUTO\_ESCALATE is held by no human at all. It belongs to the system's clock. The passage of time is a participant in this process with its own permissions, and that is one of the most consequential design decisions in the whole configuration.
{% endhint %}

How everything comes together:&#x20;

Example: The complaint has been received and needs to be routed. Thus, the complaint is currently in the state PENDINGFORASSIGNMENT&#x20;

<table><thead><tr><th width="270.71875">Action</th><th>Performed by roles</th><th>Lands in</th></tr></thead><tbody><tr><td>ASSIGN</td><td>GRO, PGR_VIEWER</td><td>PENDINGATLME</td></tr><tr><td>REJECT</td><td>GRO, PGR_VIEWER</td><td>REJECTED</td></tr><tr><td>ASSIGNEDBYAUTOESCALATION</td><td>AUTO_ESCALATE</td><td>PENDINGATLME</td></tr><tr><td>COMMENT</td><td>CITIZEN</td><td>stays here</td></tr></tbody></table>

## Quick Glossary

<table><thead><tr><th width="154.73046875">Element</th><th>Purpose</th></tr></thead><tbody><tr><td>State</td><td>A status that the application/complaint/record can be in.<br><br>Example: PENDING_ASSIGNMENT, RESOLVED, CLOSE</td></tr><tr><td>Action</td><td><p>A verb that a user can perform from a given state.</p><p><br>Example: ASSIGN, RESOLVE, REJECT, REOPEN</p></td></tr><tr><td>Next State</td><td>The state the record moves to after an action is performed. </td></tr><tr><td>Role(s) per Action</td><td>Which user roles are authorised to trigger that action from that particular state.</td></tr><tr><td>Start State Flag </td><td>Marks the entry point when a new record is created.</td></tr><tr><td>Terminal/Is Terminate State Flag</td><td>Marks an end state - no further actions are possible.</td></tr><tr><td>SLA (in hours/days)</td><td>Expected time to be spent in a particular state</td></tr><tr><td>Notification config</td><td>Whether the action fires an SMS/Email and which localization template message is used.</td></tr><tr><td>Auto-escalation rule</td><td>Automatically transitions the state if SLA is breached without human action. </td></tr></tbody></table>


---

# 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/complaints-management/access/configurator-management-guide/role-state-action-mapping.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.
