Skip to content

Sage 200 Online Sales Order Line XML

All sales orders contain 'line items' that define what an order consists of (e.g. items on an order). If the contents of an order are modified by adding/updating/deleting order lines, this will affect the overall value of the order. Further information can be found on the Sage 200 Online Sales Order Line API Documentation.

Tasks

Zynk does not currently support downloading or uploading sales order lines directly, but can be used within Sage 200 Online Sales Order XML as part of the export and import of sales order records.

Fields for Download and Upload

product_id

Dependant (see product)
Product record Id, can also be set using product code, see product.

Type Example XML
integer(int64) 27256 <product_id>27256</product_id>

line_type

Required
The sales order line type.

Type Example XML
string(20) EnumLineTypeStandard <line_type>EnumLineTypeStandard</line_type>

Available Values

  • EnumLineTypeStandard
  • EnumLineTypeFreeText
  • EnumLineTypeCharge
  • EnumLineTypeComment

code

Dependant
The stock item code. In case of an additional charge, this can only be set for lines of type EnumLineTypeCharge and is required if description is not specified.

Type Example XML
string(30) CAR001 <code>CAR001</code>

description

Dependant
The item description. This could be stock item description, free text, additional charge or comment. Required for lines of type EnumLineTypeFreeText and is required for lines of type EnumLineTypeCharge if code is not specified.

Type Example XML
string(6000) Shipping Charges <description>Shipping Charges</description>

use_description

Optional
Whether to assign the description to the line, transferred from stock item if stock item specified.

Type Example XML
boolean false <use_description>false</use_description>

tax_code_id

Dependant (see tax_code)
Tax code Id, can also be set using tax code, see tax_code.

Type Example XML
integer(int64) 2 <tax_code_id>2</tax_code_id>

nominal_reference

Optional
The nominal reference. Can only be set for lines of type EnumLineTypeStandard, EnumLineTypeFreeText and EnumLineTypeCharge.

Type Example XML
string(8) 4000 <nominal_reference>4000</nominal_reference>

nominal_cost_centre

Optional
The nominal cost centre. Can only be set for lines of type EnumLineTypeStandard, EnumLineTypeFreeText and EnumLineTypeCharge.

Type Example XML
string(3) SAL <nominal_cost_centre>SAL</nominal_cost_centre>

nominal_department

Optional
The nominal department. Can only be set for lines of type EnumLineTypeStandard, EnumLineTypeFreeText and EnumLineTypeCharge.

Type Example XML
string(3) DEP <nominal_department>DEP</nominal_department>

line_quantity

Optional
Item quantity.Note: Decimals cannot be used as quantity values for traceable items that use serial numbers. These will be rounded up/down at the time of posting via the API.

Type Example XML
number(decimal 5dp) 1 <line_quantity>1</line_quantity>

selling_unit_description

Optional
The selling unit description. Can only be set for lines of type EnumLineTypeFreeText.

Type Example XML
string(20) Each <selling_unit_description>Each</selling_unit_description>

selling_unit_price

Optional
Selling unit price.

Type Example XML
number(decimal 5dp) 10.0 <selling_unit_price>10.0</selling_unit_price>

selling_unit_price_overriden

Optional
Whether the selling price unit has been manually entered. Can only be set for lines of type EnumLineTypeStandard.

Type Example XML
boolean true <selling_unit_price_overridden>true</selling_unit_price_overridden>

pricing_unit_description

Optional
The pricing unit description. Can only be set for lines of type EnumLineTypeStandard and product not of type EnumStockItemTypeStock

Type Example XML
string(20) Each <pricing_unit_description>Each</pricing_unit_description>

unit_discount_percent

Optional
Unit discount percent. Note if unit_discount_value is provided as well, this value will be adjusted accordingly.

Type Example XML
number(decimal 2dp) 10.0 <unit_discount_percent>10.0</unit_discount_percent>

discount_percent_specified

Optional
Whether the discount has been manually entered. Can only be set for lines of type EnumLineTypeStandard.

Type Example XML
boolean true <discount_percent_specified>true</discount_percent_specified>

unit_discount_value

Optional
Unit discount value. Note if unit_discount_percent is provided as well, this value will be used and the percentage will be adjusted accordingly.

Type Example XML
number(decimal 5dp) 5.0 <unit_discount_value>5.0</unit_discount_value>

unit_discount_overridden

Optional
Whether the discount value has been manually entered. Can only be set for lines of type EnumLineTypeStandard.

Type Example XML
boolean true <unit_discount_overridden>true</unit_discount_overridden>

cost_price

Optional
Cost price.

Type Example XML
number(decimal 5dp) 5.0 <cost_price>5.0</cost_price>

confirmation_intent_type

Optional
The confirmation type of the line. Can only be set for lines of type EnumLineTypeStandard and product of type EnumStockItemTypeServiceLabour or lines of type EnumLineTypeFreeText.

Type Example XML
enum ConfirmOnDespatch <confirmation_intent_type>ConfirmOnDespatch</confirmation_intent_type>

Available Values

  • ConfirmOnDespatch
  • Confirm
  • NoConfirmation

promised_delivery_date

Optional
Promised delivery date. Can only be set for lines of type EnumLineTypeStandard and EnumLineTypeFreeText.

Type Example XML
datetime 2022-01-01 <promised_delivery_date>2022-01-01</promised_delivery_date>

picking_list_comment

Optional
Picking list comment. Can only be set for lines of type EnumLineTypeStandard and EnumLineTypeFreeText.

Type Example XML
string(160) Gift wrap requested <picking_list_comment>Gift wrap requested</picking_list_comment>

despatch_note_comment

Optional
Despatch note comment. Can only be set for lines of type EnumLineTypeStandard and EnumLineTypeFreeText.

Type Example XML
string(160) Gift wrap applied <despatch_note_comment>Gift wrap requested</despatch_note_comment>

show_on_customer_docs

Optional
Can only be set for lines of type EnumLineTypeComment.

Type Example XML
boolean true <show_on_customer_docs>true</show_on_customer_docs>

Available Values

  • true
  • false

show_on_picking_list_type

Optional
Whether the line should appear on the picking list.

Type Example XML
string(20) ShowButExclude <show_on_picking_list_type>ShowButExclude</show_on_picking_list_type>

Available Values

  • DoNotShow
  • Show
  • ShowButExclude

Analysis Codes

Optional
Analysis codes are only supported on SOP Orders from version 2016.sp3 (12/09/2017). They are numbered from 1 to 5 (or 1 to 20 if you are using Sage 200 Professional), and can be specified in the XML using <analysis_code_X>, where X is the analysis code number.

Type Example XML
string(60) North <analysis_code_1>North</analysis_code_1>

Fields for Download Only

id

Read Only
Sales order line record Id.

Type Example XML
integer(int64) 27767 <id>27767</id>

line_number

Read Only
The line number.

Type Example XML
integer(int16) 1 <line_number>1</line_number>

sop_order_id

Read Only
Sales order record Id.

Type Example XML
integer(int64) 28006 <sop_order_id>28006</sop_order_id>

allocated_quantity

Read Only
Allocated quantity.

Type Example XML
number(decimal 5dp) 0.0 <allocated_quantity>0.0</allocated_quantity>

available_for_despatch

Read Only
Quantity allocated available for despatch.

Type Example XML
number(decimal 5dp) 0.0 <available_for_despatch>0.0</available_for_despatch>

despatch_receipt_quantity

Read Only
Despatch quantity.

Type Example XML
number(decimal 5dp) 0.0 <despatch_receipt_quantity>0.0</despatch_receipt_quantity>

invoice_credit_quantity

Read Only
Invoiced quantity.

Type Example XML
number(decimal 5dp) 0.0 <invoice_credit_quantity>0.0</invoice_credit_quantity>

posted_invoice_credit_quantity

Read Only
Quantity invoiced and posted to the sales ledger.

Type Example XML
number(decimal 5dp) 0.0 <posted_invoice_credit_quantity>0.0</posted_invoice_credit_quantity>

stock_unit_line_quantity

Read Only
Stock unit line quantity.

Type Example XML
number(decimal 5dp) 0.0 <stock_unit_line_quantity>0.0</stock_unit_line_quantity>

stock_unit_allocated_quantity

Read Only
Stock unit allocated quantity.

Type Example XML
number(decimal 5dp) 0.0 <stock_unit_allocated_quantity>0.0</stock_unit_allocated_quantity>

stock_unit_available_for_despatch

Read Only
Stock unit quantity allocated available for despatch.

Type Example XML
number(decimal 5dp) 0.0 <stock_unit_available_for_despatch>0.0</stock_unit_available_for_despatch>

stock_unit_despatch_receipt_quantity

Read Only
Stock unit despatched quantity.

Type Example XML
number(decimal 5dp) 0.0 <stock_unit_despatch_receipt_quantity>0.0</stock_unit_despatch_receipt_quantity>

stock_unit_invoice_credit_quantity

Read Only
Stock unit invoiced quantity.

Type Example XML
number(decimal 5dp) 0.0 <stock_unit_invoice_credit_quantity>0.0</stock_unit_invoice_credit_quantity>

stock_unit_posted_invoice_credit_quantity

Read Only
Stock unit quantity invoiced and posted to the sales ledger.

Type Example XML
number(decimal 5dp) 0.0 <stock_unit_posted_invoice_credit_quantity>0.0</stock_unit_posted_invoice_credit_quantity>

allocation_status

Read Only
The lines allocation status.

Type Example XML
enum EnumLineStatusFully <allocation_status>EnumLineStatusFully</allocation_status>

Available Values

  • EnumLineStatusNone
  • EnumLineStatusPartially
  • EnumLineStatusFully

despatch_receipt_status

Read Only
The lines despatched status.

Type Example XML
enum EnumLineStatusFully <despatch_receipt_status>EnumLineStatusFully</despatch_receipt_status>

Available Values

  • EnumLineStatusNone
  • EnumLineStatusPartially
  • EnumLineStatusFully

invoice_credit_status

Read Only
The lines invoice status.

Type Example XML
enum EnumLineStatusFully <invoice_credit_status>EnumLineStatusFully</invoice_credit_status>

Available Values

  • EnumLineStatusNone
  • EnumLineStatusPartially
  • EnumLineStatusFully

line_unit_precision

Read Only
The line unit precision.

Type Example XML
number(decimal 5dp) 1.0 <line_unit_precision>1.0</line_unit_precision>

stock_unit_precision

Read Only
The stock unit precision.

Type Example XML
number(decimal 5dp) 1.0 <stock_unit_precision>1.0</stock_unit_precision>

selling_unit_multiple

Read Only
The selling unit ratio to the base unit.

Type Example XML
number(decimal 9dp) 1.0 <selling_unit_multiple>1.0</selling_unit_multiple>

stock_unit_multiple

Read Only
The stock unit ratio to the base unit.

Type Example XML
number(decimal 9dp) 1.0 <stock_unit_multiple>1.0</stock_unit_multiple>

line_total_value

Read Only
The total value of the line.

Type Example XML
number(decimal 2dp) 5.0 <line_total_value>5.0</line_total_value>

line_tax_value

Read Only
The tax value of the line.

Type Example XML
number(decimal 2dp) 1.0 <line_tax_value>1.0</line_tax_value>

has_pop_order

Read Only
Whether the line is linked to a purchase order.

Type Example XML
boolean false <has_pop_order>false</has_pop_order>

back_to_back_status

Read Only
The line's SOP back to back status.

Type Example XML
enum EnumBackToBackStatusPONotReq <back_to_back_status>EnumBackToBackStatusPONotReq</back_to_back_status>

Available Values

  • EnumBackToBackStatusPONotReq
  • EnumBackToBackStatusPOReq
  • EnumBackToBackStatusPONotGen
  • EnumBackToBackStatusPOGen
  • EnumBackToBackStatusFulfilled

is_complete

Read Only
Whether the line is has been fully despatched and invoiced.

Type Example XML
boolean false <is_complete>false</is_complete>

is_line_deletable

Read Only
True if you can delete line, otherwise false.

Type Example XML
boolean false <is_line_deletable>false</is_line_deletable>

date_time_created

Read Only
The date and time this entity was created (UTC).

Type Example XML
datetime 2017-06-05T15:24:29.44 <date_time_created>2017-06-05T15:24:29.44</date_time_created>

date_time_updated

Read Only
The date and time this entity was last updated (UTC).

Type Example XML
datetime 2017-06-05T16:27:25.623 <date_time_updated>2017-06-05T16:27:25.623</date_time_updated>

Expandable Fields

Related information linked to sales order lines are also included in the exported XML, these can also be used to set certain fields on sales order imports using lookups rather than needing to know the internal id of the related record.

Product

Dependant (see product_id)
The sales order lines product code. On an import you can set the code of the product to use for the sales order line and Zynk will lookup the correct internal id from Sage.

Import example only setting the code

<product>
    <code>BOARD001</code>
</product>

Tax Code

Dependant (see tax_code_id)
The sales order lines tax code. On an import you can set the code of the tax code to use for the sales order line and Zynk will lookup the correct internal id from Sage.

Import example only setting the code

<tax_code>
    <code>1</code>
</tax_code>