Zynk Workflow Documentation

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

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>

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>

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_price

Optional
Selling unit price.

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

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>

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>

cost_price

Optional
Cost price.

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

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

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

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>

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>

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>

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>

Back | Edit on Github