WTS Chat icon

WTS Chat

Get data from Wts API

Overview

This node integrates with the WTS Chat API to manage contacts within the system. Specifically, the Update Contact operation allows users to modify existing contact records by specifying the contact ID and updating one or more fields such as name, phone number, email, tags, custom fields, metadata, UTM parameters, and others.

Typical use cases include:

  • Keeping contact information up-to-date in a CRM or marketing platform.
  • Enriching contact profiles with additional metadata or custom attributes.
  • Managing contact segmentation via tags, portfolios, sequences, and status updates.
  • Tracking marketing campaign attribution through UTM parameters.

For example, you might update a contact's email and add new tags after they fill out a form, or change their status to "Active" when they engage with a campaign.

Properties

Name Meaning
Contact ID The unique identifier of the contact to update. This is required to specify which contact record will be modified.
Fields The list of fields to update on the contact. Multiple fields can be selected from options including: Annotation, CustomFields, Email, Instagram, Metadata, Name, PhoneNumber, PictureUrl, Portfolio, SequenceIds, Status, Tags, Utm.
Name The contact's full name. Only shown if "Name" is selected in Fields.
Phonenumber The contact's phone number. Only shown if "PhoneNumber" is selected in Fields.
Email The contact's email address. Only shown if "Email" is selected in Fields.
Instagram The contact's Instagram handle. Only shown if "Instagram" is selected in Fields.
Annotation A text annotation or note about the contact. Only shown if "Annotation" is selected in Fields.
Tag Names or IDs Tags associated with the contact. Users can select from existing tags or specify tag IDs via expressions. Only shown if "Tags" is selected in Fields.
Portfolio Names or IDs Portfolios linked to the contact. Selectable from existing portfolios or specified by ID. Only shown if "Portfolio" is selected in Fields.
Sequence Names or IDs Sequences assigned to the contact. Selectable from existing sequences or specified by ID. Only shown if "SequenceIds" is selected in Fields.
Status The contact's status. Options are Active, Archived, Blocked, or Empty (Not Sent). Only shown if "Status" is selected in Fields.
Picture Url URL to the contact's picture. Only shown if "PictureUrl" is selected in Fields.
Custom Fields Custom key-value pairs for additional contact data. Multiple custom fields can be added. Only shown if "CustomFields" is selected in Fields.
Metadata Additional metadata key-value pairs for the contact. Multiple entries allowed. Only shown if "Metadata" is selected in Fields.
Source UTM UTM source parameter for marketing attribution. Only shown if "Utm" is selected in Fields.
Medium UTM UTM medium parameter for marketing attribution. Only shown if "Utm" is selected in Fields.
Campaign UTM UTM campaign parameter for marketing attribution. Only shown if "Utm" is selected in Fields.
Content UTM UTM content parameter for marketing attribution. Only shown if "Utm" is selected in Fields.
Headline UTM UTM headline parameter for marketing attribution. Only shown if "Utm" is selected in Fields.
Term UTM UTM term parameter for marketing attribution. Only shown if "Utm" is selected in Fields.
Referral Url UTM UTM referral URL parameter for marketing attribution. Only shown if "Utm" is selected in Fields.

Output

The output of this operation is a JSON object representing the updated contact record as returned by the WTS Chat API. It includes all the contact's fields after the update, reflecting the changes made.

If the update is successful, the node outputs an array with one item containing the updated contact data under the json property.

No binary data output is produced by this operation.

Dependencies

  • Requires an active connection to the WTS Chat API using an API key credential.
  • The node uses the WTS Core Service module internally to perform the update operation.
  • Proper API credentials must be configured in n8n for authentication.
  • Some properties load options dynamically from the API (e.g., tags, portfolios, sequences, custom fields), so network connectivity and valid credentials are necessary.

Troubleshooting

  • Missing Contact ID: If the Contact ID is empty or whitespace, the node throws an error indicating that the ContactID must be filled in.
  • Invalid Field Selection: If no fields are selected to update, or if required fields for certain selections are missing, the node may throw errors.
  • API Errors: Any issues communicating with the WTS Chat API (e.g., invalid API key, network issues, permission errors) will result in errors wrapped as NodeApiError with descriptive messages.
  • Invalid Email Format: While not explicitly checked in update, creating contacts validates email format; ensure emails are valid to avoid API rejection.
  • Empty or Incorrect MultiOptions: When selecting tags, portfolios, or sequences, ensure the IDs or names exist and are correctly specified; otherwise, the API may reject the update.
  • Metadata and Custom Fields Formatting: These must be provided as arrays of key-value pairs; incorrect formatting may cause errors.

To resolve errors:

  • Verify that the Contact ID is correct and exists.
  • Ensure API credentials are valid and have sufficient permissions.
  • Check that all required fields for the selected update fields are properly filled.
  • Review the API response message for specific error details.

Links and References

Discussion