For the complete documentation index, see llms.txt. This page is also available as Markdown.

Update service status message rule

Update a status message rule: the channel it sends on, the template it sends, and whether it sends at all. The status it fires on cannot be changed — create a rule on the other status instead. The change takes effect for status changes from now on and never touches messages already sent. Switching a rule off with active is what stops a message without losing the template it points at.

Required permissions: SERVICE_CONFIG

put
/tenants/{tenantUid}/serviceorders/statusrules/{serviceStatusRuleUid}
Authorizations
AuthorizationstringRequired

Access token recevied after user login with a deviceToken

Path parameters
tenantUidstringRequired

Reference to a tenant.

Pattern: ^[A-Za-z0-9-_]+
serviceStatusRuleUidstringRequired

Reference to a service status message rule

Pattern: ^[A-Za-z0-9-_]+
Body

The editable parts of a status message rule: which channel it sends on, which template it sends, which service paper an e-mail carries attached, and whether it sends at all. The status the rule fires on is not among them — it is fixed when the rule is created. Editing a rule changes what is sent from now on and never touches the messages already sent.

messageTypestring · enumRequiredPossible values:
templateTypestringRequired

The template to send, by its type — a service template type the tenant has created itself, and one the tenant has text for; the language is resolved per customer when the message is composed and is not chosen here. The platform's own types are written around a sales order and are refused here with a 400. EMAIL_SERVICE_DOCUMENT_SENT, the text written to accompany a paper, is accepted only on a rule whose attachDocumentType names a paper; on a rule that attaches none it is refused with a 400. That is judged on the rule as it stands after the update, so taking the paper off a rule that uses that type is refused unless the same request changes the type too. SMS_SERVICE_ORDER_UPDATED and EMAIL_SERVICE_ORDER_UPDATED are refused with a 400: they carry the message staff write, which a rule has none of.

attachDocumentTypestring · enumOptional

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. INTAKE_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. Any of the three can be asked for at any time and under any coverage.

Possible values:
activebooleanOptional

Send false to switch the rule off while keeping it configured, and true to switch it back on. Left out, the rule keeps what it has.

Responses
200

Example response

application/json

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. One 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. When 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. A 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. A 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. An 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. What 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.

serviceStatusRuleUidstringRequiredPattern: ^[A-Za-z0-9-_]+
tenantUidstringRequiredPattern: ^[A-Za-z0-9-_]+
serviceStatusUidstringRequired

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.

Pattern: ^[A-Za-z0-9-_]+
messageTypestring · enumRequiredPossible values:
templateTypestringRequired

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.

attachDocumentTypestring · enumRequired

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. INTAKE_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. Any of the three can be asked for at any time and under any coverage.

Possible values:
activebooleanRequired

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.

createdAtstring · date-timeRequired
createdBystringRequired
lastModifiedAtstring · date-timeRequired
lastModifiedBystringRequired
put/tenants/{tenantUid}/serviceorders/statusrules/{serviceStatusRuleUid}
PUT /v2/tenants/{tenantUid}/serviceorders/statusrules/{serviceStatusRuleUid} HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 102

{
  "messageType": "EMAIL",
  "templateType": "text",
  "attachDocumentType": "INTAKE_CONFIRMATION",
  "active": true
}
200

Example response

{
  "serviceStatusRuleUid": "text",
  "tenantUid": "text",
  "serviceStatusUid": "text",
  "messageType": "EMAIL",
  "templateType": "text",
  "attachDocumentType": "INTAKE_CONFIRMATION",
  "active": true,
  "createdAt": "2026-01-01T00:00:00.000Z",
  "createdBy": "text",
  "lastModifiedAt": "2026-01-01T00:00:00.000Z",
  "lastModifiedBy": "text"
}

Last updated

Was this helpful?