Magnet Customer icon

Magnet Customer

Consume Magnet Customer API

Overview

This node integrates with the Magnet Customer API to manage custom fields within the system. Specifically, the "Create" operation for the "Custom Field" resource allows users to define new custom fields that can be attached to various features such as contacts, deals, organizations, or staff members.

Use cases include:

  • Adding tailored data fields to customer records to capture unique business information.
  • Creating enum or set type fields with predefined selectable values.
  • Organizing custom fields by feature and controlling their visibility and editability in the UI.

For example, a sales team might create a custom field "Customer Priority" (enum type) on contacts to classify leads as High, Medium, or Low priority.

Properties

Name Meaning
Authentication Method of authentication: either "API Token" or "OAuth2".
Name The name of the custom field to create.
Feature The feature this custom field belongs to. Options: Contact, Deal, Organization, Staff.
Field Type Name or ID The type of the custom field, e.g., varchar, text, enum, set, date, number. Select from a list loaded dynamically or specify an ID via expression.
Order Numeric order position of the field relative to others.
Values (for Enum/Set Types) For enum or set field types, define possible selectable values. Multiple values can be added separately.
Sub Field Settings JSON object specifying additional settings for subfields; structure depends on the field type.
Settings Collection of configuration options controlling visibility and editability:
- Visible on View (boolean)
- Visible on View When (multi-select: Lead, Prospect, Contact)
- Visible on View If Filled (boolean)
- Visible on View If Filled When (multi-select)
- Editable (boolean)
- Editable When (multi-select)
- Creatable (boolean)
- Creatable When (multi-select)

Output

The node outputs JSON data representing the newly created custom field object as returned by the Magnet Customer API. This typically includes the custom field's ID, name, type, feature association, order, possible values (if applicable), and settings.

No binary data output is involved.

Dependencies

  • Requires access to the Magnet Customer API.
  • Requires user to provide valid authentication credentials, either an API token or OAuth2 credentials configured in n8n.
  • The node uses internal helper functions to make authenticated HTTP requests to the API endpoints related to custom fields.

Troubleshooting

  • Authentication errors: Ensure the provided API token or OAuth2 credentials are valid and have sufficient permissions to create custom fields.
  • Invalid field type: Selecting a non-existent or unsupported field type ID may cause errors. Use the dynamic dropdown to select valid types or verify IDs carefully.
  • Missing required properties: The "Name", "Feature", and "Field Type" properties are mandatory. Omitting them will result in validation errors.
  • Incorrect values for enum/set: When defining values for enum or set types, ensure each value is entered correctly and separately.
  • JSON syntax errors: The "Sub Field Settings" property expects valid JSON. Malformed JSON will cause request failures.
  • API rate limits or connectivity issues: Network problems or API throttling may cause intermittent failures.

Links and References

Discussion