> 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/send-service-order-message-to-customer.md).

# Send service-order message to customer

Send the customer a message about the service order now, from the template of the given type — the registration link again because the first one never arrived, the pickup message because the customer has not come, the quote because it went unanswered. It is composed exactly as the automatic messages are: the tenant's own text, in the language the customer prefers and otherwise in the tenant's own, with the service order's values filled in. The notification that was created is returned, and the notification log stays the authority on what became of it. A customer link in a notification is served masked (see NotificationResponseSchema): the registration link sent again reaches the customer whole, and the returned notification carries it masked. Sending by hand changes nothing on the service order and does not stand in for the automatic sends: a status rule that has already fired stays fired, and one that has not still fires when its status is reached. A quote message — the tenant's text for SMS\_SERVICE\_QUOTE\_SENT or EMAIL\_SERVICE\_QUOTE\_SENT — is refused with a conflict on a service order in a terminal state, for the reason a new quote is refused there: the portal takes no quote answer on a finished case, so sending it again would ask the customer for something they cannot give. Every other template type may be sent on a finished case, which is what a pickup message on a completed repair is. The request is refused when the customer has no contact point for the channel, when the tenant has no text for the template type, when the template type names a channel other than messageType, when the store itself cannot send on the channel — a store with no e-mail address of its own sends no e-mail — and while the tenant setting serviceMessagesPaused is on — a message asked for by hand is refused outright rather than queued for a moment that has passed. The template type EMAIL\_SERVICE\_DOCUMENT\_SENT is refused here with a 400: its text is written to accompany a service paper, and a paper is e-mailed through the service paper e-mail endpoint, which attaches it. This is a write on the case, so it belongs to the store that owns the service order: at any other store it is refused with a 403, where the case can be read but not worked on.

Required permissions: SERVICE\_ORDER

```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":{"NotificationResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationResponseSchema"}}}}},"schemas":{"NotificationResponseSchema":{"title":"NotificationResponseSchema","type":"object","required":["messageType","recipient","message","subject","state","errorText","notificationUid","customerUid","orderUid","serviceOrderUid","serviceEventUid","tenantUserUid","supplierUid","receivementUid","purchaseOrderUid","createdBy","createdAt","lastModifiedBy","lastModifiedAt","source"],"properties":{"messageType":{"$ref":"#/components/schemas/MessageTypeENUM"},"recipient":{"type":"string"},"message":{"type":"string","description":"A customer link in it is served with its token replaced by …, the address kept: the service portal link, a portal document link and a counter signing link keep the scheme, the host and the path up to the token, and any other whole run of letters, digits, hyphens and underscores, bounded by other characters or the text's edge, exactly as long as one of those tokens is replaced by … wherever it stands. The stored message is what was sent, and the response never carries the credential."},"subject":{"type":"string","description":"A customer link in it is served with its token replaced by …, the address kept: the service portal link, a portal document link and a counter signing link keep the scheme, the host and the path up to the token, and any other whole run of letters, digits, hyphens and underscores, bounded by other characters or the text's edge, exactly as long as one of those tokens is replaced by … wherever it stands. The stored message is what was sent, and the response never carries the credential."},"state":{"$ref":"#/components/schemas/NotificationStateENUM"},"errorText":{"type":"string"},"notificationUid":{"$ref":"#/components/schemas/UID"},"customerUid":{"description":"The customer the message is recorded against. A value here marks the row as part of the message log for that customer; an empty value says only that no customer was named on the write, and not that the message went to staff — a receipt or a payment link is addressed to whatever number or address the caller gave, which need not come from a customer record, and the notes the order- and customer-scoped searches merge in from Omnium name no customer either. Where the message was actually delivered is recipient.","type":"string","pattern":"^[A-Za-z0-9_-]*$"},"orderUid":{"$ref":"#/components/schemas/OptionalUID"},"serviceOrderUid":{"$ref":"#/components/schemas/OptionalUID"},"serviceEventUid":{"$ref":"#/components/schemas/OptionalUID"},"tenantUserUid":{"description":"The tenant user the message is recorded against. It is never who the message was delivered to — that is recipient, which carries the address or number it was sent to, or several of them separated by commas — so a message to a colleague names its sender here rather than its reader. Who it credits is the person on our side behind the send: in the service module the caller who made the write, which on a shared screen is the person whose PIN unlocked it; elsewhere the user the record behind the message belongs to, such as the salesperson a receipt is registered to. It is empty only on the notes the order- and customer-scoped searches merge in from Omnium, which name nobody on our side.","type":"string","pattern":"^[A-Za-z0-9_-]*$"},"supplierUid":{"$ref":"#/components/schemas/OptionalUID"},"receivementUid":{"$ref":"#/components/schemas/OptionalUID"},"purchaseOrderUid":{"$ref":"#/components/schemas/OptionalUID"},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-time"},"source":{"type":"string","description":"Source of the notification"}}},"MessageTypeENUM":{"title":"MessageTypeENUM","type":"string","enum":["EMAIL","SMS"]},"NotificationStateENUM":{"title":"NotificationStateENUM","type":"string","enum":["NOT_STARTED","IN_PROGRESS","COMPLETE","FAILED"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"ServiceOrderSendMessageRequestSchema":{"title":"ServiceOrderSendMessageRequestSchema","description":"A message to send the customer about a service order now, from the template of the given type — the registration link again because the first one was lost, the pickup message because the customer did not come, the quote because it was not answered.\nIt is composed the same way the automatic messages are: the tenant's own text, in the language the customer prefers and otherwise in the tenant's own, with the service order's values filled in. The send is recorded in the notification log alongside the automatic ones, so the log answers everything the customer has been sent about the case.\nSending by hand never changes the service order and never counts as one of the automatic sends: a status rule that has already fired stays fired, and one that has not still fires when the status is reached.","type":"object","required":["messageType","templateType"],"properties":{"messageType":{"description":"The channel to send on. The request is refused when the customer on the service order has no contact point for it — no phone number for SMS, no address for EMAIL — and when the store sending the message cannot send on it: a store with no e-mail address of its own sends no e-mail. It must also be the channel the templateType names: a service template type begins with SMS_ or EMAIL_ and so always names one, and a request whose channel is not that one is refused with a 400.","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. The request is refused when the tenant has no text for it, and a platform type is refused with a 400: the platform's own types are written around a sales order and its product lines, which a service order has none of. EMAIL_SERVICE_DOCUMENT_SENT is refused with a 400 as well: it accompanies a service paper, which is e-mailed through the service paper e-mail endpoint. So are SMS_SERVICE_ORDER_UPDATED and EMAIL_SERVICE_ORDER_UPDATED: they carry the message staff write, which is sent as a STORE_MESSAGE on the timeline."}}}},"requestBodies":{"ServiceOrderSendMessageRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceOrderSendMessageRequestSchema"}}}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/serviceorders/{serviceOrderUid}/send":{"post":{"summary":"Send service-order message to customer","operationId":"post-serviceorders-send","description":"Send the customer a message about the service order now, from the template of the given type — the registration link again because the first one never arrived, the pickup message because the customer has not come, the quote because it went unanswered.\nIt is composed exactly as the automatic messages are: the tenant's own text, in the language the customer prefers and otherwise in the tenant's own, with the service order's values filled in. The notification that was created is returned, and the notification log stays the authority on what became of it. A customer link in a notification is served masked (see NotificationResponseSchema): the registration link sent again reaches the customer whole, and the returned notification carries it masked.\nSending by hand changes nothing on the service order and does not stand in for the automatic sends: a status rule that has already fired stays fired, and one that has not still fires when its status is reached.\nA quote message — the tenant's text for SMS_SERVICE_QUOTE_SENT or EMAIL_SERVICE_QUOTE_SENT — is refused with a conflict on a service order in a terminal state, for the reason a new quote is refused there: the portal takes no quote answer on a finished case, so sending it again would ask the customer for something they cannot give. Every other template type may be sent on a finished case, which is what a pickup message on a completed repair is. The request is refused when the customer has no contact point for the channel, when the tenant has no text for the template type, when the template type names a channel other than messageType, when the store itself cannot send on the channel — a store with no e-mail address of its own sends no e-mail — and while the tenant setting serviceMessagesPaused is on — a message asked for by hand is refused outright rather than queued for a moment that has passed.\nThe template type EMAIL_SERVICE_DOCUMENT_SENT is refused here with a 400: its text is written to accompany a service paper, and a paper is e-mailed through the service paper e-mail endpoint, which attaches it.\nThis is a write on the case, so it belongs to the store that owns the service order: at any other store it is refused with a 403, where the case can be read but not worked on.\n\nRequired permissions: SERVICE_ORDER","responses":{"200":{"$ref":"#/components/responses/NotificationResponse"},"409":{"description":"Conflict. The service order is in a terminal state, and a quote message cannot ask for an answer the portal will not take."}},"requestBody":{"$ref":"#/components/requestBodies/ServiceOrderSendMessageRequest"},"tags":["Service"]}}}}
```


---

# 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/send-service-order-message-to-customer.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.
