Actions40
- Job Actions
- Account Hierarchy Actions
- Cryptography Actions
- Customer Hierarchy Actions
- File Explorer Actions
- Generic API Actions
- Invoice Actions
- Mediation Actions
- Order Actions
- Quote Actions
- Subscription Actions
Overview
The Customer Hierarchy: Create or Update operation in the Opencell n8n node allows you to create or update a customer hierarchy structure within the Opencell system. This is useful for managing complex customer relationships, such as organizations with multiple branches, departments, or account types (e.g., Seller, Customer, User Account). The node collects detailed information about the customer, including contact details, address, payment method, and custom fields, then sends this data to Opencell's API to either create a new record or update an existing one.
Common scenarios:
- Onboarding a new customer organization with nested accounts.
- Updating customer information when their structure or details change.
- Automating CRM data synchronization between systems.
Practical example:
A business wants to automate the creation of both a parent company (Seller) and its subsidiary (Customer) in Opencell, including all relevant billing, contact, and custom field information, whenever a new client signs up via a web form.
Properties
| Name | Type | Meaning |
|---|---|---|
| Authentication | options | Selects the authentication method for connecting to Opencell (Basic Authentication or OAuth2). |
| Account Type | options | Specifies the type of account hierarchy to create/update (e.g., Seller, Cust 2 UA, S and C, Customer). Determines the structure and entities involved. |
| Parent Code Name or ID | options | Identifies the parent entity in the hierarchy. Depending on account type, this may refer to a Seller or another Customer. |
| Customer Account Code | string | Unique code identifying the customer account. Required for creation or update. |
| Name | collection | Customer's name details, including title, first name, and last name. |
| Address | collection | Customer's address details: street address, zip code, city, and country. |
| Contact Information | collection | Contact details such as email, phone, fax, mobile, and a nested contact address. Required for communication and notifications. |
| string | Primary email address for the customer. Required for correspondence. | |
| Language Name or ID | options | Preferred language for the customer. Used for communications and localization. |
| Country Name or ID | options | Country associated with the customer, used for localization and compliance. |
| Payment Method | options | Specifies how the customer will pay (e.g., Cash, Check, Credit Card, PayPal, etc.). |
| Customer Category Name or ID | options | Categorizes the customer for reporting or segmentation purposes. |
| Currency Name or ID | options | Currency used for transactions with this customer. |
| Additional Fields | collection | Optional extra fields for advanced configuration, such as bank details, billing cycle, status, thresholds, invoicing preferences, and more. |
| Custom Fields | fixedCollection | Allows adding custom fields defined in Opencell for further extensibility. Supports various data types (string, number, date, boolean, list, etc.). |
Output
- The node returns the response from the Opencell API as a JSON object in the
jsonfield. - The structure of the output depends on the Opencell API's response to the createOrUpdateCRMAccountHierarchy endpoint. Typically, it includes:
- Status of the operation (success/failure)
- Details of the created or updated customer hierarchy
- Any error messages or validation issues if present
Example output:
{
"json": {
"status": "SUCCESS",
"message": "Customer hierarchy created/updated successfully.",
"customerAccount": {
"code": "CUST123",
"name": {
"firstName": "John",
"lastName": "Doe"
},
// ... other returned fields
}
}
}
- If the operation fails and "Continue On Fail" is enabled, the output will include an
errorfield with the error message.
Dependencies
- External Service: Requires access to an Opencell instance with the REST API enabled.
- Authentication: Needs valid credentials for either Basic Authentication or OAuth2, configured in n8n credentials.
- n8n Configuration: Node must be properly set up with the required credentials and any referenced load options (for dynamic dropdowns).
Troubleshooting
Common Issues:
- Missing Required Fields: If mandatory properties (like Customer Account Code, Name, Address, etc.) are not provided, the API will reject the request.
- Invalid Parent Code: Providing an incorrect or non-existent parent code will result in a failure to establish the hierarchy.
- Authentication Errors: Invalid credentials or expired OAuth tokens will cause authentication failures.
- Custom Field Errors: If custom fields are misconfigured or do not exist in Opencell, the API may return errors.
Error Messages:
"Username/password error. Error code : XXX": Check your credentials."Host error. Error code : XXX": Verify the Opencell server URL and network connectivity."There are no custom fields defined for this resource": Ensure custom fields are set up in Opencell for the selected resource."Unable to get custom fields. Server response: ...": Review the Opencell server's custom field configuration.
Resolution Steps:
- Double-check all required input fields.
- Validate that referenced codes (parent, category, currency, etc.) exist in Opencell.
- Test credentials in the n8n credential editor.
- Consult Opencell logs for more detailed error diagnostics.