Overview
This node integrates with the KiotViet platform to manage customer information. It supports operations such as creating a new customer, retrieving a single customer by ID, updating customer details, and fetching multiple customers with optional filtering and pagination.
A common use case is automating customer data synchronization between KiotViet and other systems, or bulk retrieving customer lists for marketing or analysis purposes.
For example:
- Use the Get Many operation to fetch all customers or a limited subset filtered by search terms, group IDs, or last modification date.
- Use the Create operation to add new customers from form submissions.
- Use the Update operation to modify existing customer records based on changes in external databases.
Properties
| Name | Meaning |
|---|---|
| Thao Tác (operation) | The action to perform: Create, Get by ID, Get Many, or Update customer information. |
| ID Khách Hàng (customerId) | The unique identifier of the customer (required for Get and Update operations). |
| Lấy toàn Bộ (returnAll) | Whether to return all results when getting many customers (true) or limit the number (false). |
| Giới Hạn (limit) | Maximum number of customer records to return when not returning all (minimum 1). |
| Bộ Lọc (filters) | Collection of filters to narrow down customer list when getting many: |
| - Từ khóa Tìm Kiếm (searchTerm) | Search term matching customer name, phone number, or customer code. |
| - ID Nhóm (groupId) | Filter customers by group ID. |
| - Sửa đổi Từ Ngày (lastModifiedFrom) | Filter customers modified from this date (format YYYY-MM-DD). |
| Tên Khách Hàng (name) | Customer's full name (required for Create and Update). |
| Trường Bổ Sung (additionalFields) | Additional optional fields for Create and Update: |
| - Số Điện Thoại (contactNumber) | Customer contact phone number. |
| Customer email address. | |
| - Địa Chỉ (address) | Customer address. |
| - Giới Tính (gender) | Gender: true for male, false for female. |
| - Ngày Sinh (birthDate) | Customer birth date (YYYY-MM-DD). |
| - Nhóm Khách Hàng (groupIds) | Comma-separated list of customer group IDs. |
Output
The node outputs an array of JSON objects representing customer data returned from KiotViet API calls.
- For Get Many, the output includes a
dataarray containing customer objects, along with metadata fields liketotal,pageSize, andcurrentItemindicating pagination status. - For Get by ID, Create, and Update, the output is the single customer object returned by the API.
- In case of errors during execution, error messages are included in the output JSON under an
errorfield if "Continue On Fail" is enabled.
No binary data is produced by this node.
Dependencies
- Requires an API key credential for authenticating with the KiotViet API.
- Uses an internal KiotViet API helper class to handle HTTP requests.
- No additional environment variables are needed beyond the API credential configuration.
Troubleshooting
- Failed to fetch customers: This error occurs if the API call to retrieve customers fails. Check that the API key is valid and has sufficient permissions.
- Update operation is not supported: If the KiotViet API does not support updating customers, this error will be thrown. Verify API capabilities and node version.
- Invalid customer ID: Ensure the customer ID provided for Get or Update operations is a valid integer corresponding to an existing customer.
- Rate limiting or pagination issues: When fetching many customers with
returnAllenabled, the node handles pagination automatically but may fail if the API rate limits requests. Consider using smaller page sizes or adding delays.