Actions30
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 Lead resource with the Atualizar (Update) operation, the node updates an existing lead record in the Perfex CRM.
Typical use cases include automating lead management workflows where lead information needs to be updated based on external triggers or data changes. For example, updating a lead's contact details, status, or assigned user after receiving new information from a marketing platform or customer interaction.
Properties
| Name | Meaning |
|---|---|
| ID do Lead | The unique identifier of the lead to update. |
| Dados do Lead | Collection of fields to update on the lead. Possible fields: |
| - Nome: Lead's name | |
| - Fonte: ID of the lead source | |
| - Status: ID of the lead status | |
| - Responsável: ID of the user responsible for the lead | |
| - Email: Lead's email address | |
| - Telefone: Lead's phone number | |
| - Empresa: Lead's company name | |
| - Endereço: Lead's address | |
| - Cidade: Lead's city | |
| - Estado: Lead's state | |
| - País: Lead's country | |
| - CEP: Lead's postal code | |
| - Descrição: Description of the lead |
Output
The node outputs JSON data representing the updated lead record as returned by the Perfex CRM API. This JSON contains all the fields of the lead after the update operation.
No binary data output is produced by this node.
Example output structure (simplified):
{
"id": "123",
"name": "Updated Lead Name",
"source": 5,
"status": 2,
"assigned": 10,
"email": "lead@example.com",
"phonenumber": "+5511999999999",
"company": "Company Ltda",
"address": "Rua Exemplo, 123",
"city": "São Paulo",
"state": "SP",
"country": "Brasil",
"zip": "01234-567",
"description": "Updated description"
}
Dependencies
- Requires an API token credential for authenticating with the Perfex CRM WON API.
- The node uses Axios HTTP client internally to communicate with the API endpoint.
- The base URL and API token must be configured in the node credentials.
- The API expects JSON content type and uses a custom header
X-API-TOKENfor authentication.
Troubleshooting
- Invalid Email Error: If the email field is provided and does not match a valid email format, the node throws an error "Email inválido". Ensure the email is correctly formatted.
- Authentication Errors: If the API token is missing or invalid, the node returns "Erro de autenticação: Token inválido ou não fornecido". Verify that the API token credential is correctly set.
- Resource Not Found: If the lead ID does not exist, the node returns "Recurso não encontrado". Confirm the lead ID is correct.
- Invalid Data: If the data sent to update the lead is invalid, the node returns "Dados inválidos" with details. Check the data fields for correctness.
- Connection Issues: Network or server connection problems result in "Erro de conexão com o servidor". Check network connectivity and API availability.
- Unknown Operation: If an unsupported operation is specified, the node throws "Operação desconhecida".
Links and References
- Perfex CRM Official Website
- WON API Documentation (if available) (Note: link hypothetical, replace with actual if known)
- Axios HTTP Client
This summary covers the static analysis of the node’s update operation for the Lead resource, describing its inputs, outputs, dependencies, and common errors.