avanta icon

avanta

Consume avanta API

Actions57

Servicecenter - Invoice → Create or Update

AI-generated

Overview

This node interacts with the Avanta API to create or update invoices within the Servicecenter resource. It supports detailed invoice data input, including customer and company IDs, billing information, invoice positions (items), document files, and additional custom fields. The node can handle bulk operations and offers options for debugging, SSL handling, and request timeout configuration. It is useful for automating invoice management workflows, such as creating new invoices or updating existing ones with detailed line items and associated documents.

Use Case Examples

  1. Automatically create invoices in Avanta when a new order is received in an e-commerce system.
  2. Update invoice details and line items in Avanta based on changes in an external accounting system.
  3. Bulk upload multiple invoices with detailed item positions and document attachments for batch processing.

Properties

Name Meaning
Request Options Options to configure API request behavior such as debug mode, SSL certificate validation, and timeout duration.
Return to Webhook Whether to return the API response to a webhook, requiring a subsequent 'Respond to Webhook' node.
Use Bulk API Whether to use the bulk API for processing multiple invoice items.
Dataflow ID Optional override for the dataflow ID, automatically read from webhook input if not set.
Customer ID ID of the customer associated with the invoice.
Company ID ID of the company associated with the invoice.
Billing Company Name of the billing company for the invoice.
Billing Name Name of the billing contact for the invoice.
Customer Invoice ID Invoice ID provided by the customer.
Status Status of the invoice.
Invoice Positions Type Method to add invoice positions, either via mapped fields or raw JSON.
Invoice Positions Collection of invoice item positions with detailed fields such as item position, name, price, quantity, SKU, subtotal, and additional optional fields like batch number, comments, custom dates, prices, quantities, text fields, discount, tax, packaging unit, status, and document files.
Invoice Positions JSON Raw JSON input for invoice positions as an alternative to mapped fields.
Document Files Invoice document files provided either as a UI collection or raw JSON array.
Additional Fields Additional optional fields for the invoice such as custom dates, prices, texts, customer order ID, extension attributes, invoice date, internal invoice ID, grand total, tax amount, external ID, and billing and shipping address details.

Output

JSON

  • response - The API response from creating or updating the invoice, including details of the processed invoice.

Dependencies

  • Avanta API with appropriate API key credentials

Troubleshooting

  • Ensure all required fields like customer_id, company_id, billing_company, billing_name, customer_invoiceid, and status are provided to avoid validation errors.
  • If using bulk API, verify that the dataflowId is correctly set or available in the webhook input when triggered via dataflow profile.
  • Enable debug mode to see detailed API request information if the node fails to connect or returns unexpected results.
  • Check SSL certificate settings if connection issues occur; enabling 'Ignore SSL Issues' can help in insecure environments but is not recommended for production.
  • Timeout errors can occur if the server is slow to respond; increase the timeout value in request options if needed.

Links

Discussion