Files
yara724api/docs/sms-deployment-branding.md
T

48 lines
2.2 KiB
Markdown

# Deployment-specific SMS names
Set the public display name in the API deployment environment and restart the API:
```env
SMS_BRAND_NAME="سامانه خسارت اپکس"
```
The default for an absent, empty or whitespace-only value is `یارا۷۲۴`.
This name is independent of the Fanavaran tenant and SMS provider settings.
No database migration or frontend deployment is required.
Every locally rendered SMS carries this name: OTPs, invitations, field-expert
links, signature notices, document requests, case-review updates, Fanavaran
registration confirmations and plain messages loaded from `sms-texts`.
Messages without an embedded name receive the name on a final line. Existing
Persian/English Yara724 name spellings in message patterns are replaced when
rendered; stored patterns are not changed. URLs and inserted token values are
preserved.
Custom OTP and database message patterns can place the name explicitly:
```env
AUTH_SMS_MESSAGE="رمز ورود شما در {brandName}: {token}"
```
`{brandName}` is resolved from `SMS_BRAND_NAME`. The existing `{token}`,
`{token2}`, `{token3}` and `{token10}` placeholders retain their purposes.
Locally rendered deliveries and skipped test OTPs record the same rendered text
in the SMS audit. Kavenegar hosted lookups record a locally reconstructed text;
their actual body is controlled by the provider's approved template. Previously
stored SMS logs are historical records and are not modified.
## Provider behavior
- **Parsian and Moalem:** all templates are rendered locally; no provider-side
template changes are needed.
- **Kavenegar:** with the default name, existing hosted lookup templates continue
to work. With a custom name, application templates and OTPs are rendered locally
and sent through `sms/send.json` using the existing sender. The Kavenegar
account/sender must support plain-text delivery, including the intended
recipients. Hosted templates cannot have their fixed text changed by this
environment variable. Unknown external template identifiers continue to use
hosted lookup; all current application notifications have local templates.
Changing the display name does not change provider credentials, sender numbers,
template identifiers, user-panel links or the SMS destination numbers.