Magnet Customer icon

Magnet Customer

Consume Magnet Customer API

Overview

The node "Magnet Customer" integrates with the Magnet Customer API to manage various CRM-related resources, including custom fields. Specifically, the Custom Field - Update operation allows users to update existing custom fields within the CRM system. This is useful for modifying metadata about custom fields such as their name, type, order, visibility, and other settings.

Typical use cases include:

  • Changing the label or name of a custom field to better reflect its purpose.
  • Updating the type of a custom field (e.g., from text to enum).
  • Adjusting visibility and editability settings based on lifecycle stages like lead, prospect, or contact.
  • Managing the order in which custom fields appear in the UI.
  • Defining or updating possible values for enum or set types.

This operation is beneficial when maintaining or evolving the CRM schema dynamically without manual intervention in the CRM interface.

Properties

Name Meaning
Authentication Method of authentication to use: API Token or OAuth2.
Custom Field ID The unique identifier of the custom field to update. Required to specify which custom field will be modified.
Name The new name or label for the custom field.
Feature The CRM feature this custom field belongs to. Options: Contact, Deal, Organization, Staff.
Field Type Name or ID The data type of the custom field. Examples include varchar, text, enum, set, date, number. Users can select from a list or specify an ID via expression.
Order Numeric value indicating the position/order of the custom field relative to others.
Values (for Enum/Set Types) List of possible values for enum or set field types. Multiple values can be added separately.
Sub Field Settings JSON object containing additional configuration for sub-fields. The structure depends on the field type.
Settings Collection of boolean and multi-option settings controlling visibility, editability, and creatability of the custom field. Includes:
- Visible on View (boolean)
- Visible on View When (multi-options): Lead, Prospect, Contact
- Visible on View If Filled (boolean)
- Visible on View If Filled When (multi-options): Lead, Prospect, Contact
- Editable (boolean)
- Editable When (multi-options): Lead, Prospect, Contact
- Creatable (boolean)
- Creatable When (multi-options): Lead, Prospect, Contact

Output

The output of the update operation is a JSON array where each element corresponds to the result of updating a single custom field item. Each JSON object contains the updated custom field's details as returned by the Magnet Customer API. This typically includes the updated properties such as ID, name, type, order, values, and settings.

No binary data output is involved in this operation.

Dependencies

  • Requires connection to the Magnet Customer API.
  • Requires either an API token or OAuth2 credentials configured in n8n for authentication.
  • The node uses internal helper functions to make HTTP requests to the Magnet Customer API endpoints.
  • No additional external dependencies beyond the Magnet Customer API and proper credential setup.

Troubleshooting

  • Invalid Custom Field ID: If the provided custom field ID does not exist or is incorrect, the API will likely return an error. Verify the ID before running the update.
  • Invalid Field Type: Selecting a field type that is incompatible or does not exist may cause errors. Use the provided dropdown or valid IDs.
  • Permission Issues: Insufficient permissions associated with the API token or OAuth2 credentials can cause authorization failures.
  • Malformed JSON in Sub Field Settings: The subFieldSettings property expects valid JSON. Invalid JSON syntax will cause errors.
  • Empty Required Fields: Omitting required properties like name, customFieldId, or fieldType will cause validation errors.
  • API Rate Limits or Network Issues: Standard API connectivity issues may occur; ensure network access and API limits are respected.

To resolve errors, check the error message returned in the node output, verify all required parameters, and confirm API credentials have appropriate permissions.

Links and References


If you need further details on other operations or resources, feel free to ask!

Discussion