WaliChat icon

WaliChat

Interact with WaliChat WhatsApp API

Actions148

Team → Delete Team Members

AI-generated

Overview

This node interacts with the WaliChat WhatsApp API to manage team members within an organization. Specifically, the "Delete Team Members" operation allows users to remove one or more users from the team. It supports options to handle chats assigned to those users by unassigning, reassigning to another user, or resolving them. The operation also provides controls for force deleting users even if they have access to WhatsApp numbers and optionally removing users completely from the system.

Practical scenarios include:

  • Removing former employees or contractors from the team.
  • Reassigning ongoing chat conversations to active team members before deletion.
  • Cleaning up user accounts that should no longer have access to the WhatsApp business environment.

Properties

Name Meaning
Force Delete Whether to force delete users even if they have access to one or more WhatsApp numbers (boolean: true/false).
Users to Delete List of users to delete. Each user entry includes:
- Identifier Type: Choose between User ID or Email to identify the user.
- User ID: The 24-character hexadecimal ID of the user (if identifier type is ID).
- Email: Email address of the user (if identifier type is Email).
- Action: What to do with chats assigned to this user:
  • Unassign Chats
  • Reassign Chats
  • Resolve Chats
- Reassign To User ID: If action is "Reassign Chats", specify the user ID to whom chats will be reassigned.
- Remove Completely: Whether to remove the user completely from the system even if they have access to other WhatsApp numbers (boolean).

Output

The output JSON contains the result of the delete operation for each user specified. Typically, it will include confirmation of successful deletion or details about any errors encountered during the process. The structure depends on the underlying API response but generally confirms which users were deleted and what actions were taken on their assigned chats.

No binary data output is expected from this operation.

Dependencies

  • Requires an API key credential for authenticating with the WaliChat WhatsApp API.
  • The node relies on internal methods imported from a team actions module to perform the delete operations.
  • Proper configuration of the API key in n8n credentials is necessary.
  • The "Reassign To User ID" option dynamically loads available team agents based on the selected device context.

Troubleshooting

  • Common Issues:

    • Attempting to delete users who still have active WhatsApp number access without enabling "Force Delete" may cause failures.
    • Providing invalid user identifiers (wrong format or non-existent IDs/emails) will result in errors.
    • Omitting the reassignment user ID when choosing to reassign chats will cause the operation to fail.
  • Error Messages:

    • Errors related to user not found: Verify the user ID or email is correct.
    • Permission denied or unauthorized: Check that the API key has sufficient permissions.
    • Invalid reassignment target: Ensure the reassignment user ID exists and is valid.
  • Resolutions:

    • Enable "Force Delete" if you want to override restrictions due to WhatsApp number access.
    • Double-check all user identifiers and reassignment targets.
    • Confirm API key validity and permissions.

Links and References

Discussion