> 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-message-template-variables.md).

# List service message template variables

List the variables that can be written into a service message template, and where each belongs. Each entry carries the variable as it is written in the template body, what it is, an example value, the texts it is meaningful in (templateTypes, and ownTypeChannels for the tenant's own types) and the texts it is required in (requiredIn), which is what the insert buttons in the template editor are built from. Descriptions and text examples are in the signed-in user's language. The service order number, the status as the customer sees it, the customer's name, the store, the link to the service portal, the quoted amount and when the work is expected to be ready are filled in every message, except that the portal link is empty in a paper e-mailed to an address other than the customer's. The quoted amount is the amount of the latest quote on the service order and is empty until a price has been offered. The expected ready value, .readyDate, is the day and the time, or the day and "end of day" in the message's language where readyAtEstimate reads as the end of the day. The message staff write to the customer, .serviceNote, is filled only in SMS\_SERVICE\_ORDER\_UPDATED and EMAIL\_SERVICE\_ORDER\_UPDATED, the texts a STORE\_MESSAGE with a channel is sent in, and must be used in both. The localized name of the service paper the message carries attached, .documentName, is filled only in a message that carries a paper — an e-mailed paper, or a status rule's e-mail with attachDocumentType set — in the language the paper is rendered in, the customer's preferred language and otherwise the tenant's; a status rule's e-mail that attaches a paper fills it in whatever EMAIL type it composes from. A variable used in a text it is not filled in is empty in the message. The catalog is the same for every tenant. A service template type accepts every variable of it on save, and which ones the editor offers in a type is templateTypes and ownTypeChannels; a platform-defined type keeps the variable list the metadata catalog gives it. Saving a service message template validates its variables against this catalog: a template using a variable that is not listed here is refused, so a message can never go out with an unreplaced placeholder in it, and a text whose body does not use a variable its type requires is refused with a 400. Reading it 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 the message text editor of the service web app reads it; TEMPLATE alone does not open it. 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":{"ServiceTemplateVariableListResponse":{"description":"Example response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ServiceTemplateVariableSchema"}},"paging":{"$ref":"#/components/schemas/Paging"}},"required":["items","paging"]}}}}},"schemas":{"ServiceTemplateVariableSchema":{"title":"ServiceTemplateVariableSchema","description":"A variable that can be written into a service message template. It is replaced with the value from the service order the message is about — or from the timeline entry it was sent for, or the service paper it carries — when the message is composed, so the same template reads correctly for every customer.","type":"object","required":["key","description","example","templateTypes","ownTypeChannels","requiredIn"],"properties":{"key":{"type":"string","description":"The variable, dot included, as it goes between the double braces of a template body: the key .serviceNumber is written {{.serviceNumber}}."},"description":{"type":"string","description":"What the variable is, in the signed-in user's language. Shown next to the insert button so the right variable is picked."},"templateTypes":{"type":"array","description":"The service template types, out of the seven the service module sends under fixed names — SMS_SERVICE_ORDER_UPDATED, EMAIL_SERVICE_ORDER_UPDATED, SMS_SERVICE_PORTAL_LINK_CHANGED, EMAIL_SERVICE_PORTAL_LINK_CHANGED, SMS_SERVICE_QUOTE_SENT, EMAIL_SERVICE_QUOTE_SENT and EMAIL_SERVICE_DOCUMENT_SENT — that this variable is filled in, and so offered in by the editor. A type among the seven is judged by this list alone; every other type beginning SMS_ or EMAIL_ is judged by ownTypeChannels. In any service template type the variable is accepted on save, and where it is not filled it is empty in the message. A status rule's e-mail that attaches a paper fills .documentName in whatever EMAIL type it composes from.","items":{"type":"string"}},"ownTypeChannels":{"type":"array","description":"The channels on which a service template type outside the seven fixed names offers the variable, the channel being the one the type's SMS_ or EMAIL_ prefix names. Both channels for the variables every message carries; EMAIL alone for .documentName, because a status rule's e-mail may attach a paper; an empty list for .serviceNote, which no such type ever fills.","items":{"$ref":"#/components/schemas/MessageTypeENUM"}},"requiredIn":{"type":"array","description":"The service template types whose text must use this variable. A create or an update of such a text whose body does not use it is refused with a 400 and writes nothing. Only .serviceNote is required, in SMS_SERVICE_ORDER_UPDATED and EMAIL_SERVICE_ORDER_UPDATED, because the message staff write is what those texts carry to the customer; every other variable has an empty list.","items":{"type":"string"}}}},"MessageTypeENUM":{"title":"MessageTypeENUM","type":"string","enum":["EMAIL","SMS"]},"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"}},"parameters":{"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"}}}},"paths":{"/tenants/{tenantUid}/serviceorders/templatevariables":{"get":{"summary":"List service message template variables","tags":["Service"],"responses":{"200":{"$ref":"#/components/responses/ServiceTemplateVariableListResponse"}},"operationId":"get-serviceorders-templatevariables","description":"List the variables that can be written into a service message template, and where each belongs. Each entry carries the variable as it is written in the template body, what it is, an example value, the texts it is meaningful in (templateTypes, and ownTypeChannels for the tenant's own types) and the texts it is required in (requiredIn), which is what the insert buttons in the template editor are built from. Descriptions and text examples are in the signed-in user's language.\nThe service order number, the status as the customer sees it, the customer's name, the store, the link to the service portal, the quoted amount and when the work is expected to be ready are filled in every message, except that the portal link is empty in a paper e-mailed to an address other than the customer's. The quoted amount is the amount of the latest quote on the service order and is empty until a price has been offered. The expected ready value, .readyDate, is the day and the time, or the day and \"end of day\" in the message's language where readyAtEstimate reads as the end of the day. The message staff write to the customer, .serviceNote, is filled only in SMS_SERVICE_ORDER_UPDATED and EMAIL_SERVICE_ORDER_UPDATED, the texts a STORE_MESSAGE with a channel is sent in, and must be used in both. The localized name of the service paper the message carries attached, .documentName, is filled only in a message that carries a paper — an e-mailed paper, or a status rule's e-mail with attachDocumentType set — in the language the paper is rendered in, the customer's preferred language and otherwise the tenant's; a status rule's e-mail that attaches a paper fills it in whatever EMAIL type it composes from. A variable used in a text it is not filled in is empty in the message.\nThe catalog is the same for every tenant. A service template type accepts every variable of it on save, and which ones the editor offers in a type is templateTypes and ownTypeChannels; a platform-defined type keeps the variable list the metadata catalog gives it.\nSaving a service message template validates its variables against this catalog: a template using a variable that is not listed here is refused, so a message can never go out with an unreplaced placeholder in it, and a text whose body does not use a variable its type requires is refused with a 400.\nReading it 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 the message text editor of the service web app reads it; TEMPLATE alone does not open it. 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/pageNumberQuery"},{"$ref":"#/components/parameters/pageSizeQuery"}]}}}}
```


---

# 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-message-template-variables.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.
