Create Sales Order

unleashed.create_sales_order
ActionBusiness appsconnection required

Calls the Unleashed Software API with the connection's credentials.

Create a sales order from a JSON order document, so an order taken elsewhere lands in Unleashed without anyone rekeying it.

Connection

Required
Yes — the node will not save without one
Auth type
Custom
Providers
Unleashed Software
Secret shape
{"api_id": "…", "api_key": "…"} — the API ID and API Key from Unleashed
Resolved by
config.connection_id, else node.connection_id

Configuration

2 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
order
The sales order document. Customer, Warehouse, OrderStatus, Tax, TaxRate, SubTotal, TaxTotal, Total and at least one SalesOrderLine are mandatory; see Unleashed's Sales Orders reference for the rest.
objectYes—≥ 1 characters{"Customer":{"CustomerCode":"ACME"},"OrderStatus":"Parked","SalesOrderLines":[{"LineNumber":1,"LineTotal":100,"OrderQuantity":2,"Product":{"ProductCode":"WIDGET-1"},"UnitPrice":50}],"SubTotal":100,"Tax":{"TaxCode":"NONE"},"TaxRate":0,"TaxTotal":0,"Total":100,"Warehouse":{"WarehouseCode":"MAIN"}}
order_guid
Guid to create the order under. Leave empty and Unleashed generates one; supply your own only to make a retry idempotent.
stringNo——3d3a9b0f-8c3e-4a6a-9f7e-2b1c4d5e6f70

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "order": {
    "Customer": {
      "CustomerCode": "ACME"
    },
    "OrderStatus": "Parked",
    "SalesOrderLines": [
      {
        "LineNumber": 1,
        "LineTotal": 100,
        "OrderQuantity": 2,
        "Product": {
          "ProductCode": "WIDGET-1"
        },
        "UnitPrice": 50
      }
    ],
    "SubTotal": 100,
    "Tax": {
      "TaxCode": "NONE"
    },
    "TaxRate": 0,
    "TaxTotal": 0,
    "Total": 100,
    "Warehouse": {
      "WarehouseCode": "MAIN"
    }
  },
  "order_guid": "3d3a9b0f-8c3e-4a6a-9f7e-2b1c4d5e6f70"
}

Output

One shape.

result

FieldTypeExample
Guid
The sales order's Guid, which every other node uses as its id.
string—
OrderNumber
The human-readable order number, such as SO-00042.
string—
OrderStatus
Where the order is in its lifecycle, such as Completed.
string—
OrderDate
The date the order was placed.
string—
RequiredDate
The date the customer needs the goods by.
string—
CompletedDate
The date the order was completed, empty until it is.
string—
Customer
The customer the order belongs to.
object—
CustomerRef
The customer's own reference for the order.
string—
Warehouse
The warehouse the order ships from.
object—
Currency
The currency the order is priced in.
object—
SubTotal
Order total before tax.
number—
TaxTotal
Tax charged on the order.
number—
Total
Order total including tax.
number—
DiscountRate
Discount applied across the order, as a rate.
number—
SalesOrderLines
The order's lines, each with a product and quantity.
array—
Comments
Free-text comments stored on the order.
string—
LastModifiedOn
Timestamp of the last change to the order.
string—
{
  "Comments": "",
  "CompletedDate": "",
  "Currency": {},
  "Customer": {},
  "CustomerRef": "",
  "DiscountRate": 0,
  "Guid": "",
  "LastModifiedOn": "",
  "OrderDate": "",
  "OrderNumber": "",
  "OrderStatus": "",
  "RequiredDate": "",
  "SalesOrderLines": [],
  "SubTotal": 0,
  "TaxTotal": 0,
  "Total": 0,
  "Warehouse": {}
}

See Create Sales Order run in a workflow.

In a technical demo we add the Unleashed Software connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.