Skip to content

OrderFlow Scripting Guide

Realtime Despatch Software Ltd

Document Version: 4.0.6

Document Built: 2020-10-12

This document and its content is copyright of Realtime Despatch Software Limited. All rights reserved.
You may not, except with our express written permission, distribute, publish or commercially exploit the content.
Any reproduction of part or all of the contents in any form is prohibited.

OrderFlow Scripting API

OrderFlow Scripting API

Most of the scripts run on OrderFlow use the OrderFlow API. It is very useful to know how to access specific data items using Groovy scripting expressions.

Order

The following fields are the top level fields for the order.

Top Level Order Data

Groovy Expression Database Column Type Description
order.externalReference externalReference string Unique and human-readable reference for the order.
order.originatingExternalReference originatingExternalReference string Typically used when the order is received via a third party system where it is identified using a different reference.
order.source source string Used to denote the source of the order.
order.brand brand string If multiple brands are sold on the same channel, this field can be used to identify the brand.
order.type type string Used to distinguish between different types of sales orders.
order.paymentGatewayIdentifier paymentGatewayIdentifier string Identifies the payment gateway on which the financial transaction for the order was made.
order.paymentTransactionInfo paymentTransactionInfo string Further info used to distinguish the order. Only useful if further manual validation of the order may be required.
order.customerComment customerComment string Holds a customer comment place on the order.
order.requiresApproval requiresApproval boolean If set order requires approval before any shipments should be picked.

The following fields are the system fields for the order.

System Data

Groovy Expression Database Column Type Description
order.multiShipment multiShipment string
order.systemReserved systemReserved boolean
order.state state string
order.deleted deleted boolean
order.commented commented boolean

The following fields are the channel fields for the order.

Channel Data

Groovy Expression Database Column Type Description
order.channel.externalReference externalReference string Unique identifier for the sales channel on which the order was placed.
order.channel.name name string Name of the sales channel.

The following fields are the price fields for the order.

Price Data

Groovy Expression Database Column Type Description
order.currency currency string "Three character SO currency code, for example 'GBP', 'USD'."
order.totalPrice.net totalPriceNet double "The net total price value, before tax."
order.totalPrice.gross totalPriceGross double "The gross total price, after tax."
order.totalPrice.tax totalTax double The tax payable on the gross price.
order.totalPrice.taxCode totalTaxCode double The tax code for the tax on on the total price.
order.shippingPrice.net shippingPriceNet double "The net shipping price value, before tax."
order.shippingPrice.gross shippingPriceGross double The gross price of the shipment.
order.shippingPrice.tax shippingTax double The tax payable. Net price is derived as gross price less tax.
order.shippingPrice.taxCode shippingTaxCode double The tax code for the tax payment.
order.goodsPrice.net goodsPriceNet double "The net price value, before tax."
order.goodsPrice.gross goodsPriceGross double The gross price of the goods.
order.goodsPrice.tax goodsTax double The tax payable. Net price is derived as gross price less tax.
order.goodsPrice.taxCode goodsTaxCode double The tax code for the tax payment.
order.promotionCode promotionCode string Holds order level promotions/discounts - primarily usable for management reporting (e.g. winter_sale_20).
order.promotionDescription promotionDescription string Holds human readable analogue of promotionCode (e.g. Winter Sale - 20% Discount).

The following fields are the delivery address fields for the order.

Delivery Address Data

Groovy Expression Database Column Type Description
order.deliveryAddress.line1 deliveryAddressLine1 string First line of the order delivery address.
order.deliveryAddress.line2 deliveryAddressLine2 string Second line of the order delivery address.
order.deliveryAddress.line3 deliveryAddressLine3 string Third line of the order delivery address.
order.deliveryAddress.line4 deliveryAddressLine4 string Fourth line of the order delivery address.
order.deliveryAddress.line5 deliveryAddressLine5 string Fifth line of the order delivery address.
order.deliveryAddress.line6 deliveryAddressLine6 string Sixth line of the order delivery address.
order.deliveryAddress.countryCode countryCode string The country code. Generally a two character code e.g GB.
order.deliveryAddress.postCode postCode string Postal code.

The following fields are the delivery contact fields for the order.

Delivery Contact Data

Groovy Expression Database Column Type Description
order.deliveryContact.contactName deliveryContactName string Abbreviated contact name used as an alternative to the salutation/firstName/lastName combination.
order.deliveryContact.salutation deliverySalutation string Delivery contact salutation.
order.deliveryContact.firstName deliveryFirstName string Delivery contact first name.
order.deliveryContact.lastName deliveryLastName string Delivery contact last name.
order.deliveryContact.emailAddress deliveryEmailAddress string Delivery contact email address.
order.deliveryContact.dayPhoneNumber deliveryDayPhoneNumber string Delivery contact day phone number.
order.deliveryContact.eveningPhoneNumber deliveryEveningPhoneNumber string Delivery contact evening phone number.
order.deliveryContact.mobilePhoneNumber deliveryMobilePhoneNumber string Delivery contact mobile phone number.
order.deliveryContact.faxNumber deliveryFaxNumber string Delivery contact fax number.
order.deliveryContact.companyName deliveryCompanyName string Delivery contact company name.

The following fields are the invoice address fields for the order.

Invoice Address Data

Groovy Expression Database Column Type Description
order.invoiceAddress.line1 invoiceAddressLine1 string First line of the order invoice address.
order.invoiceAddress.line2 invoiceAddressLine2 string Second line of the order invoice address.
order.invoiceAddress.line3 invoiceAddressLine3 string Third line of the order invoice address.
order.invoiceAddress.line4 invoiceAddressLine4 string Fourth line of the order invoice address.
order.invoiceAddress.line5 invoiceAddressLine5 string Fifth line of the order invoice address.
order.invoiceAddress.line6 invoiceAddressLine6 string Sixth line of the order invoice address.
order.invoiceAddress.countryCode invoiceAddressCountryCode string The country code. Generally a two character code e.g GB.
order.invoiceAddress.postCode invoiceAddressPostCode string Postal code.

The following fields are the invoice contact fields for the order.

Invoice Contact Data

Groovy Expression Database Column Type Description
order.invoiceContact.contactName invoiceContactName string Abbreviated contact name used as an alternative to the salutation/firstName/lastName combination.
order.invoiceContact.salutation invoiceSalutation string Invoice contact salutation.
order.invoiceContact.firstName invoiceFirstName string Invoice contact first name.
order.invoiceContact.lastName invoiceLastName string Invoice contact last name.
order.invoiceContact.emailAddress invoiceEmailAddress string Invoice contact email address.
order.invoiceContact.dayPhoneNumber invoiceDayPhoneNumber string Invoice contact day phone number.
order.invoiceContact.eveningPhoneNumber invoiceEveningPhoneNumber string Invoice contact evening phone number.
order.invoiceContact.mobilePhoneNumber invoiceMobilePhoneNumber string Invoice contact mobile phone number.
order.invoiceContact.faxNumber invoiceFaxNumber string Invoice contact fax number.
order.invoiceContact.companyName invoiceCompanyName string Invoice contact company name.

The following fields are the user defined fields for the order. Note that the usage of individual user defined fields is not predefined, and depends entirely on the environment.

User Defined Data

Groovy Expression Database Column Type
order.userDefined.userDefined1 userDefined1 string
order.userDefined.userDefined2 userDefined2 string
order.userDefined.userDefined3 userDefined3 string
order.userDefined.userDefined4 userDefined4 string
order.userDefined.userDefined5 userDefined5 string

The following fields are the date fields for the order.

Date Data

Groovy Expression Database Column Type Description
order.created created string The date/time that the order was created on the system.
order.lastUpdated lastUpdated string The date/time that the order was last updated.
order.completed completed string The date/time that the order was completed.
order.placed placed string The date/time that the order was placed on the third party system.
order.authorised authorised string The date/time that the order was approved by the relevant payment gateway (if available).
order.exported exported string The date/time at which the order was exported from an external system.

The following fields are the implicit fields for the order. Implicit fields are fields for which the underlying data may differ, and typically involve default or fallback sources of the data if the primary data item is not present.

Implicit Data

Groovy Expression Database Column Type Description
order.implicitInvoiceAddress n/a Address Returns InvoiceAddress if this is set - otherwise returns DeliveryAddress.
order.implicitInvoiceContact n/a Contact Returns InvoiceContact if this is set - otherwise returns DeliveryContact.
order.implicitPlaced n/a datetime Returns the date placed if this is set - otherwise returns date created.
order.implicitAuthorised n/a datetime Returns the date authorised if this is set - otherwise returns date created.

Order Attribute

A particular order attribute can be obtained from an order using the following Groovy.

def orderAttribute = order.getAttribute('order_attribute_1');

With the reference to the attribute, the name, title and value of the attribute can be obtained using the following code:

def orderAttribute = order.getAttribute('attribute_a');

println 'Attribute Name: ' + orderAttribute.name  
println 'Attribute Title: ' + orderAttribute.title
println 'Attribute Value: ' + orderAttribute.value

For example, to obtain the value of a known attribute, you can use the following expression:

println order.getAttribute('pet_name')?.value;

Shipment

The following fields are the top level fields for the shipment.

Top Level Shipment Data

Groovy Expression Database Column Type Description
shipment.externalReference externalReference string Unique and Human-readable reference for the Shipment.
shipment.thirdPartReference thirdPartyReference string Optional reference for shipment by which a third party system might identify it.
shipment.state state string The current state of the shipment.
shipment.paidFor paidFor boolean Persists whether this shipment has been paid for; that is a successful response to a payment request has been received.
shipment.weight weight string The weight of the shipment.
shipment.weightUnits weightUnits string The unit measurement.
shipment.pickingMode pickingMode string The mode used for picking for this shipment. Used to indicate that the shipment is to be picked individually in a batch or via cross docking.
shipment.packageCount packageCount integer The number of packages in this shipment.
shipment.packageState packageState string Not null if multiple packages are being used to handle shipment despatching.

The following fields are the system fields for the shipment.

System Data

Groovy Expression Database Column Type Description
shipment.sequence sequence string ???.
shipment.originatingShipmentId originatingShipmentId integer The identity of the originating shipment from which this shipment was split off. Applies only for split shipments.
shipment.multiLine multiLine boolean Holds persistently whether a shipment is multiline so that the order line collection does not need to be loaded to determine this. It is the responsibility of the application to ensure that this value is set correctly.
shipment.hasWarnings hasWarnings boolean Flag to indicate that the shipment has warnings which may be pack warnings or otherwise. Once set this typically won't change although for a cloned shipment it should be set to false. Should always be true if shipment warnings is populated
shipment.progressIndication progressIndication integer Holds the progress indicator for an order line.
shipment.systemReserved systemReserved string A field reserved for system use as required. Not designed for holding customer data.
shipment.commented commented boolean True if at least one comment has been recorded against this Shipment.
shipment.deleted deleted boolean Used to mark this Shipment as deleted.

The following fields are the manifest fields for the shipment.

Manifest Data

Groovy Expression Database Column Type Description
shipment.manifestState manifestState string Used to hold manifest state of the shipment. Note that a null manifest means that the shipment has not been manifested. If the shipment courier requires a manifest the shipment cannot be marked as despatched until the manifest state has been set.
shipment.addedToDespatchManifest addedToDespatchManifest string Optionally-populated date to hold when shipment was added to the despatch manifest.

The following fields are the priority fields for the shipment.

Priority Data

Groovy Expression Database Column Type Description
shipment.priority priority integer The priority of this shipment.
shipment.priorityName priorityName string The name or title which goes with the priority.
shipment.priorityTitle priorityTitle string Returns the formatted title for the courier preferably using priorityName but falling back to priority if necessary.
shipment.priorityValue priorityValue integer Returns the priority value which will either be the wired in priority value priority or the default value of 1.

The following fields are the delivery instruction fields for the shipment.

Delivery Instruction Data

Groovy Expression Database Column Type Description
shipment.deliveryInstruction deliveryInstruction string ???.
shipment.requestedDeliveryDate requestedDeliveryDate datetime The date on which the customer has requested or opted for delivery of the shipment.
shipment.requestedDeliveryTimeSlot requestedDeliveryTimeSlot string The requested time slot for the delivery. The granularity depends on the system configuration.
shipment.earliestShipDate earliestShipDate datetime ???.
shipment.despatchComment despatchComment string ???.
shipment.deliveryType deliveryType string The delivery type for the shipment.
shipment.collectionPoint collectionPoint string The identity of the collection point for the shipment. For example for collect from store shipments - indicates the store from which the shipment should be collected.
shipment.collectionPointName collectionPointName string The name of the collection point name. For example would be the human readable name of the store.
shipment.deliverySuggestion.code deliverySuggestionCode integer The code used for the delivery suggestion. Used by scripts.
shipment.deliverySuggestion.name deliverySuggestionName string The name used for thd delivery suggestion. Provides human-readable representation of name.

The following fields are the courier and carriage fields for the shipment.

Courier and Carriage Data

Groovy Expression Database Column Type Description
shipment.courierValidated courierValidated boolean Whether this shipment has been passed through courier validation. Note that if the shipment changes it is up to the application to set this.
shipment.courierAccepted courierAccepted boolean Whether this shipment has been passed through the courier prepare step. Note that if the shipment changes it is up to the application to set this. Typically if a shipment has been accepted it will need to be cancelled with the courier if changes are to be made to the shipment courier options.
shipment.courierErrors courierErrors boolean Flag to indicate the presence of courier errors (that is entries in the ShipmentCourierError table for this shipment.
shipment.courierState courierState string The courier workflow state for the shipment
shipment.deliveryMethod.carrierCode carrierCode string The code of the ultimate carrier of the shipment i.e. the company doing the physical transportation of the goods. This may be different to or the same as the carrier name or it may be null.
shipment.deliveryMethod.carrierName carrierName string The name of the ultimate carrier of the shipment i.e. the company doing the physical transportation of the goods. For example for the couriers royalmail_ppi and royalmail_tracked in both cases the carrierName is 'Royal Mail'. However there are two different courier implementations.

Courier and Carriage Data (cont.)

Groovy Expression Database Column Type Description
shipment.deliveryMethod.serviceCode serviceCode string The selected courier service.
shipment.deliveryMethod.serviceName serviceName string The name of the courier service.
shipment.deliveryMethod.options courierOptions string A comma separated list of options.
shipment.deliveryMethod.mailFormat mailFormat string the mail format assigned to this shipment.
shipment.deliveryMethod.lineHaulSiteReference n/a string Optional reference of a line-haul destination site.
shipment.presortValue presortValue string The postal presort number which if set is used as a first stage of sorting prior to collection by the courier.
shipment.despatchReference despatchReference string ???.
shipment.courierIntermediateReference courierIntermediateReference string The courier reference (in addition to the despatchReference) for the shipment. Primarily used for courier aggregator services.

The following fields are the price fields for the shipment.

Price Data

Groovy Expression Database Column Type Description
shipment.actualShippingPrice.net actualShippingPriceNet double "The net price value, before tax."
shipment.actualShippingPrice.gross actualShippingPriceGross double The gross price of the item.
shipment.actualShippingPrice.tax actualShippingTax double The tax payable. Net price is derived as gross price less tax.
shipment.actualShippingPrice.taxCode actualShippingTaxCode double The tax code for the tax payment.

The following fields are the address fields for the shipment.

Address Data

Groovy Expression Database Column Type Description
shipment.address.line1 addressLine1 string First line of the address.
shipment.address.line2 addressLine2 string Second line of the address.
shipment.address.line3 addressLine3 string Third line of the address.
shipment.address.line4 addressLine4 string Fourth line of the address.
shipment.address.line5 addressLine5 string Fifth line of the address.
shipment.address.line6 addressLine6 string Sixth line of the address.
shipment.address.countryCode countryCode string "The ISO two character country code, for example, 'GB', 'DE'."
shipment.address.postCode postCode string Postal code.

The following fields are the contact fields for the order.

Contact Data

Groovy Expression Database Column Type Description
shipment.contact.contactName contactName string Abbreviated contact name used as an alternative to the salutation/firstName/lastName combination.
shipment.contact.salutation salutation string Contact salutation.
shipment.contact.firstName firstName string Contact first name.
shipment.contact.lastName lastName string Contact last name.
shipment.contact.emailAddress emailAddress string Contact email address.
shipment.contact.dayPhoneNumber dayPhoneNumber string Contact day phone number.
shipment.contact.eveningPhoneNumber eveningPhoneNumber string Contact evening phone number.
shipment.contact.mobilePhoneNumber mobilePhoneNumber string Contact mobile phone number.
shipment.contact.faxNumber faxNumber string Contact fax number.
shipment.contact.companyName companyName string Contact company name.

The following fields are the date fields for the shipment.

Date Data

Groovy Expression Database Column Type Description
shipment.created created string The date/time that the shipment was created on the system.
shipment.lastUpdated lastUpdated string The date/time that the shipment was last updated.
shipment.completed completed string The date/time that the shipment was completed.

The following fields are the user defined fields for the shipment. Note that the usage of individual user defined fields is not predefined, and depends entirely on the environment.

User Defined Data

Groovy Expression Database Column Type Description
shipment.userDefined.userDefined1 userDefined1 string
shipment.userDefined.userDefined2 userDefined2 string
shipment.userDefined.userDefined3 userDefined3 string
shipment.userDefined.userDefined4 userDefined4 string
shipment.userDefined.userDefined5 userDefined5 string

The following fields are the implicit fields for the shipment. Implicit fields are fields for which the underlying data may differ, and typically involve default or fallback sources of the data if the primary data item is not present.

Implicit Data

Groovy Expression Database Column Type Description
shipment.implicitWeightUnits n/a string If weight units are set then uses this. Otherwise uses grams.
shipment.implicitCarrierCode n/a string Returns the carrier code. Otherwise returns the couriers external reference.
shipment.implicitCarrierName n/a string Returns the carrier name. Otherwise returns the carrier code. Otherwise returns the courier name.
shipment.implicitServiceName n/a string Returns the service name. Otherwise returns the service code.
shipment.implicitPriority n/a string Returns the priority name. Otherwise returns the priority value.
shipment.implicitShippingPrice n/a string Returns the shipping price if one exists. Otherwise it returns a newly instantiated shipping price.
shipment.implicitAddress n/a Address Returns shipment address if this is set - otherwise returns order's DeliveryAddress.

Implicit Data (cont.)

Groovy Expression Database Column Type Description
shipment.implicitContact n/a Contact Returns shipment contact if this is set - otherwise returns order's DeliveryContact.
shipment.implicitPhoneNumber n/a string Returns implicit phone number. Useful for case where single phone number is required. Uses mobile phone number if available. Otherwise defaults to day phone number then evening phone number.
shipment.formattedImplicitCompanyAndAddress n/a string Returns company name and address with '\n' delimiter string.
shipment.formattedImplicitCompanyAndAddressNoCountry n/a string Returns company name and address with '\n' delimiter string and no country.

Shipment Attribute

A particular shipment attribute can be obtained from a shipment using the following Groovy.

def shipmentAttribute = shipment.getAttribute('shipment_attribute_1');

With the reference to the attribute, the name, title and value of the attribute can be obtained using the following code:

def shipmentAttribute = shipment.getAttribute('attribute_a');

println 'Attribute Name: ' + shipmentAttribute.name  
println 'Attribute Title: ' + shipmentAttribute.title
println 'Attribute Value: ' + shipmentAttribute.value

For example, to obtain the value of a known attribute, you can use the following expression:

   println shipment.getAttribute('custom_reference')?.value;

Order Line

The following fields are the top level fields for the order line.

Order Line Data

Groovy Expression Database Column Type Description
orderLine.quantity quantity integer Quantity of a particular line.
orderLine.thirdPartyReference thirdPartyReference string An optional reference supplied by a 3rd party system that may be played back to it.
orderLine.description description string The description of the order line. If available uses the declared description (may be language-specific). Otherwise uses the description of the product.
orderLine.state state string The current state of the Order Line.
orderLine.virtual virtual boolean True if this is an order line which is inactive from a stock management point of view. The virtual flag will typically be set at the point at which an order line is identified as not having any concrete stock requirement. An order line which is associated with a virtual product is marked as virtual.
orderLine.packaging packaging boolean True if this is an order line which is for a packaging product. If set the line may be excluded from certain workflow processes e.g. excluded from despatch notes. An order line which is associated with a packaging product is marked as packaging.
orderLine.productBatch productBatch string Used to capture the product batch number for batch tracked products.

The following fields are the system fields for the order line.

System Data

Groovy Expression Database Column Type Description
orderLine.version version integer The current version of a specific row. This is used to prevent concurrent changes.
orderLine.deleted deleted boolean Used to mark this Order Line as deleted.
orderLine.complete complete boolean Flag which indicates that the order line has been complete. Flag is used to indicate that the order line is no longer outstanding. A cancelled order line is also marked as complete.
orderLine.progressIndication progressIndication integer Holds the progress indicator for an order line.
orderLine.mergedFromOrderLines mergedFromOrderLines Collection A collection of order line identifiers from which this order line was merged. Null / empty if this order line was never merged from other lines.
orderLine.inactive inactive boolean True if the order line is inactive so should not be considered for any operations but should still be present for visibility. An order line which is cancelled becomes inactive at the point at which it is cancelled.

The following fields are the price fields for the order line.

Price Data

Groovy Expression Database Column Type Description
orderLine.totalPrice.net totalPriceNet double "The net price value, before tax."
orderLine.totalPrice.gross totalPriceGross double The gross price of the item.
orderLine.totalPrice.tax totalTax double The tax payable. Net price is derived as gross price less tax.
orderLine.totalPrice.taxCode totalTaxCode double The tax code for the tax payment.
orderLine.unitPrice.net unitPriceNet double "The net price value, before tax."
orderLine.unitPrice.gross unitPriceGross double The gross price of the item.
orderLine.unitPrice.tax unitTax double The tax payable. Net price is derived as gross price less tax.
orderLine.unitPrice.taxCode unitTaxCode double The tax code for the tax payment.
orderLine.promotionCode promotionCode string Holds product level promotion code used when order line was taken.
orderLine.promotionPriceDescription promotionPriceDescription string Holds promotion price description field which can be used directly on reports (e.g '£16.99 (was £20.99)').

The following fields are the user defined fields for the order line. Note that the usage of individual user defined fields is not predefined, and depends entirely on the environment.

User Defined Data

Groovy Expression Database Column Type
orderLine.userDefined.userDefined1 userDefined1 string
orderLine.userDefined.userDefined2 userDefined2 string
orderLine.userDefined.userDefined3 userDefined3 string
orderLine.userDefined.userDefined4 userDefined4 string
orderLine.userDefined.userDefined5 userDefined5 string

The following fields are the date fields for the order line.

Data Data

Groovy Expression Database Column Type Description
orderLine.created created string The date/time that the order line was created on the OrderFlow system.

The following fields are the implicit fields for the order line. Implicit fields are fields for which the underlying data may differ, and typically involve default or fallback sources of the data if the primary data item is not present.

Implicit Data

Groovy Expression Database Column Type Description
orderLine.implicitTotalPrice n/a price Returns the implicit total price calculated if necessary from the unit price multiplied by the quantity. Note that all net gross and tax fields of the price will be populated.
orderLine.implicitUnitPrice n/a price Returns implicit unit price for item. If declared unit price is present then uses this. Does not use product price.
orderLine.implicitDescription n/a string Returns implicit description for order line. If declared description is present then uses this. Otherwise uses product description.
orderLine.orderLineAndProductDescription n/a string Returns where possible both the Order Line and Product descriptions combined.
orderLine.implicitWeightFromProduct n/a double Returns the implicit weight from the individual products. Returns null if any of the constituent products does not have a weight.
orderLine.implicitWeight n/a double Returns the implicit weight for this order line based on the product weight.

Order line Attribute

A particular order line attribute can be obtained from an order line using the following Groovy.

def orderLineAttribute = orderLine.getAttribute('order_line_attribute_1');

With the reference to the attribute, the name, title and value of the attribute can be obtained using the following code:

def orderLineAttribute = orderLine.getAttribute('attribute_a');

println 'Attribute Name: ' + orderLineAttribute.name  
println 'Attribute Title: ' + orderLineAttribute.title
println 'Attribute Value: ' + orderLineAttribute.value

For example, to obtain the value of a known attribute, you can use the following expression:

println orderLine.getAttribute('line_identifier')?.value;

Product

The following fields are the top level fields for the product.

Product Data

Groovy Expression Database Column Type Description
product.externalReference externalReference string Unique and Human-readable reference for the Order.
product.thirdPartyReference thirdPartyReference string An optional reference supplied by a 3rd party system that may be played back to it.
product.state state string The current state of the Product.
product.description description string The description of the product.
product.warehouseDescription warehouseDescription string The description of the product in the warehouse.
product.barcode barcode string Barcode for product typically provided by supplier. Can be used as a simpler alternative to specifying supplier product codes. Useful if all products are coming from a single source and only a single alternative barcode is needed.
product.imageReference imageReference string A reference which can be used to display the image on an external system.
product.customsDescription customsDescription string The customs description. If not set can be inferred from product category.
product.productComposition productComposition string The product composition.
product.countryOfOrigin countryOfOrigin string The country of origin. Typically used in customs declarations. The normal expectation is that this field will be populated using the letter ISO country code for the product although it will also support full country name if required.
product.weight weight double The weight for a single unit of the specified product. Only applies for countable products that is products that don't have a decimal quantity.
product.weightUnits weightUnits string The weight units to be applied for this product if different from the default.

Product Data (cont.)

Groovy Expression Database Column Type Description
product.quantityType quantityType string Quantity type. Applies only for products that support decimal quantities.
product.displayUnits displayUnits string The units to be used for display.
product.packagingDescription packagingDescription string Text describing how item is packaged and quantity thereof. e.g boxes of 6 cartons of 12
product.physicalStorageTypes physicalStorageTypes string If set then the location in which the product is stored must have a physical location type value corresponding with one of the storage physical types specified.
product.sellable sellable boolean Is considered sellable if it is eligible to appear as a sellable product on one or more sales platforms.
product.dangerous dangerous boolean "If true product is dangerous
product.fragile fragile boolean If true product is fragile.
product.activated activated boolean If true product is active.

The following fields are the system fields for the product.

System Data

Groovy Expression Database Column Type Description
product.version version integer The current version of a specific row. This is used to prevent concurrent changes.
product.deleted deleted boolean Used to mark this Order Line as deleted.
product.hasMultipleBarcodes hasMultipleBarcodes boolean If true this product has more than one barcode. In addition to the "primary" barcode field it has other "secondary" barcodes held in Barcode entities that reference this product.
product.hasDatasheet hasDatasheet boolean If true this product has an associated ProductDataSheet.
product.inGroup inGroup boolean Is true if product has associated grouped product records. Needs to be set against the product at the point at which it is identified that the product is associated with GroupedProduct entries.

The following fields are the dimensions fields for the product.

Dimensions Data

Groovy Expression Database Column Type Description
product.length length double The length of the longest horizontal dimension for movable items (e.g. products). For locations the length is actually the depth of the location (the horizontal distance from the access face to the 'back' of the location).
product.width width double The length of the shortest horizontal dimension for movable items (e.g. products). For locations the length is actually the depth of the location (the horizontal distance from the access face to the 'height' of the location).
product.height height double The height of the vertical dimension.
product.area area double The area of the horizontal dimension. Can be explicitly specified but otherwise is determined by the product of length and width.
product.volume volume double The volume. Can be explicitly specified but otherwise is determined by the product of length width and height.

The following fields are the price fields for the product.

Price Data

Groovy Expression Database Column Type Description
product.listPrice.currency currency double The currency of the sale price.
product.listPrice.currencyUnits currencyUnits double The units of currency of the sale price.
product.listPrice.net priceNet double "The net price value, before tax."
product.listPrice.gross priceGross double The gross price of the item.
product.listPrice.tax tax double The tax payable. Net price is derived as gross price less tax.
product.listPrice.taxCode taxCode double The tax code for the tax payment.

The following fields are the user defined fields for the product. Note that the usage of individual user defined fields is not predefined, and depends entirely on the environment.

User Defined Data

Groovy Expression Database Column Type
product.userDefined.userDefined1 userDefined1 string
product.userDefined.userDefined2 userDefined2 string
product.userDefined.userDefined3 userDefined3 string
product.userDefined.userDefined4 userDefined4 string
product.userDefined.userDefined5 userDefined5 string

The following fields are the implicit fields for the product. Implicit fields are fields for which the underlying data may differ, and typically involve default or fallback sources of the data if the primary data item is not present.

Implicit Data

Groovy Expression Database Column Type Description
product.implicitHarmonizedSystemCode n/a string Returns harmonized system (HC) code from product if set otherwise uses the value for category if present.
product.implicitCustomsDescription n/a string Returns customs description from product if set otherwise uses the value for category if present.
product.implicitDimensions n/a ProductDimensions Returns dimensions for the location if possible. Prefers the dimensions instance currently attached to the location. If not present attempts to find one attached to the storageClass field if present.