Tạo Mới
AI-generatedOverview
This node interacts with the KiotViet API to create new orders in the KiotViet system. It is useful for automating order creation processes, such as when integrating an e-commerce platform or a point-of-sale system with KiotViet. For example, it can be used to automatically create an order with specified products, quantities, prices, and discounts, along with additional order details like customer ID and description.
Use Case Examples
- Automatically create a new order in KiotViet when a customer places an order on an online store.
- Create orders in KiotViet from a CRM system to keep sales data synchronized.
Properties
| Name | Meaning |
|---|---|
| ID Chi Nhánh | The branch ID where the order is created, used to specify the location of the order. |
| Sản Phẩm Trong ĐơN | A list of products included in the order, each with product ID, quantity, price, discount, and optional notes. |
| Trường Bổ Sung | Additional optional fields for the order such as customer ID, order description, and total discount for the entire order. |
Output
JSON
id- The unique identifier of the created order.orderDetails- Details of the products included in the order.branchId- The branch ID where the order was created.customerId- The customer ID associated with the order, if provided.description- Description of the order, if provided.discount- Total discount applied to the entire order, if provided.
Dependencies
- KiotViet API with authentication credentials
Troubleshooting
- Ensure the branch ID and product IDs are valid integers as the node converts these values to integers before sending to the API.
- If the API returns an error, check that all required fields are provided and correctly formatted.
- The node throws an error if the create operation fails; enabling 'Continue On Fail' allows processing subsequent items despite errors.