Actions23
Tenant → Remove Customers
AI-generatedOverview
The node interacts with the Plain API to manage tenants and their customer associations. Specifically, for the Tenant resource and the Remove Customers operation, it removes one or more customers from specified tenants. This is useful in scenarios where you need to disassociate customers from tenants, such as when a customer no longer belongs to certain tenant accounts or when cleaning up tenant-customer relationships.
Practical example:
- You have a list of customers who should no longer be linked to certain tenants in your system. Using this node operation, you can specify those customers and tenants to remove the association efficiently via the API.
Properties
| Name | Meaning |
|---|---|
| Customer Identifier | Specifies which customer to remove from tenants. You can identify the customer by one of these: Customer ID, Email Address, or External ID. |
| Tenant Identifiers | Specifies one or more tenants from which the customer will be removed. Each tenant can be identified by Tenant ID or External ID. |
Details on Customer Identifier (fixed collection)
- Identify By: Choose how to identify the customer:
- Customer ID
- Email Address
- External ID
- Depending on the choice, provide the corresponding identifier value.
Details on Tenant Identifiers (fixed collection, multiple values allowed)
- For each tenant:
- Identify By: Choose how to identify the tenant:
- Tenant ID
- External ID
- Provide the corresponding identifier value.
- Identify By: Choose how to identify the tenant:
Output
The output JSON contains the customer object after removal from the specified tenants. The customer object includes fields such as:
idfullNameemail(with email address)
If the operation succeeds, the output reflects the updated customer data without the association to the removed tenants. If an error occurs, the node throws an error with a descriptive message.
No binary data output is involved in this operation.
Dependencies
- Requires an API key credential for authenticating with the Plain API.
- The node uses GraphQL mutations to communicate with the Plain API endpoint.
- No additional external dependencies are required beyond the configured API authentication.
Troubleshooting
- Missing Customer Identifier: The node requires a complete customer identifier. If missing or incomplete, it throws an error "Customer identifier is required" or "Customer identifier data is incomplete".
- Missing Tenant Identifiers: At least one tenant identifier must be provided; otherwise, the node throws "Tenant identifiers are required" or "Tenant identifier data is incomplete".
- API Errors: If the Plain API returns an error during the mutation, the node throws the error message returned by the API. Check that the identifiers are correct and that the API credentials have sufficient permissions.
- Invalid Identifier Types: Ensure that the chosen identification method matches the provided value (e.g., do not provide an email if "Customer ID" is selected).
- Empty Tenant List: Providing an empty array for tenants will cause failure; ensure at least one tenant is specified.
Links and References
- Plain API Documentation (GraphQL mutations): Refer to the official Plain API docs for details on
removeCustomerFromTenantsmutation. - n8n Documentation: How to configure API credentials and use fixed collections in nodes.
This summary covers the logic and usage of the Tenant resource's Remove Customers operation based on static analysis of the node's execute method and property definitions.