> For the complete documentation index, see [llms.txt](https://docs.flowretail.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flowretail.com/docs/developers/api-documentation/service/list-service-status-message-rules.md).

# List service status message rules

List the rules that send the customer a message when a service order arrives at a status — the whole of what the tenant says to customers automatically, in one place. Pass serviceStatusUid to list only the rules on one status. Inactive rules are listed too: they are configured and switched off, not gone. Reading them asks for any service permission — SERVICE\_ORDER or SERVICE\_STORE\_CONFIG at the tenant, at an organization or at any one store, or SERVICE\_CONFIG, which is held at the tenant only — because whoever configures the status message rules reads them. A tenant-wide ADMIN grant counts as every permission. A caller holding none of them, a user with no role assignments included, is refused with a 403.

Required permissions: SERVICE\_ORDER, SERVICE\_STORE\_CONFIG, SERVICE\_CONFIG

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Service","description":"Service"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"ServiceStatusRuleListResponse":{"description":"Example response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ServiceStatusRuleResponseSchema"}},"paging":{"$ref":"#/components/schemas/Paging"}},"required":["items","paging"]}}}}},"schemas":{"ServiceStatusRuleResponseSchema":{"title":"ServiceStatusRuleResponseSchema","description":"A rule that sends the customer a message when a service order arrives at a status. Telling the customer is the point of the module: they are told their service order was registered and given the link that follows it, and told again at every step the tenant chooses to speak at.\nOne rule is one status, one channel and one template. Two rules on the same status reach the customer on both channels; a status with no rules passes silently.\nWhen a rule fires: after the status change has been committed, never inside it — a message that cannot be sent never holds up or undoes the work on the service order. One status change fires a rule at most once, enforced in the database rather than trusted to the sender, so a retried or concurrent transition cannot send the same message twice. Arriving at a status the service order has been in before sends again: it is a new arrival, and the customer is told about it. A rule never fires for status changes that happened before the rule existed.\nA message that has not gone out yet when the service order has already moved on to another status is not sent late: the execution is recorded as skipped instead of telling the customer about a status the case has already left.\nA rule on the status a service order is created in fires on creation too. That is the registration message carrying the portal link, and it is how the customer comes to have the link at all.\nAn e-mail rule carries a service paper as a PDF attachment when attachDocumentType names one — for example the service confirmation on the registration e-mail, or the service summary on the ready-for-pickup e-mail; any EMAIL rule may carry either. The paper is rendered when the message is composed, just before it goes out, so a message held while serviceMessagesPaused was on carries the paper as the case stands when it is sent. A paper that cannot be rendered does not hold the message back: the e-mail goes out without the attachment, its text and the portal link still reach the customer, and the notification log records that the paper could not be attached.\nWhat became of the message is recorded in the notification log, which stays the authority on delivery. When the provider's answer is ambiguous — the message may or may not have gone out — the attempt is recorded and flagged for a person to look at, never blindly retried.","type":"object","required":["serviceStatusRuleUid","tenantUid","serviceStatusUid","messageType","templateType","attachDocumentType","active","createdAt","createdBy","lastModifiedAt","lastModifiedBy"],"properties":{"serviceStatusRuleUid":{"$ref":"#/components/schemas/UID"},"tenantUid":{"$ref":"#/components/schemas/UID"},"serviceStatusUid":{"description":"The status whose arrival fires the rule. It is set when the rule is created and never changes — a rule for another status is another rule.","type":"string","pattern":"^[A-Za-z0-9-_]+"},"messageType":{"description":"The channel the message goes out on, and the channel the rule's templateType names where that type names one. The customer on the service order needs a contact point for it: a rule with nothing to send to records the failure in the notification log and leaves the status change as it is.","allOf":[{"$ref":"#/components/schemas/MessageTypeENUM"}]},"templateType":{"type":"string","description":"The template to send, by its type — a service template type the tenant has created itself, and one the tenant has text for. The platform's own types, listed on the `/metadata/templates` endpoint, are written around a sales order and its product lines, which a service order has none of, so naming one here is refused with a 400. The text is the tenant's own, written once per language; which wording the customer reads is resolved when the message is composed: the language they prefer, otherwise the tenant's own. A service template always carries a language, and the tenant's own version is the floor a type must have — a type without it has no text to fall back to."},"attachDocumentType":{"nullable":true,"description":"The service paper the message carries as a PDF attachment, or null for none, which is how a rule starts. Only an EMAIL rule carries one, and the paper is INTAKE_CONFIRMATION or SERVICE_SUMMARY. It is rendered when the message is composed, just before it goes out, exactly as the printable paper renders at that moment — except that an e-mailed paper never prints the blank signature line: where no acceptance stands, the confirmation prints the terms and nothing under them, and a standing acceptance prints as it does on paper. It is rendered in the customer's preferred language and in the tenant's where the customer has none, it never carries photos, and the PDF is named with the paper's localized name and the service number. A paper that cannot be rendered does not hold the message back: the e-mail goes out without it, and the notification log records that the paper could not be attached.","allOf":[{"$ref":"#/components/schemas/ServiceOrderDocumentTypeENUM"}]},"active":{"type":"boolean","description":"An inactive rule stays configured and sends nothing. It is how a message is switched off for a while without losing the template it points at."},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"MessageTypeENUM":{"title":"MessageTypeENUM","type":"string","enum":["EMAIL","SMS"]},"ServiceOrderDocumentTypeENUM":{"title":"ServiceOrderDocumentTypeENUM","description":"Which of the three printable service papers is meant. It is never derived from the state of the case — the caller names it, or the tenant names it on a status rule.\nINTAKE_CONFIRMATION: the service confirmation, for the customer, handed across the counter at intake — the record of what was handed in, and the sheet the customer can sign where the terms are accepted in the store. SERVICE_SUMMARY: the service summary, for the customer, handed back with the unit when the work is done — the record of what was done. DAMAGE_REPORT: the damage report, written for a third party — an insurer, a manufacturer, or a seller in a complaint — carrying the unit, the coverage, the findings, the customer-visible photos the caller names and the price of the work, and nothing of the dialogue between the customer and the store.\nAny of the three can be asked for at any time and under any coverage.","type":"string","enum":["INTAKE_CONFIRMATION","SERVICE_SUMMARY","DAMAGE_REPORT"]},"Paging":{"description":"totalCount The total number of items in the result set.\n\npageSize The number of items per page.\n\npageNumber The current page in the result set.","properties":{"pageNumber":{"type":"integer"},"pageSize":{"type":"integer"},"totalCount":{"type":"integer"}},"required":["totalCount","pageSize","pageNumber"],"title":"Paging","type":"object"},"SortDirectionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| ASC | Sort in ascending order|\n| DESC | Sort in descending order|\n","enum":["ASC","DESC"],"title":"SortDirectionENUM","type":"string"}},"parameters":{"statusRuleServiceStatusUidQuery":{"name":"serviceStatusUid","in":"query","required":false,"schema":{"$ref":"#/components/schemas/UID"},"description":"Filter by the service status the rule fires on"},"pageNumberQuery":{"description":"Reference to a specific page in a result set.","in":"query","name":"pageNumber","required":false,"schema":{"type":"integer"}},"pageSizeQuery":{"description":"The number of items per page in a result set.","in":"query","name":"pageSize","required":false,"schema":{"type":"integer"}},"sortByQuery":{"description":"Defines which field the resource list is sorted by.","in":"query","name":"sortBy","required":false,"schema":{"type":"string"}},"sortDirectionQuery":{"description":"Reference to a sort direction","explode":false,"in":"query","name":"sortDirection","schema":{"$ref":"#/components/schemas/SortDirectionENUM"},"style":"form"}}},"paths":{"/tenants/{tenantUid}/serviceorders/statusrules":{"get":{"summary":"List service status message rules","tags":["Service"],"responses":{"200":{"$ref":"#/components/responses/ServiceStatusRuleListResponse"}},"operationId":"get-serviceorders-statusrules","description":"List the rules that send the customer a message when a service order arrives at a status — the whole of what the tenant says to customers automatically, in one place.\nPass serviceStatusUid to list only the rules on one status. Inactive rules are listed too: they are configured and switched off, not gone.\nReading them asks for any service permission — SERVICE_ORDER or SERVICE_STORE_CONFIG at the tenant, at an organization or at any one store, or SERVICE_CONFIG, which is held at the tenant only — because whoever configures the status message rules reads them. A tenant-wide ADMIN grant counts as every permission. A caller holding none of them, a user with no role assignments included, is refused with a 403.\n\nRequired permissions: SERVICE_ORDER, SERVICE_STORE_CONFIG, SERVICE_CONFIG","parameters":[{"$ref":"#/components/parameters/statusRuleServiceStatusUidQuery"},{"$ref":"#/components/parameters/pageNumberQuery"},{"$ref":"#/components/parameters/pageSizeQuery"},{"$ref":"#/components/parameters/sortByQuery"},{"$ref":"#/components/parameters/sortDirectionQuery"}]}}}}
```


---

# 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.flowretail.com/docs/developers/api-documentation/service/list-service-status-message-rules.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.
