Perfex CRM

Interagir com o Perfex CRM via WON API

Overview

This node integrates with the Perfex CRM system via the WON API, allowing users to manage various CRM resources such as clients, contacts, leads, projects, tasks, and invoices. Specifically, for the Cliente (Client) resource with the Criar (Create) operation, the node enables creating a new client record in the Perfex CRM.

Typical use cases include automating client onboarding processes by programmatically adding new client information from other systems or workflows, ensuring data consistency and saving manual entry time. For example, when a new customer signs up on a website, this node can automatically create their client profile in Perfex CRM with relevant details like company name, VAT number, contact info, and address.

Properties

Name Meaning
Dados do Cliente Collection of client data fields to set when creating or updating a client. Includes:
- Nome da Empresa: Client's company name
- VAT: Client's VAT number (CPF/CNPJ)
- Telefone: Client's phone number
- País: Client's country
- Cidade: Client's city
- CEP: Client's postal code
- Estado: Client's state
- Endereço: Client's address
- Website: Client's website URL
- Ativo: Boolean indicating if the client is active (default true)

The Dados do Cliente property is a collection where each field corresponds to a specific attribute of the client to be created.

Output

The node outputs JSON data representing the newly created client record as returned by the Perfex CRM API. This typically includes all client attributes stored in the system, such as the assigned client ID, company name, VAT, contact details, and status.

No binary data output is produced by this operation.

Dependencies

  • Requires an API token credential for authenticating requests to the Perfex CRM WON API.
  • The node uses Axios HTTP client configured with:
    • Base URL from the credential configuration.
    • Header X-API-TOKEN set to the provided API token.
  • Network connectivity to the Perfex CRM API endpoint is necessary.

Troubleshooting

  • Invalid VAT Number: If the VAT (CPF/CNPJ) number does not have exactly 11 or 14 digits after removing non-digit characters, the node throws an error:
    "CPF/CNPJ inválido. Deve ter 11 dígitos (CPF) ou 14 dígitos (CNPJ)".
    Resolution: Ensure the VAT number is correctly formatted and contains only digits with the correct length.

  • Authentication Errors: If the API token is missing or invalid, the node returns:
    "Erro de autenticação: Token inválido ou não fornecido".
    Resolution: Verify that the API token credential is correctly configured and valid.

  • Validation Errors: If the API rejects the data due to invalid fields, the node may throw errors like:
    "Dados inválidos: <error message>".
    Resolution: Check the client data fields for correctness and completeness according to the API requirements.

  • Connection Issues: Errors such as "Erro de conexão com o servidor" indicate network problems or unreachable API endpoints.
    Resolution: Confirm network access and API availability.

  • Unknown Operation or Resource: If an unsupported operation or resource is specified, the node throws errors indicating unknown operations or resources.

Links and References


This summary focuses on the "Cliente" resource with the "Criar" operation, describing how the node creates a new client in Perfex CRM using the provided client data collection.

Discussion