> For the complete documentation index, see [llms.txt](https://ajuda.digitalsac.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ajuda.digitalsac.io/digicrm/operacao-uso-do-sistema/configuracoes/configuracoes-globais/comercial.md).

# Comercial

**Caminho:** Configurações → Globais

\[\[FOTO]]

#### 5) Comercial

| Campo                       | Chave                                    | Para que serve                             | Valores                                        |
| --------------------------- | ---------------------------------------- | ------------------------------------------ | ---------------------------------------------- |
| Provedor comercial          | `COMMERCIAL_PROVIDER`                    | Perfex vs API custom                       | `perfex` \| `custom`; default `perfex`         |
| URL base API comercial      | `CUSTOM_COMMERCIAL_URL`                  | Base da API custom (obrigatória se custom) | URL; desabilitado se não custom                |
| Token autenticação          | `CUSTOM_COMMERCIAL_TOKEN`                | Bearer/API key                             | string mascarada                               |
| Endpoint planos             | `CUSTOM_PLANS_ENDPOINT`                  | Path relativo                              | default `/api/plans`; **não** URL absoluta     |
| Endpoint servidores         | `CUSTOM_SERVERS_ENDPOINT`                | Path relativo                              | default `/api/servers`                         |
| Endpoint servidor padrão    | `CUSTOM_DEFAULT_SERVER_ENDPOINT`         | Path relativo                              | default `/api/servers/default`                 |
| Endpoint ID servidor padrão | `CUSTOM_DEFAULT_SERVER_ID_ENDPOINT`      | Path relativo                              | default `/api/servers/default-id`              |
| Endpoint registro           | `CUSTOM_REGISTER_ENDPOINT`               | Path relativo                              | default `/digitalsac/gateways/leads/register`  |
| Sincronizar planos externos | `SYNC_EXTERNAL_PLANS`                    | Sync planos com sistema externo            | boolean; default `false`                       |
| Provedor e-mail no registro | `REGISTER_EMAIL_PROVIDER`                | Quem envia e-mail de confirmação           | `digitalsac` \| `custom`; default `digitalsac` |
| Fallback Perfex             | `COMMERCIAL_PROVIDER_FALLBACK_TO_PERFEX` | Se custom falhar, usa Perfex               | boolean; default `false`                       |
| Preview URLs                | —                                        | Monta `CUSTOM_COMMERCIAL_URL` + endpoints  | somente leitura                                |
| Documentação                | —                                        | Link GitBook DigiCRM                       | URL fixa no código                             |

Com `PERFEX`, a URL de licença fica em **Frontend → Integrações → `PERFEX_URL`**.

***
