Pacto Soluções
Pacto Soluções is the NicoApp that integrates with Pacto, the gym management system (a competitor of EVO/W12). With it, your flow queries and registers clients and records notes.
How to obtain the credential (token)
Unlike EVO (username + password via Basic Auth), Pacto uses a single token, entered in the Credencial API field during app installation. According to the app's own registration, the path to generate this credential is:
- In the Pacto system, open the ADM module.
- Go to Configurações → Integrações → ADM → API Sistema Pacto.
- Click Gerar Credencial to create the integration token.
- Copy the generated value and paste it into the Credencial API field when installing the Pacto Soluções NicoApp.
This credential is sent automatically by NicoChat in every action of the app (all actions have token authentication enabled) — there is no need to configure an authentication header in each individual action.
Limitations and plan requirements
- When installing and testing: start with a few actions and watch the
metafield returned by the API (mapped internally and used in error handling) — limit or usage-blocking messages usually appear there, as do HTTP 429 (too many requests) or 401/403 (invalid credential or without permission) errors. - Commercial modules: since the Pacto system is modular, API access may depend on a module/add-on contracted separately — just as EVO requires the Black plan. Validate this with Pacto before promising the integration to a client.
What the NicoApp does
The actions below are the ones published in the app catalog (organized in the same folders used in the editor: Leads & Dados de Contato and Dados de Alunos).
Leads & Dados de Contato
Dados de Alunos
/psec/alunos/situacao/{id}), which has not yet been published as an action in the app catalog — today it does not appear in the list of installable actions. Before announcing this action to clients, finish the call to the correct endpoint in the Sub Flow editor.Tips and notes
- Error handling: when Pacto refuses the call or it fails, the action falls into the
action_failedblock, fed by the content of$.metain the response — use the block's error path to handle it in the flow (e.g. invalid credential, enrollment number not found, usage limit reached). - Payload cleanup: in write actions (e.g. Incluir Cliente), a JavaScript step removes
undefined,nullor empty string fields from the payload before assembling the request body — this avoids sending blank keys that the API could reject or interpret incorrectly. - N° de Matrícula is the main key: most student query actions (Parcelas, Saldo, Plano, Objetivos, Histórico, Observação) use the Matrícula as the identifier — it comes out of Incluir Cliente/Consultar Cliente and must be saved in a bot variable or in the CRM as soon as it is obtained.
- Chained ID do Cliente: the ID do Cliente returned by Incluir Cliente or Consultar (Filtros) feeds the Consultar Cliente por ID action.
- Dynamic Empresa select: the Business Id field loads the options directly from the connected Pacto account (dynamic source "empresas"), chosen once when designing the flow.
- Save requests: since there is no public confirmation of limits, treat the Pacto API with the same caution recommended for EVO — avoid repeating catalog/status queries on every message and monitor error responses that indicate a usage limit.

