Actions6
Overview
This node integrates with Sperse CRM to create invoices. It allows users to generate detailed invoice records including client references, billing and shipping addresses, line items, transactions, and totals. This is useful for businesses that want to automate invoice creation within their workflows, ensuring accurate financial documentation and seamless integration with Sperse's payment processing and affiliate marketing platform.
Practical examples:
- Automatically creating an invoice when a new order is placed in an e-commerce system.
- Generating invoices for recurring services or subscriptions.
- Creating historical invoices for accounting or auditing purposes.
Properties
| Name | Meaning |
|---|---|
| Contact ID | Sperse Contact ID used to identify the client for the invoice. |
| External Contact ID | External reference ID for the contact, alternative to Contact ID. |
| Status | Invoice status; options: Draft, Final, Paid, Sent. |
| Invoice Number | Unique number identifying the invoice. |
| Date of the Invoice | The date when the invoice was issued (ISO 8601 format, e.g., 2024-06-11T11:11:41Z). |
| Due Date of the Invoice | The due date for payment of the invoice (ISO 8601 format). |
| Currency ID | Currency code for the invoice amount; options include AUD, CAD, CHF, CNY, EUR, GBP, IND, JPY, NZD, SEK, USD. |
| Grand Total | Total amount of the invoice. Default is 0 if not provided. |
| Totals | Collection of totals including Discount Total, Shipping Total, and Tax Total. |
| Billing Address | Collection of billing address fields such as company, first name, last name, phone, email, country, state, city, zip, and address lines. |
| Shipping Address | Collection of shipping address fields similar to billing address. |
| Invoice Description | Description text for the invoice. |
| Invoice Note | Additional notes related to the invoice. |
| Quantity | Quantity of the item being invoiced. |
| Rate | Rate per unit for the item. |
| Unit ID | Unit type for the quantity; options include Custom, Day, Feet, Hour, Kilogram, Month, Package, Piece, Pound, Unit, Zone. |
| Total Item Price | Total price for the item line. Default is 0 if not provided. |
| Sort Order | Numeric value to sort invoice lines; default is 0. |
| Additional Line Field | Collection of additional line details including Commissionable Amount, Product Code (used for product lookup), and Description. |
| Transaction Date | Date of the transaction related to the invoice (ISO 8601 format). |
| Amount | Amount for the transaction. |
| Historical Data | Boolean flag indicating if this is historical data (true) or an actual transaction (false). Default is true. |
| Additional Transaction Field | Collection of additional transaction details including Transaction Description, Gateway Name, and Gateway Transaction ID. |
Output
The node outputs JSON data representing the created invoice as returned by the Sperse API. This includes all the invoice details sent during creation along with any additional metadata or identifiers assigned by the system.
No binary data output is produced by this node.
Dependencies
- Requires an API key credential for authenticating with the Sperse CRM API.
- The node uses the Sperse API endpoints
/api/services/CRM/Import/ImportInvoiceto create invoices. - Proper configuration of the API authentication credential in n8n is necessary.
Troubleshooting
- Common issues:
- Invalid or missing Contact ID or External Contact ID may cause the API to reject the invoice creation.
- Incorrect date formats for
date,dueDate, ortransactionDatecan lead to errors; ensure ISO 8601 format is used. - Required fields like
status,invoiceNo,currencyId,grandTotal,quantity,rate,itemTotal,transactionDate,amount, andhistoricalDatamust be provided.
- Error messages:
- Authentication errors indicate invalid or missing API credentials.
- Validation errors from the API typically specify which required field is missing or malformed.
- Resolution:
- Verify all required fields are correctly set.
- Confirm date strings follow the expected format.
- Ensure the API key credential is valid and has appropriate permissions.
Links and References
- Sperse CRM official website and API documentation (not provided here; consult your Sperse CRM account or support for access).
- ISO 8601 date format reference: https://en.wikipedia.org/wiki/ISO_8601
