Actions30
Overview
This node integrates with the Perfex CRM system via the WON API, allowing users to perform various operations on different resources such as clients, contacts, leads, projects, tasks, and invoices. Specifically, for the Cliente (Client) resource with the Obter (Get) operation, the node retrieves detailed information about a specific client by its ID.
Common scenarios where this node is beneficial include:
- Fetching client details to enrich workflows or automate customer management.
- Integrating client data retrieval into larger automation pipelines.
- Validating client existence before performing updates or deletions.
Practical example:
You have an automation that triggers when a new order is placed. Using this node, you can fetch the client's full profile from Perfex CRM by their client ID to personalize communications or check account status before proceeding.
Properties
| Name | Meaning |
|---|---|
| ID do Cliente | The unique identifier of the client to retrieve. This is required for "get", "update", and "delete" operations on the client resource. |
Output
The node outputs JSON data representing the client record retrieved from the Perfex CRM system. The structure corresponds directly to the client object returned by the WON API endpoint /won_api/won/api/clients/{clientId}.
The output includes all available client fields such as company name, VAT number, phone number, address, country, city, state, zip code, website, and active status, among others.
No binary data output is produced by this operation.
Dependencies
- Requires an API token credential for authentication with the Perfex CRM WON API.
- The base URL and API token must be configured in the node credentials.
- Uses Axios HTTP client internally to make REST API calls to the Perfex CRM endpoints.
Troubleshooting
Common Issues
- Invalid Client ID: If the provided client ID does not exist, the node will throw a "Resource not found" error.
- Authentication Errors: If the API token is missing or invalid, an authentication error will occur.
- Connection Problems: Network issues or incorrect base URL configuration may cause connection errors.
- Malformed Input: Providing an empty or malformed client ID will result in errors.
Error Messages and Resolutions
| Error Message | Cause | Resolution |
|---|---|---|
| "Erro de autenticação: Token inválido ou não fornecido" | Invalid or missing API token | Verify and update the API token in the node credentials. |
| "Recurso não encontrado" | Client ID does not exist | Confirm the client ID is correct and exists in Perfex CRM. |
| "Erro de conexão com o servidor" | Network or server unreachable | Check network connectivity and API base URL configuration. |
| "Erro: CPF/CNPJ inválido..." | VAT number format invalid (for create/update) | Ensure VAT numbers are correctly formatted (11 or 14 digits). |
Links and References
- Perfex CRM Official Website
- WON API Documentation (if available) (Note: Replace with actual link if known)
- Axios HTTP Client
Summary of Extracted Logic for Resource "Cliente" and Operation "Obter"
- The node reads the
clientIdparameter (required). - It sends a GET request to
/won_api/won/api/clients/{clientId}using the configured API token. - Returns the client data as JSON.
- Handles HTTP errors gracefully, providing user-friendly error messages.
- Supports continuation on failure to allow workflow resilience.