Tạo Mới
AI-generatedOverview
This node integrates with the KiotViet API to create new invoices. It is useful for automating the process of invoice creation in business workflows, such as when recording sales transactions or managing billing. For example, it can be used to create an invoice with detailed product information, customer data, and payment details automatically from an e-commerce platform or POS system.
Use Case Examples
- Creating a new invoice with multiple products, specifying quantities, prices, and discounts.
- Adding customer ID and purchase date to the invoice for record-keeping.
- Specifying payment method and applying vouchers during invoice creation.
Properties
| Name | Meaning |
|---|---|
| ID Chi Nhánh | The branch ID where the invoice is created, required to specify the location of the sale. |
| Sản Phẩm Trong Hóa Đơn | A collection of products included in the invoice, each with product ID, code, name, quantity, price, discount, discount ratio, note, and serial numbers. |
| Trường Bổ Sung | Additional fields for the invoice such as total payment amount, customer ID, purchase date, overall discount, payment method, bank account ID, COD usage, sales staff ID, related order ID, sales channel ID, and voucher application flag. |
Output
JSON
branchId- The branch ID where the invoice was created.totalPayment- The total payment amount for the invoice.invoiceDetails- Array of product details included in the invoice, each containing productId, productCode, productName, quantity, price, discount, discountRatio, note, and serialNumbers.customerId- Customer ID associated with the invoice, if provided.purchaseDate- Purchase date of the invoice, if provided.discount- Total discount applied to the entire invoice.method- Payment method used for the invoice.accountId- Bank account ID used for payment, required for Card or BankTransfer methods.usingCod- Boolean indicating if COD payment is used.soldById- ID of the sales staff who made the sale.orderId- ID of the related order.saleChannelId- ID of the sales channel.isApplyVoucher- Boolean indicating if a voucher was applied.
Dependencies
- KiotViet API with authentication credentials
Troubleshooting
- Ensure that the branch ID and product details are correctly provided, as missing or invalid IDs will cause errors.
- The total payment field is mandatory; omitting it will result in a failure to create the invoice.
- If using Card or BankTransfer payment methods, the account ID must be specified.
- API errors may occur if the KiotViet API credentials are invalid or expired; verify and update credentials as needed.
- Network issues can cause request failures; ensure stable internet connectivity.
Links
- KiotViet Official Website - Official site for KiotViet, providing API documentation and support.