Magnet Customer icon

Magnet Customer

Consume Magnet Customer API

Lead → Update

AI-generated

Overview

This node updates an existing lead in the Magnet Customer system. It allows users to modify various lead details such as fullname, email, phone numbers, gender, birthdate, work, marital status, document, legal type, address details, owners, and custom fields. This operation is useful for keeping lead information current and accurate in CRM workflows, for example, updating contact details after a phone call or adding new custom field data based on recent interactions.

Use Case Examples

  1. Updating a lead's email and phone number after receiving new contact information.
  2. Modifying a lead's address and adding custom fields to capture additional data relevant to a sales campaign.

Properties

Name Meaning
Authentication Method of authentication to use for the API request, either API Token or OAuth2.
Contact ID The unique identifier of the lead to update. This is required to specify which lead record to modify.
Fullname The full name of the lead contact.
E-Mail The email address of the lead contact.
Phones A collection of phone numbers to associate with the lead. Multiple phone numbers can be added.
Gender The gender of the lead contact, with options Male or Woman.
Birthdate The birthdate of the lead contact.
Work The work or occupation of the lead contact.
Marital Status The marital status of the lead contact.
Document (CPF/CNPJ) The document identifier of the lead contact, such as CPF or CNPJ.
Legal Type The legal type classification of the lead, either Physical or Legal.
State The state where the lead contact is located.
City The city where the lead contact is located.
Address The street address of the lead contact.
Address Number The number of the address for the lead contact.
Complement Address Additional address information or complement for the lead contact.
Neighborhood The neighborhood of the lead contact.
CEP The postal code (CEP) of the lead contact.
Owners Owners associated with the lead contact.
Custom Fields Custom fields to set additional values that are not predefined. Users can specify the field name or ID and the value to set.
Encode Custom Fields If set to true, custom fields and option fields are automatically encoded as IDs instead of their actual names or values.

Output

JSON

  • _id - The unique identifier of the updated lead.
  • fullname - The full name of the lead.
  • email - The email address of the lead.
  • phoneCollection - The collection of phone numbers associated with the lead.
  • gender - The gender of the lead.
  • birthDate - The birthdate of the lead.
  • work - The work or occupation of the lead.
  • maritalStatus - The marital status of the lead.
  • doc - The document identifier of the lead.
  • type - The legal type of the lead.
  • state - The state of the lead.
  • city - The city of the lead.
  • address - The address of the lead.
  • addressNumber - The address number of the lead.
  • complement - The complement address of the lead.
  • neighborhood - The neighborhood of the lead.
  • cep - The postal code (CEP) of the lead.
  • owners - The owners associated with the lead.
  • customFields - Custom fields set on the lead, with field IDs and values.

Dependencies

  • Magnet Customer API
  • API Token or OAuth2 credentials

Troubleshooting

  • Ensure the Contact ID (leadId) is provided and valid; missing or incorrect ID will cause update failure.
  • If custom fields are used, verify that the field IDs or names are correct and that encoding is set appropriately if needed.
  • Authentication errors may occur if API Token or OAuth2 credentials are invalid or expired; re-authenticate as necessary.
  • Network or API endpoint issues can cause request failures; check connectivity and API status.

Links

Discussion