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
Access token recevied after user login with a deviceToken
Reference to a tenant.
^[A-Za-z0-9-_]+Reference to a specific page in a result set.
The number of items per page in a result set.
Example response
GET /v2/tenants/{tenantUid}/serviceorders/templatevariables HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Example response
{
"items": [
{
"key": ".serviceNumber",
"description": "The service order number the customer refers to their case by",
"example": "10023",
"templateTypes": [
"SMS_SERVICE_ORDER_UPDATED",
"EMAIL_SERVICE_ORDER_UPDATED"
],
"ownTypeChannels": [
"EMAIL",
"SMS"
],
"requiredIn": [
"SMS_SERVICE_ORDER_UPDATED",
"EMAIL_SERVICE_ORDER_UPDATED"
]
}
],
"paging": {
"pageNumber": 1,
"pageSize": 1,
"totalCount": 1
}
}Last updated
Was this helpful?

