Opencell icon

Opencell

Consume Opencell API

Overview

The Update Commercial Order operation for the "Order" resource in this n8n node allows you to update (or upsert) a commercial order in the Opencell system. This is typically used in business process automation scenarios where you need to synchronize or modify order data, such as updating progress, changing billing information, or associating an order with a different seller or status.

Common use cases:

  • Updating the progress and status of an existing commercial order.
  • Associating an order with a new seller or billing account.
  • Modifying order metadata such as type, number, or related quote.
  • Automating order management workflows in sales, billing, or fulfillment processes.

Example:
Automatically update the progress and status of a commercial order when a milestone is reached in your CRM or ERP system.


Properties

Name Type Meaning
Authentication options Selects the authentication method: Basic Authentication or OAuth2.
Order ID number The unique identifier of the commercial order to update.
Seller Code string The code identifying the seller associated with the order.
Billing Account Code string The code of the billing account linked to the order.
Order Progress (%) number The current progress of the order, expressed as a percentage.
Progress Date dateTime The date and time when the order progress was last updated.
Order Date dateTime The date and time when the order was placed or updated.
Additional Fields collection Optional fields to further describe or categorize the order (see below for details).
Body Content Type hidden Always set to "multipart-form-data"; used internally for request formatting.

Additional Fields (collection):

  • Order Number (number): An alternate or external order number.
  • Quote Code (string): The code of the quote associated with this order.
  • Order Type Code (string): A code representing the type/category of the order.
  • Status (string): The current status of the order.
  • Customer Service Begin (dateTime): When customer service for this order begins.

Output

  • The node returns a json object containing the response from the Opencell API after updating the commercial order.
  • The structure of the output will reflect the Opencell API's response for the commercial order update endpoint, which typically includes the updated order details or a status message.
  • If multiple items are processed, each result is paired with its input item.

Example output:

{
  "json": {
    // ...fields returned by Opencell, e.g.,
    "id": 123,
    "sellerCode": "SELLER01",
    "billingAccountCode": "BILLACC01",
    "orderProgress": 80,
    "progressDate": "2024-06-05T12:00:00Z",
    "orderDate": "2024-06-01T09:00:00Z",
    "status": "In Progress"
    // ...other fields as provided by the API
  },
  "pairedItem": {
    "item": 0
  }
}

Dependencies

  • External Service: Requires access to an Opencell instance with the REST API enabled.
  • Authentication: You must configure either Basic Authentication or OAuth2 credentials in n8n for the Opencell API.
  • n8n Configuration: Credentials must be set up in the n8n credential store under the names opencellApi (for Basic Auth) or opencellOAuth2Api (for OAuth2).

Troubleshooting

Common issues:

  • Invalid Credentials: If authentication fails, ensure that your credentials are correct and have sufficient permissions.
  • Missing Required Fields: All required properties (e.g., Order ID, Seller Code, Billing Account Code, etc.) must be provided; otherwise, the node will throw an error.
  • API Errors: If the Opencell API returns an error (e.g., invalid order ID, permission denied), the error message will be included in the node's output or thrown as an exception.

Error messages and resolutions:

  • "Username/password error. Error code : XXX": Check your username and password in the n8n credentials.
  • "Host error. Error code : XXX": Verify the Opencell API URL and network connectivity.
  • "Invalid credentials (unknown error)": Double-check all credential settings.
  • "Unable to get custom fields. Server response: ...": Ensure the resource supports custom fields and that your user has access.

Links and References

Discussion