Overview
This node facilitates the creation and submission of invoices to an external invoice processing system, supporting three distinct modes of operation:
- Smart Mode: Automatically organizes and groups invoice data from JSON input (e.g., extracted Excel data), ideal for users who want the system to handle grouping and line item creation automatically.
- Shopify Mode: Transforms Shopify order data into the required invoice format, suitable for e-commerce businesses using Shopify.
- Manual Mode: Allows users to manually enter all invoice details, providing full control over every aspect of the invoice.
The node authenticates with the external service, prepares invoice data according to the selected mode, submits it via API, and returns the response including invoice UUIDs and status information.
Practical Use Cases
- Automating invoice generation from raw data or Shopify orders.
- Integrating invoice submission into workflows for Malaysian tax compliance.
- Handling manual invoice entry when precise control is needed.
Properties
| Name | Meaning |
|---|---|
| โ๏ธ How Do You Want to Create Invoices? | Choose the invoice creation mode: Smart Mode (automatic grouping), Shopify Mode (transform Shopify order data), or Manual Mode (full manual entry). |
| ๐ Smart Mode Configuration | Informational notice about Smart Mode's automatic organization. |
| ๐ Your Invoice Data | JSON input containing invoice data for Smart Mode; typically pasted from previous nodes like Excel extraction. |
| ๐ช Store/Branch Code | Identifier for your store or branch (Shopify and Manual Modes). |
| ๐ข Business Name | Official business name registered with tax authorities (Shopify Mode). |
| ๐ Tax ID Number (TIN) | Your Tax Identification Number issued by the Inland Revenue Board (Shopify Mode). |
| ๐ ID Type | Type of business ID used (Business Registration Number, National ID, Passport) (Shopify Mode). |
| ๐ข Business Registration Number | Your business registration number or IC number (Shopify Mode). |
| ๐ Phone Number | Business phone number for customer contact (Shopify Mode). |
| ๐ง Email Address | Business email address for official communications (Shopify Mode). |
| ๐ Country | Business country location, usually Malaysia (Shopify and Manual Modes). |
| ๐ State | Business state location (Shopify and Manual Modes). |
| ๐๏ธ City | City where your business is located (Shopify and Manual Modes). |
| ๐ Street Address | Business street address (Shopify and Manual Modes). |
| ๐ฎ Postcode | Postal code (Shopify and Manual Modes). |
| ๐ญ Business Industry | Industry classification code describing your main business activity (Shopify and Manual Modes). |
| ๐งพ SST Registration Number | Optional Sales and Service Tax registration number (Shopify Mode). |
| ๐ Business Description | Optional brief description of your business activities (Shopify and Manual Modes). |
| โ๏ธ Manual Buyer Override | Whether to manually specify buyer TIN and ID details instead of using Shopify customer data (Shopify Mode). |
| ๐ Customer Tax ID (TIN) | Manual override for buyer's Tax Identification Number (Shopify Mode with override enabled). |
| ๐ Customer ID Type | Type of buyer's ID (Business Registration Number, National ID, Passport) (Shopify Mode with override enabled). |
| ๐ข Customer ID Number | Manual override for buyer's ID number (Shopify Mode with override enabled). |
| ๐ข Invoice Number | Unique invoice number (Manual Mode). |
| ๐ Invoice Type | Type of invoice (Invoice, Credit Note, Debit Note, Refund Note, Self-billed variants) (Manual Mode). |
| ๐ Original Invoice Number | Original invoice number for correction invoices (Manual Mode). |
| ๐ Original Invoice ID | System ID of original invoice for corrections (Manual Mode). |
| ๐ฑ Currency | Currency code for invoice amounts (Manual Mode). |
| ๐ Exchange Rate | Exchange rate if using foreign currency (Manual Mode). |
| Additional Notes | Extra notes or messages to include on the invoice (Manual Mode). |
| Shipping Terms | Shipping terms for international shipping (Manual Mode). |
| Trade Agreement Info | Free trade agreement information (Manual Mode). |
| Additional Information | Other important invoice information or terms (Manual Mode). |
| Billing Frequency | Recurring billing frequency (Manual Mode). |
| Billing Period Start Date | Start date of billing period (Manual Mode). |
| Billing Period End Date | End date of billing period (Manual Mode). |
| Subtotal (Before Tax) | Total amount before taxes (Manual Mode). |
| Total Amount (Including Tax) | Total invoice amount including taxes (Manual Mode). |
| Amount Due | Exact amount payable by customer (Manual Mode). |
| ๐ข Your Business Name | Registered business name (Manual Mode). |
| ๐ Your Tax ID (TIN) | Business Tax Identification Number (Manual Mode). |
| ๐ ID Type | Business ID type (Manual Mode). |
| ๐ข Your ID Number | Business registration or ID number (Manual Mode). |
| ๐ Your Contact Number | Business contact phone number (Manual Mode). |
| ๐ง Your Email Address | Business email for invoice correspondence (Manual Mode). |
| ๐ญ Your Business Industry | Industry classification code (Manual Mode). |
| ๐ Business Description | Brief description of business (Manual Mode). |
| ๐ Your Country | Business country location (Manual Mode). |
| ๐ Your State | Business state location (Manual Mode). |
| ๐๏ธ Your City | Business city (Manual Mode). |
| ๐ Street Address Line 1 | Business street address line 1 (Manual Mode). |
| ๐ Address Line 2 (Optional) | Additional address info (Manual Mode). |
| ๐ Address Line 3 (Optional) | Additional address info (Manual Mode). |
| ๐ฎ Your Postcode | Business postal code (Manual Mode). |
| ๐ฆ Your Bank Account (Optional) | Business bank account number for payments (Manual Mode). |
| ๐ท๏ธ Customer Code (Optional) | Reference code for customer (Manual Mode). |
| ๐ข Customer Name (Optional) | Customer business name (Manual Mode). |
| ๐ Customer ID Type | Customer ID type (Manual Mode). |
| ๐ข Customer ID Number | Customer registration or IC number (Manual Mode). |
| ๐ Customer Tax ID (TIN) | Customer Tax Identification Number (Manual Mode). |
| ๐ท๏ธ Customer SST Number (Optional) | Customer SST registration number (Manual Mode). |
| ๐ Customer Phone (Optional) | Customer phone number (Manual Mode). |
| ๐ง Customer Email (Optional) | Customer email address (Manual Mode). |
| ๐ Customer Country | Customer country (Manual Mode). |
| ๐ Customer State | Customer state (Manual Mode). |
| ๐๏ธ Customer City | Customer city (Manual Mode). |
| ๐ Customer Address Line 1 | Customer street address (Manual Mode). |
| ๐ Customer Address Line 2 (Optional) | Additional customer address info (Manual Mode). |
| ๐ Customer Address Line 3 (Optional) | Additional customer address info (Manual Mode). |
| ๐ฎ Customer Postcode | Customer postal code (Manual Mode). |
| ๐ฆ Products & Services | Collection of product/service line items with detailed fields such as quantity, unit price, discounts, fees, tax types, classification codes, measurement units, country of origin, HS code, etc. (Manual Mode). |
| ๐ฐ Total Tax Amount | Total tax amount for entire invoice (Manual Mode). |
| ๐ณ Payment Method | Payment method (cash, cheque, bank transfer, credit card, etc.) (Manual Mode). |
| ๐ Advance Payment Reference (Optional) | Reference number for advance payment (Manual Mode). |
| ๐ฐ Advance Payment Amount (Optional) | Amount already paid upfront (Manual Mode). |
| ๐ Advance Payment Date (Optional) | Date of advance payment (Manual Mode). |
| โฐ Advance Payment Time (Optional) | Time of advance payment (Manual Mode). |
| ๐ Purchase Order Number (Optional) | Customer purchase order or reference number (Manual Mode). |
| โณ Payment Terms (Optional) | Payment terms description (Manual Mode). |
| ๐ต Final Net Amount | Final amount after discounts and charges (Manual Mode). |
| ๐ธ Total Discounts Applied | Total discount amount applied (Manual Mode). |
| โ Total Additional Fees | Total additional fees or charges (Manual Mode). |
| ๐ข Rounding Adjustment (Optional) | Small rounding adjustment amount (Manual Mode). |
| โ Extra Charges/Discounts (Optional) | Additional charges or discounts applying to entire invoice (Manual Mode). |
| ๐ Delivery/Shipping Details (Optional) | Shipping/delivery address details (Manual Mode). |
Output
The node outputs an array of JSON objects, each representing the result of processing one invoice. Each output object includes:
returnCode: Response code from the external API.returnMsg: Response message from the external API.errorMessage: Same as returnMsg, for error reporting.decodedResponse: Parsed JSON response content from the API.submissionuuid: Unique identifier for the submission (if available).invoiceuuid: Unique identifier for the created invoice (if available).invoiceCodeNumber: The invoice number used in the request.supplierTin: Supplier's Tax Identification Number.supplierName: Supplier's business name.buyerTin: Buyer's Tax Identification Number.buyerName: Buyer's name.cookie: Authentication cookie used for the session.authenticationCookie: Same as cookie.json_error: Boolean indicating if there was a JSON error.statusCode: HTTP status code of the API response.statusMessage: HTTP status message.processingMode: The mode used for processing (smarty, shopify, manual).lineItemCount: Number of line items processed.invoiceGroup: Invoice key or group identifier.issueMode: Issue mode indicator.fullApiResponse: Full raw API response.invoiceData: The invoice data sent to the API.
If errors occur during processing, the output will contain error details including the error message, processing mode, item index, and other diagnostic information.
No binary data output is indicated.
Dependencies
- Requires an API key credential for authentication with the external invoice processing system.
- Uses HTTP requests to communicate with the external API endpoint at
https://ics-uat.myinvoice2u.com/MYWs/ws/api/myInvoice. - Relies on several static JSON files for country codes, state codes, currency codes, payment methods, classification codes, unit types, tax types, e-invoice types, and industry subcategory codes.
- Node expects input data either as JSON arrays (for Smart Mode), Shopify order JSON objects (for Shopify Mode), or manual parameter inputs (for Manual Mode).
Troubleshooting
- Authentication Failure: If no authentication cookie is received after login, the node reports "Login failed - no cookie received." Ensure valid API credentials are configured.
- Invalid Input Data:
- In Smart Mode, missing or malformed JSON data in the
dataparameter will cause warnings and skipped items. - In Shopify Mode, input must contain valid Shopify order data with
line_items; otherwise, the item is skipped. - In Manual Mode, at least one invoice line item must be provided; otherwise, an error is thrown.
- In Smart Mode, missing or malformed JSON data in the
- Parameter Access Issues: Warnings are logged if parameters cannot be accessed in certain modes, defaulting to fallback values.
- API Response Parsing Errors: If the API response cannot be parsed or does not contain expected UUIDs, the node attempts to extract them heuristically but may fail.
- Error Handling: If
continueOnFailis enabled, errors per invoice are returned in the output with detailed diagnostics; otherwise, execution stops on first error.
Links and References
- Malaysian Inland Revenue Board (LHDN)
- MyInvoice2U ICS API Documentation (UAT environment)
- Shopify API Documentation
This summary is based solely on static analysis of the provided source code and property definitions.