Class Order

The Order class represents an order. The correct way to retrieve an order is described in OrderMgr.

ConstantDescription
CONFIRMATION_STATUS_CONFIRMED: Number = 2constant for when Confirmation Status is Confirmed
CONFIRMATION_STATUS_NOTCONFIRMED: Number = 0constant for when Confirmation Status is Not Confirmed
ENCRYPTION_ALGORITHM_RSA_ECB_OAEPWITHSHA_256ANDMGF1PADDING: String = "RSA/ECB/OAEPWithSHA-256AndMGF1Padding"The encryption algorithm "RSA/ECB/OAEPWithSHA-256AndMGF1Padding".
ENCRYPTION_ALGORITHM_RSA_ECB_PKCS1PADDING: String = "RSA/ECB/PKCS1Padding"The outdated encryption algorithm "RSA/ECB/PKCS1Padding".
EXPORT_STATUS_EXPORTED: Number = 1constant for when Export Status is Exported
EXPORT_STATUS_FAILED: Number = 3constant for when Export Status is Failed
EXPORT_STATUS_NOTEXPORTED: Number = 0constant for when Export Status is Not Exported
EXPORT_STATUS_READY: Number = 2constant for when Export Status is ready to be exported.
ORDER_STATUS_CANCELLED: Number = 6constant for when Order Status is Cancelled
ORDER_STATUS_COMPLETED: Number = 5constant for when Order Status is Completed
ORDER_STATUS_CREATED: Number = 0constant for when Order Status is Created
ORDER_STATUS_FAILED: Number = 8constant for when Order Status is Failed
ORDER_STATUS_NEW: Number = 3constant for when Order Status is New
ORDER_STATUS_OPEN: Number = 4constant for when Order Status is Open
ORDER_STATUS_REPLACED: Number = 7constant for when Order Status is Replaced
PAYMENT_STATUS_NOTPAID: Number = 0constant for when Payment Status is Not Paid
PAYMENT_STATUS_PAID: Number = 2constant for when Payment Status is Paid
PAYMENT_STATUS_PARTPAID: Number = 1constant for when Payment Status is Part Paid
SHIPPING_STATUS_NOTSHIPPED: Number = 0constant for when Shipping Status is Not shipped
SHIPPING_STATUS_PARTSHIPPED: Number = 1constant for when Shipping Status is Part Shipped
SHIPPING_STATUS_SHIPPED: Number = 2constant for when Shipping Status is Shipped
PropertyDescription
affiliatePartnerID: StringReturns the affiliate partner ID value, or null.
affiliatePartnerName: StringReturns the affiliate partner name value, or null.
appeasementItems: FilteringCollection (read-only)Returns the collection of AppeasementItems associated with this order.
appeasements: FilteringCollection (read-only)Returns the collection of Appeasements associated with this order.
cancelCode: EnumValueIf this order was cancelled, returns the value of the cancel code or null.
cancelDescription: StringIf this order was cancelled, returns the text describing why the order was cancelled or null.
capturedAmount: Money (read-only)Returns the sum of the captured amounts.
confirmationStatus: EnumValueReturns the confirmation status of the order.
Possible values are CONFIRMATION_STATUS_NOTCONFIRMED and CONFIRMATION_STATUS_CONFIRMED.
createdBy: String (read-only)Returns the name of the user who has created the order.
currentOrder: Order (read-only)Returns the current order.
currentOrderNo: String (read-only)Returns the order number of the current order.
customerLocaleID: String (read-only)Returns the ID of the locale that was in effect when the order was placed.
customerOrderReference: StringReturns the customer-specific reference information for the order, or null.
exportAfter: DateReturns a date after which an order can be exported.
exportStatus: EnumValueReturns the export status of the order.
Possible values are: EXPORT_STATUS_NOTEXPORTED, EXPORT_STATUS_EXPORTED, EXPORT_STATUS_READY, and EXPORT_STATUS_FAILED.
externalOrderNo: StringReturns the value of an external order number associated with this order, or null.
externalOrderStatus: StringReturns the status of an external order associated with this order, or null.
externalOrderText: StringReturns the text describing the external order, or null.
globalPartyID: String (read-only)The Global Party ID reconciles customer identity across multiple systems.
imported: Boolean (read-only)Returns true, if the order is imported and false otherwise.
invoiceItems: FilteringCollection (read-only)Returns the collection of InvoiceItems associated with this order.
invoiceNo: StringReturns the invoice number for this Order.
invoices: FilteringCollection (read-only)Returns the collection of Invoices associated with this order.
orderExportXML: String (read-only)Returns the order export XML as String object.
orderNo: String (read-only)Returns the order number for this order.
orderToken: String (read-only)Returns the token for this order.
originalOrder: Order (read-only)Returns the original order associated with this order.
originalOrderNo: String (read-only)Returns the order number of the original order associated with this order.
paymentStatus: EnumValueReturns the order payment status value.
Possible values are PAYMENT_STATUS_NOTPAID, PAYMENT_STATUS_PARTPAID or PAYMENT_STATUS_PAID.
paymentTransaction: PaymentTransaction (read-only)Returns the payment transaction associated with this order.
refundedAmount: Money (read-only)Returns the sum of the refunded amounts.
remoteHost: String (read-only)Returns the IP address of the remote host from which the order was created.
replaceCode: EnumValueIf this order was replaced by another order, returns the value of the replace code.
replaceDescription: StringIf this order was replaced by another order, returns the value of the replace description.
replacedOrder: Order (read-only)Returns the order that this order replaced or null.
replacedOrderNo: String (read-only)Returns the order number that this order replaced or null if this order did not replace an order.
replacementOrder: Order (read-only)Returns the order that replaced this order, or null.
replacementOrderNo: String (read-only)If this order was replaced by another order, returns the order number that replaced this order.
returnCaseItems: FilteringCollection (read-only)Returns the collection of ReturnCaseItems associated with this order.
returnCases: FilteringCollection (read-only)Returns the collection of ReturnCases associated with this order.
returnItems: FilteringCollection (read-only)Returns the collection of ReturnItems associated with this order.
returns: FilteringCollection (read-only)Returns the collection of Returns associated with this order.
shippingOrderItems: FilteringCollection (read-only)Returns the collection of ShippingOrderItems associated with this order.
shippingOrders: FilteringCollection (read-only)Returns the collection of ShippingOrders associated with this order.
shippingStatus: EnumValueReturns the order shipping status.
Possible values are SHIPPING_STATUS_NOTSHIPPED, SHIPPING_STATUS_PARTSHIPPED or SHIPPING_STATUS_SHIPPED.
sourceCode: String (read-only)Returns the source code stored with the order or null if no source code is attached to the order.
sourceCodeGroup: SourceCodeGroup (read-only)Returns the source code group attached to the order or null if no source code group is attached to the order.
sourceCodeGroupID: String (read-only)Returns the source code group id stored with the order or null if no source code group is attached to the order.
status: EnumValueReturns the status of the order.
Possible values are:
taxRoundedAtGroup: Boolean (read-only)Use this method to check if the Order was created with grouped taxation calculation.

This class does not have a constructor, so you cannot create it directly.

MethodDescription
createAppeasement()Creates a new Appeasement associated with this order.
createAppeasement(String)Creates a new Appeasement associated with this order.
createReturnCase(Boolean)Creates a new ReturnCase associated with this order specifying whether the ReturnCase is an RMA (return merchandise authorization).
createReturnCase(String, Boolean)Creates a new ReturnCase associated with this order specifying whether the ReturnCase is an RMA (return merchandise authorization).
createServiceItem(String, String)Returns the order item with the given status which wraps a new service item which is created and added to the order.
createShippingOrder()Creates a new ShippingOrder for this order.
createShippingOrder(String)Creates a new ShippingOrder for this order.
getAffiliatePartnerID()Returns the affiliate partner ID value, or null.
getAffiliatePartnerName()Returns the affiliate partner name value, or null.
getAppeasement(String)Returns the Appeasement associated with this order with the given appeasementNumber.
getAppeasementItem(String)Returns the AppeasementItem associated with this Order with the given appeasementItemID.
getAppeasementItems()Returns the collection of AppeasementItems associated with this order.
getAppeasements()Returns the collection of Appeasements associated with this order.
getCancelCode()If this order was cancelled, returns the value of the cancel code or null.
getCancelDescription()If this order was cancelled, returns the text describing why the order was cancelled or null.
getCapturedAmount()Returns the sum of the captured amounts.
getConfirmationStatus()Returns the confirmation status of the order.
Possible values are CONFIRMATION_STATUS_NOTCONFIRMED and CONFIRMATION_STATUS_CONFIRMED.
getCreatedBy()Returns the name of the user who has created the order.
getCurrentOrder()Returns the current order.
getCurrentOrderNo()Returns the order number of the current order.
getCustomerLocaleID()Returns the ID of the locale that was in effect when the order was placed.
getCustomerOrderReference()Returns the customer-specific reference information for the order, or null.
getExportAfter()Returns a date after which an order can be exported.
getExportStatus()Returns the export status of the order.
Possible values are: EXPORT_STATUS_NOTEXPORTED, EXPORT_STATUS_EXPORTED, EXPORT_STATUS_READY, and EXPORT_STATUS_FAILED.
getExternalOrderNo()Returns the value of an external order number associated with this order, or null.
getExternalOrderStatus()Returns the status of an external order associated with this order, or null.
getExternalOrderText()Returns the text describing the external order, or null.
getGlobalPartyID()The Global Party ID reconciles customer identity across multiple systems.
getInvoice(String)Returns the Invoice associated with this order with the given invoiceNumber.
getInvoiceItem(String)Returns the InvoiceItem associated with this order with the given ID.
getInvoiceItems()Returns the collection of InvoiceItems associated with this order.
getInvoiceNo()Returns the invoice number for this Order.
getInvoices()Returns the collection of Invoices associated with this order.
getOrderExportXML()Returns the order export XML as String object.
getOrderExportXML(String, String)Returns the order export XML as String object, with payment instrument data re-encrypted using the given encryption algorithm and key.
getOrderExportXML(String, String, Boolean)Returns the order export XML as String object, with payment instrument data re-encrypted using the given encryption algorithm and key.
getOrderExportXML(String, String)Returns the order export XML as String object, with payment instrument data re-encrypted using the given encryption algorithm and key.
getOrderItem(String)Returns the OrderItem for the itemID.
getOrderNo()Returns the order number for this order.
getOrderToken()Returns the token for this order.
getOriginalOrder()Returns the original order associated with this order.
getOriginalOrderNo()Returns the order number of the original order associated with this order.
getPaymentStatus()Returns the order payment status value.
Possible values are PAYMENT_STATUS_NOTPAID, PAYMENT_STATUS_PARTPAID or PAYMENT_STATUS_PAID.
getPaymentTransaction()Returns the payment transaction associated with this order.
getRefundedAmount()Returns the sum of the refunded amounts.
getRemoteHost()Returns the IP address of the remote host from which the order was created.
getReplaceCode()If this order was replaced by another order, returns the value of the replace code.
getReplaceDescription()If this order was replaced by another order, returns the value of the replace description.
getReplacedOrder()Returns the order that this order replaced or null.
getReplacedOrderNo()Returns the order number that this order replaced or null if this order did not replace an order.
getReplacementOrder()Returns the order that replaced this order, or null.
getReplacementOrderNo()If this order was replaced by another order, returns the order number that replaced this order.
getReturn(String)Returns the Return associated with this order with the given returnNumber.
getReturnCase(String)Returns the ReturnCase associated with this order with the given returnCaseNumber.
getReturnCaseItem(String)Returns the ReturnCaseItem associated with this order with the given returnCaseItemID.
getReturnCaseItems()Returns the collection of ReturnCaseItems associated with this order.
getReturnCases()Returns the collection of ReturnCases associated with this order.
getReturnItem(String)Returns the ReturnItem associated with this order with the given ID.
getReturnItems()Returns the collection of ReturnItems associated with this order.
getReturns()Returns the collection of Returns associated with this order.
getShippingOrder(String)Returns the ShippingOrder associated with this order with the given shippingOrderNumber.
getShippingOrderItem(String)Returns the ShippingOrderItem associated with this order with the given shippingOrderItemID.
getShippingOrderItems()Returns the collection of ShippingOrderItems associated with this order.
getShippingOrders()Returns the collection of ShippingOrders associated with this order.
getShippingStatus()Returns the order shipping status.
Possible values are SHIPPING_STATUS_NOTSHIPPED, SHIPPING_STATUS_PARTSHIPPED or SHIPPING_STATUS_SHIPPED.
getSourceCode()Returns the source code stored with the order or null if no source code is attached to the order.
getSourceCodeGroup()Returns the source code group attached to the order or null if no source code group is attached to the order.
getSourceCodeGroupID()Returns the source code group id stored with the order or null if no source code group is attached to the order.
getStatus()Returns the status of the order.
Possible values are:
isImported()Returns true, if the order is imported and false otherwise.
isTaxRoundedAtGroup()Use this method to check if the Order was created with grouped taxation calculation.
reauthorize()Ensures that the order is authorized.
removeRemoteHost()Removes the IP address of the remote host if stored.
setAffiliatePartnerID(String)Sets the affiliate partner ID value.
setAffiliatePartnerName(String)Sets the affiliate partner name value.
setCancelCode(String)Sets the cancel code value.
setCancelDescription(String)Sets the description as to why the order was cancelled.
setConfirmationStatus(Number)Sets the confirmation status value.
Possible values are CONFIRMATION_STATUS_NOTCONFIRMED or CONFIRMATION_STATUS_CONFIRMED.
setCustomer(Customer)This method is used to associate the order object with the specified customer object.
setCustomerNo(String)Sets the customer number associated with this order.
setCustomerOrderReference(String)Sets the customer-specific reference information for the order.
setExportAfter(Date)Sets the date after which an order can be exported.
setExportStatus(Number)Sets the export status of the order.
Possible values are: EXPORT_STATUS_NOTEXPORTED, EXPORT_STATUS_EXPORTED, EXPORT_STATUS_READY, and EXPORT_STATUS_FAILED.
setExternalOrderNo(String)Sets the value of an external order number associated with this order
setExternalOrderStatus(String)Sets the status of an external order associated with this order
setExternalOrderText(String)Sets the text describing the external order.
setInvoiceNo(String)Sets the invoice number for this Order.
setOrderStatus(Number)Sets the order status.
setPaymentStatus(Number)Sets the order payment status.
Possible values are PAYMENT_STATUS_NOTPAID, PAYMENT_STATUS_PARTPAID or PAYMENT_STATUS_PAID.
setReplaceCode(String)Sets the value of the replace code.
setReplaceDescription(String)Sets the value of the replace description.
setShippingStatus(Number)Sets the order shipping status value.
Possible values are SHIPPING_STATUS_NOTSHIPPED, SHIPPING_STATUS_PARTSHIPPED or SHIPPING_STATUS_SHIPPED.
setStatus(Number)Sets the status of the order.
trackOrderChange(String)Tracks an order change.

addNote, createBillingAddress, createBonusProductLineItem, createCouponLineItem, createCouponLineItem, createGiftCertificateLineItem, createGiftCertificatePaymentInstrument, createPaymentInstrument, createPaymentInstrumentFromWallet, createPriceAdjustment, createPriceAdjustment, createProductLineItem, createProductLineItem, createProductLineItem, createProductLineItem, createShipment, createShippingPriceAdjustment, getAdjustedMerchandizeTotalGrossPrice, getAdjustedMerchandizeTotalNetPrice, getAdjustedMerchandizeTotalPrice, getAdjustedMerchandizeTotalPrice, getAdjustedMerchandizeTotalTax, getAdjustedShippingTotalGrossPrice, getAdjustedShippingTotalNetPrice, getAdjustedShippingTotalPrice, getAdjustedShippingTotalTax, getAllGiftCertificateLineItems, getAllLineItems, getAllProductLineItems, getAllProductLineItems, getAllProductQuantities, getAllShippingPriceAdjustments, getBillingAddress, getBonusDiscountLineItems, getBonusLineItems, getBusinessType, getChannelType, getCouponLineItem, getCouponLineItems, getCurrencyCode, getCustomer, getCustomerEmail, getCustomerName, getCustomerNo, getDefaultShipment, getEtag, getGiftCertificateLineItems, getGiftCertificateLineItems, getGiftCertificatePaymentInstruments, getGiftCertificatePaymentInstruments, getGiftCertificateTotalGrossPrice, getGiftCertificateTotalNetPrice, getGiftCertificateTotalPrice, getGiftCertificateTotalTax, getMerchandizeTotalGrossPrice, getMerchandizeTotalNetPrice, getMerchandizeTotalPrice, getMerchandizeTotalTax, getNotes, getPaymentInstrument, getPaymentInstruments, getPaymentInstruments, getPriceAdjustmentByPromotionID, getPriceAdjustments, getProductLineItems, getProductLineItems, getProductQuantities, getProductQuantities, getProductQuantityTotal, getShipment, getShipments, getShippingPriceAdjustmentByPromotionID, getShippingPriceAdjustments, getShippingTotalGrossPrice, getShippingTotalNetPrice, getShippingTotalPrice, getShippingTotalTax, getTaxTotalsPerTaxRate, getTotalGrossPrice, getTotalNetPrice, getTotalTax, isExternallyTaxed, isTaxRoundedAtGroup, removeAllPaymentInstruments, removeBonusDiscountLineItem, removeCouponLineItem, removeGiftCertificateLineItem, removeNote, removePaymentInstrument, removePriceAdjustment, removeProductLineItem, removeShipment, removeShippingPriceAdjustment, setCustomerEmail, setCustomerName, updateOrderLevelPriceAdjustmentTax, updateTotals, verifyPriceAdjustmentLimits

describe, getCustom

getCreationDate, getLastModified, getUUID

assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values

CONFIRMATION_STATUS_CONFIRMED: Number = 2

constant for when Confirmation Status is Confirmed


CONFIRMATION_STATUS_NOTCONFIRMED: Number = 0

constant for when Confirmation Status is Not Confirmed


ENCRYPTION_ALGORITHM_RSA_ECB_OAEPWITHSHA_256ANDMGF1PADDING: String = "RSA/ECB/OAEPWithSHA-256AndMGF1Padding"

The encryption algorithm "RSA/ECB/OAEPWithSHA-256AndMGF1Padding".


ENCRYPTION_ALGORITHM_RSA_ECB_PKCS1PADDING: String = "RSA/ECB/PKCS1Padding"

The outdated encryption algorithm "RSA/ECB/PKCS1Padding". Please do not use anymore!

Deprecated:

Support for this algorithm will be removed in a future release. Please use ENCRYPTION_ALGORITHM_RSA_ECB_OAEPWITHSHA_256ANDMGF1PADDING instead.


EXPORT_STATUS_EXPORTED: Number = 1

constant for when Export Status is Exported


EXPORT_STATUS_FAILED: Number = 3

constant for when Export Status is Failed


EXPORT_STATUS_NOTEXPORTED: Number = 0

constant for when Export Status is Not Exported


EXPORT_STATUS_READY: Number = 2

constant for when Export Status is ready to be exported.


ORDER_STATUS_CANCELLED: Number = 6

constant for when Order Status is Cancelled


ORDER_STATUS_COMPLETED: Number = 5

constant for when Order Status is Completed


ORDER_STATUS_CREATED: Number = 0

constant for when Order Status is Created


ORDER_STATUS_FAILED: Number = 8

constant for when Order Status is Failed


ORDER_STATUS_NEW: Number = 3

constant for when Order Status is New


ORDER_STATUS_OPEN: Number = 4

constant for when Order Status is Open


ORDER_STATUS_REPLACED: Number = 7

constant for when Order Status is Replaced


PAYMENT_STATUS_NOTPAID: Number = 0

constant for when Payment Status is Not Paid


PAYMENT_STATUS_PAID: Number = 2

constant for when Payment Status is Paid


PAYMENT_STATUS_PARTPAID: Number = 1

constant for when Payment Status is Part Paid


SHIPPING_STATUS_NOTSHIPPED: Number = 0

constant for when Shipping Status is Not shipped


SHIPPING_STATUS_PARTSHIPPED: Number = 1

constant for when Shipping Status is Part Shipped


SHIPPING_STATUS_SHIPPED: Number = 2

constant for when Shipping Status is Shipped


affiliatePartnerID: String

Returns the affiliate partner ID value, or null.


affiliatePartnerName: String

Returns the affiliate partner name value, or null.


appeasementItems: FilteringCollection (read-only)

Returns the collection of AppeasementItems associated with this order.


appeasements: FilteringCollection (read-only)

Returns the collection of Appeasements associated with this order.


cancelCode: EnumValue

If this order was cancelled, returns the value of the cancel code or null.


cancelDescription: String

If this order was cancelled, returns the text describing why the order was cancelled or null.


capturedAmount: Money (read-only)

Returns the sum of the captured amounts. The captured amounts are calculated on the fly. Associate a payment capture for an PaymentInstrument with an Invoice using Invoice.addCaptureTransaction(OrderPaymentInstrument, Money).


confirmationStatus: EnumValue

Returns the confirmation status of the order.

Possible values are CONFIRMATION_STATUS_NOTCONFIRMED and CONFIRMATION_STATUS_CONFIRMED.


createdBy: String (read-only)

Returns the name of the user who has created the order. If an agent user has created the order, the agent user's name is returned. Otherwise "Customer" is returned.


currentOrder: Order (read-only)

Returns the current order. The current order represents the most recent order in a chain of orders. For example, if Order1 was replaced by Order2, Order2 is the current representation of the order and Order1 is the original representation of the order. If you replace Order2 with Order3, Order 3 is now the current order and Order1 is still the original representation of the order. If this order has not been replaced, this method returns this order because this order is the current order.

See Also:


currentOrderNo: String (read-only)

Returns the order number of the current order. The current order represents the most recent order in a chain of orders. For example, if Order1 was replaced by Order2, Order2 is the current representation of the order and Order1 is the original representation of the order. If you replace Order2 with Order3, Order 3 is now the current order and Order1 is still the original representation of the order. If this order has not been replaced, calling this method returns the same value as the getOrderNo() method because this order is the current order.

See Also:


customerLocaleID: String (read-only)

Returns the ID of the locale that was in effect when the order was placed. This is the customer's locale.


customerOrderReference: String

Returns the customer-specific reference information for the order, or null.


exportAfter: Date

Returns a date after which an order can be exported.


exportStatus: EnumValue

Returns the export status of the order.

Possible values are: EXPORT_STATUS_NOTEXPORTED, EXPORT_STATUS_EXPORTED, EXPORT_STATUS_READY, and EXPORT_STATUS_FAILED.


externalOrderNo: String

Returns the value of an external order number associated with this order, or null.


externalOrderStatus: String

Returns the status of an external order associated with this order, or null.


externalOrderText: String

Returns the text describing the external order, or null.


globalPartyID: String (read-only)

The Global Party ID reconciles customer identity across multiple systems. For example, as part of the Service for Commerce experience, service agents can find information for customers who have never called into the call center, but have created a profile on the website. Service agents can find guest order data from B2C Commerce and easily create accounts for customers. Customer 360 Data Manager matches records from multiple data sources to determine all the records associated with a specific customer.


imported: Boolean (read-only)

Returns true, if the order is imported and false otherwise.


invoiceItems: FilteringCollection (read-only)

Returns the collection of InvoiceItems associated with this order.

Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.


invoiceNo: String

Returns the invoice number for this Order.

When an order is placed (e.g. with OrderMgr.placeOrder(Order)) invoice number will be filled using a sequence. Before order was placed null will be returned unless it was set with setInvoiceNo(String).


invoices: FilteringCollection (read-only)

Returns the collection of Invoices associated with this order.

Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.


orderExportXML: String (read-only)

Returns the order export XML as String object.

NOTE: This method will return payment instrument data masked. If payment instrument re-encryption is needed please use getOrderExportXML(String, String) instead.

Example:


orderNo: String (read-only)

Returns the order number for this order.


orderToken: String (read-only)

Returns the token for this order. The order token is a string (length 32 bytes) associated with this one order. The order token is random. It reduces the capability of malicious users to access an order through guessing. Order token can be used to further validate order ownership, but should never be used to solely validate ownership. In addition, the storefront should ensure authentication and authorization. See the Security Best Practices for Developers for details.


originalOrder: Order (read-only)

Returns the original order associated with this order. The original order represents an order that was the first ancestor in a chain of orders. For example, if Order1 was replaced by Order2, Order2 is the current representation of the order and Order1 is the original representation of the order. If you replace Order2 with Order3, Order1 is still the original representation of the order. If this order is the first ancestor, this method returns this order.

See Also:


originalOrderNo: String (read-only)

Returns the order number of the original order associated with this order. The original order represents an order that was the first ancestor in a chain of orders. For example, if Order1 was replaced by Order2, Order2 is the current representation of the order and Order1 is the original representation of the order. If you replace Order2 with Order3, Order1 is still the original representation of the order. If this order is the first ancestor, this method returns the value of getOrderNo().

See Also:


paymentStatus: EnumValue

Returns the order payment status value.

Possible values are PAYMENT_STATUS_NOTPAID, PAYMENT_STATUS_PARTPAID or PAYMENT_STATUS_PAID.


paymentTransaction: PaymentTransaction (read-only)

Returns the payment transaction associated with this order. It is possible that there are multiple payment transactions associated with the order. In this case, this method returns the transaction associated with the first PaymentInstrument returned by getPaymentInstruments().

Deprecated:

Use LineItemCtnr.getPaymentInstruments() to get the list of PaymentInstrument instances and then use getPaymentTransaction() method on each PaymentInstrument to access the individual transactions.


refundedAmount: Money (read-only)

Returns the sum of the refunded amounts. The refunded amounts are calculated on the fly. Associate a payment refund for an PaymentInstrument with an Invoice using Invoice.addRefundTransaction(OrderPaymentInstrument, Money).


remoteHost: String (read-only)

Returns the IP address of the remote host from which the order was created.

If the IP address was not captured for the order because order IP logging was disabled at the time the order was created, null will be returned.


replaceCode: EnumValue

If this order was replaced by another order, returns the value of the replace code. Otherwise. returns null.


replaceDescription: String

If this order was replaced by another order, returns the value of the replace description. Otherwise returns null.


replacedOrder: Order (read-only)

Returns the order that this order replaced or null. For example, if you have three orders where Order1 was replaced by Order2 and Order2 was replaced by Order3, calling this method on Order3 will return Order2. Similarly, calling this method on Order1 will return null as Order1 was the original order.

See Also:


replacedOrderNo: String (read-only)

Returns the order number that this order replaced or null if this order did not replace an order. For example, if you have three orders where Order1 was replaced by Order2 and Order2 was replaced by Order3, calling this method on Order3 will return the order number for Order2. Similarly, calling this method on Order1 will return null as Order1 was the original order.

See Also:


replacementOrder: Order (read-only)

Returns the order that replaced this order, or null.

See Also:


replacementOrderNo: String (read-only)

If this order was replaced by another order, returns the order number that replaced this order. Otherwise returns null.

See Also:


returnCaseItems: FilteringCollection (read-only)

Returns the collection of ReturnCaseItems associated with this order.

Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.


returnCases: FilteringCollection (read-only)

Returns the collection of ReturnCases associated with this order.

Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.


returnItems: FilteringCollection (read-only)

Returns the collection of ReturnItems associated with this order.

Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.


returns: FilteringCollection (read-only)

Returns the collection of Returns associated with this order.

Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.


shippingOrderItems: FilteringCollection (read-only)

Returns the collection of ShippingOrderItems associated with this order.

Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.


shippingOrders: FilteringCollection (read-only)

Returns the collection of ShippingOrders associated with this order.

Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.


shippingStatus: EnumValue

Returns the order shipping status.

Possible values are SHIPPING_STATUS_NOTSHIPPED, SHIPPING_STATUS_PARTSHIPPED or SHIPPING_STATUS_SHIPPED.


sourceCode: String (read-only)

Returns the source code stored with the order or null if no source code is attached to the order.


sourceCodeGroup: SourceCodeGroup (read-only)

Returns the source code group attached to the order or null if no source code group is attached to the order.


sourceCodeGroupID: String (read-only)

Returns the source code group id stored with the order or null if no source code group is attached to the order.


status: EnumValue

Returns the status of the order.

Possible values are:

The order status usually changes when a process action is initiated. Most status changes have an action which needs to executed in order to end having the order in a specific order status. When an order is created with e.g. OrderMgr.createOrder(Basket) the order status will be ORDER_STATUS_CREATED. The usual flow is that payment authorization will be added to the order. Once the order is considered as valid (payed, fraud checked, ...) the order gets placed. This can be done by calling OrderMgr.placeOrder(Order). The result of placing an order will be status ORDER_STATUS_OPEN (from a process standpoint ORDER_STATUS_NEW which has the same meaning). Status ORDER_STATUS_REPLACED is related to functionality BasketMgr.createBasketFromOrder(Order). ORDER_STATUS_COMPLETED has no meaning by default but can be used by custom implementations but is a synonym for NEW/OPEN. Below you will find the most important status changes:

Status before Action Status after Business meaning
- OrderMgr.createOrder(Basket) CREATED Order was created from a basket.
CREATED OrderMgr.placeOrder(Order) OPEN/NEW Order was considered as valid. Order can now be exported to 3rd party systems.
CREATED OrderMgr.failOrder(Order) FAILED Order was considered not valid. E.g. payment authorization was wrong or fraud check was not successful.
OPEN/NEW OrderMgr.cancelOrder(Order) CANCELLED Order was cancelled.
CANCELLED OrderMgr.undoCancelOrder(Order) OPEN/NEW Order was cancelled by mistake and this needs to be undone.
FAILED OrderMgr.undoFailOrder(Order) CREATED Order was failed by mistake and this needs to be undone.

Every status change will trigger a change in the order journal which is the base for GMV calculations.

See Also:


taxRoundedAtGroup: Boolean (read-only)

Use this method to check if the Order was created with grouped taxation calculation.

If the tax is rounded on group level, the tax is applied to the summed-up tax basis for each tax rate.


createAppeasement(): Appeasement

Creates a new Appeasement associated with this order.

The new Appeasement will have an appeasementNumber based on the getOrderNo().

Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.

Returns:

  • the created appeasement

createAppeasement(appeasementNumber: String): Appeasement

Creates a new Appeasement associated with this order.

An appeasementNumber must be specified.

If an Appeasement already exists for the appeasementNumber, the method fails with an exception.

Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.

Parameters:

  • appeasementNumber - the appeasementNumber to be assigned to the newly created appeasement

Returns:

  • the created appeasement

Throws:

  • IllegalArgumentException - if an Appeasement already exists with the number.

createReturnCase(isRMA: Boolean): ReturnCase

Creates a new ReturnCase associated with this order specifying whether the ReturnCase is an RMA (return merchandise authorization).

The new ReturnCase will have a returnCaseNumber based on the getOrderNo(), e.g. for an order-no 1234 the return cases will have the numbers 1234#RC1, 1234#RC2, 1234#RC3...

Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.

Parameters:

  • isRMA - whether the new ReturnCase is an RMA (return merchandise authorization)

Returns:

  • the created ReturnCase

createReturnCase(returnCaseNumber: String, isRMA: Boolean): ReturnCase

Creates a new ReturnCase associated with this order specifying whether the ReturnCase is an RMA (return merchandise authorization).

A returnCaseNumber must be specified.

If a ReturnCase already exists for the returnCaseNumber, the method fails with an exception.

Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.

Parameters:

  • returnCaseNumber - returnCaseNumber to use
  • isRMA - whether the new ReturnCase is an RMA (return merchandise authorization)

Returns:

  • null or the ReturnCase associated with the given returnCaseNumber

Throws:

  • IllegalArgumentException - if a ReturnCase already exists with the number.

createServiceItem(ID: String, status: String): OrderItem

Returns the order item with the given status which wraps a new service item which is created and added to the order.

Parameters:

  • ID - the ID of the new service item. This ID will be returned when ShippingLineItem.getID() is called.
  • status - the status of the order item, use one of <li>OrderItem.STATUS_NEW</li> <li>OrderItem.STATUS_OPEN</li> <li>OrderItem.STATUS_SHIPPED</li> </ul> Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.

Returns:

  • the created order item

createShippingOrder(): ShippingOrder

Creates a new ShippingOrder for this order.

Generates a default shipping order number. Use createShippingOrder(String) for a defined shipping order number.

Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.

Returns:

  • the created shipping order

See Also:


createShippingOrder(shippingOrderNumber: String): ShippingOrder

Creates a new ShippingOrder for this order.

Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.

Parameters:

  • shippingOrderNumber - the document number to be used

Returns:

  • the created shipping order

See Also:


getAffiliatePartnerID(): String

Returns the affiliate partner ID value, or null.

Returns:

  • the affiliate partner ID value, or null.

getAffiliatePartnerName(): String

Returns the affiliate partner name value, or null.

Returns:

  • the affiliate partner name value, or null.

getAppeasement(appeasementNumber: String): Appeasement

Returns the Appeasement associated with this order with the given appeasementNumber. The method returns null if no instance can be found.

Parameters:

  • appeasementNumber - the appeasement number

Returns:

  • the Appeasement associated with the given appeasementNumber

getAppeasementItem(appeasementItemID: String): AppeasementItem

Returns the AppeasementItem associated with this Order with the given appeasementItemID. The method returns null if no instance can be found.

Parameters:

  • appeasementItemID - the ID

Returns:

  • the AppeasementItem associated with the given appeasementItemID.

getAppeasementItems(): FilteringCollection

Returns the collection of AppeasementItems associated with this order.

Returns:

  • the appeasement items belonging to this order

getAppeasements(): FilteringCollection

Returns the collection of Appeasements associated with this order.

Returns:

  • the appeasements associated with this order

getCancelCode(): EnumValue

If this order was cancelled, returns the value of the cancel code or null.

Returns:

  • the value of the cancel code.

getCancelDescription(): String

If this order was cancelled, returns the text describing why the order was cancelled or null.

Returns:

  • the description as to why the order was cancelled or null.

getCapturedAmount(): Money

Returns the sum of the captured amounts. The captured amounts are calculated on the fly. Associate a payment capture for an PaymentInstrument with an Invoice using Invoice.addCaptureTransaction(OrderPaymentInstrument, Money).

Returns:

  • sum of captured amounts

getConfirmationStatus(): EnumValue

Returns the confirmation status of the order.

Possible values are CONFIRMATION_STATUS_NOTCONFIRMED and CONFIRMATION_STATUS_CONFIRMED.

Returns:

  • Order confirmation status

getCreatedBy(): String

Returns the name of the user who has created the order. If an agent user has created the order, the agent user's name is returned. Otherwise "Customer" is returned.

Returns:

  • the name of the user who created the order.

getCurrentOrder(): Order

Returns the current order. The current order represents the most recent order in a chain of orders. For example, if Order1 was replaced by Order2, Order2 is the current representation of the order and Order1 is the original representation of the order. If you replace Order2 with Order3, Order 3 is now the current order and Order1 is still the original representation of the order. If this order has not been replaced, this method returns this order because this order is the current order.

Returns:

  • the current order.

See Also:


getCurrentOrderNo(): String

Returns the order number of the current order. The current order represents the most recent order in a chain of orders. For example, if Order1 was replaced by Order2, Order2 is the current representation of the order and Order1 is the original representation of the order. If you replace Order2 with Order3, Order 3 is now the current order and Order1 is still the original representation of the order. If this order has not been replaced, calling this method returns the same value as the getOrderNo() method because this order is the current order.

Returns:

  • the order number of the current order

See Also:


getCustomerLocaleID(): String

Returns the ID of the locale that was in effect when the order was placed. This is the customer's locale.

Returns:

  • the ID of the locale associated with this order, or null.

getCustomerOrderReference(): String

Returns the customer-specific reference information for the order, or null.

Returns:

  • the customer-specific reference information for the order, or null.

getExportAfter(): Date

Returns a date after which an order can be exported.

Returns:

  • a date after which an order can be exported.

getExportStatus(): EnumValue

Returns the export status of the order.

Possible values are: EXPORT_STATUS_NOTEXPORTED, EXPORT_STATUS_EXPORTED, EXPORT_STATUS_READY, and EXPORT_STATUS_FAILED.

Returns:

  • Order export status

getExternalOrderNo(): String

Returns the value of an external order number associated with this order, or null.

Returns:

  • the value of an external order number associated with this order, or null.

getExternalOrderStatus(): String

Returns the status of an external order associated with this order, or null.

Returns:

  • the status of an external order associated with this order, or null.

getExternalOrderText(): String

Returns the text describing the external order, or null.

Returns:

  • the text describing the external order, or null.

getGlobalPartyID(): String

The Global Party ID reconciles customer identity across multiple systems. For example, as part of the Service for Commerce experience, service agents can find information for customers who have never called into the call center, but have created a profile on the website. Service agents can find guest order data from B2C Commerce and easily create accounts for customers. Customer 360 Data Manager matches records from multiple data sources to determine all the records associated with a specific customer.

Returns:

  • the Global Party ID associated with this order, or null.

getInvoice(invoiceNumber: String): Invoice

Returns the Invoice associated with this order with the given invoiceNumber. The method returns null if no instance can be found.

Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.

Parameters:

  • invoiceNumber - the invoice number

Returns:

  • the invoice associated with the given invoiceNumber

getInvoiceItem(invoiceItemID: String): InvoiceItem

Returns the InvoiceItem associated with this order with the given ID. The method returns null if no instance can be found.

Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.

Parameters:

  • invoiceItemID - the item ID

Returns:

  • the invoice item associated with the given ID

getInvoiceItems(): FilteringCollection

Returns the collection of InvoiceItems associated with this order.

Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.

Returns:

  • invoice items belonging to this order

getInvoiceNo(): String

Returns the invoice number for this Order.

When an order is placed (e.g. with OrderMgr.placeOrder(Order)) invoice number will be filled using a sequence. Before order was placed null will be returned unless it was set with setInvoiceNo(String).

Returns:

  • the invoice number for this Order.

getInvoices(): FilteringCollection

Returns the collection of Invoices associated with this order.

Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.

Returns:

  • invoices belonging to this order

getOrderExportXML(): String

Returns the order export XML as String object.

NOTE: This method will return payment instrument data masked. If payment instrument re-encryption is needed please use getOrderExportXML(String, String) instead.

Example:

Returns:

  • the order export XML

Throws:

  • IllegalStateException - If the method is called in a transaction with changes.
  • IllegalStateException - If the order is not placed. This method can be called for placed orders only.
  • IllegalStateException - If the order export XML could not be generated.

getOrderExportXML(encryptionAlgorithm: String, encryptionKey: String): String

Returns the order export XML as String object, with payment instrument data re-encrypted using the given encryption algorithm and key.

NOTE: If no encryption is needed or desired please always use getOrderExportXML() instead, which returns the payment instrument data masked. Do not pass in any null arguments!

Example:

Parameters:

  • encryptionAlgorithm - The encryption algorithm to be used for the re-encryption of the payment instrument data (credit card number, bank account number, bank account driver's license number). Must be a valid, non-null algorithm. Currently, only ENCRYPTION_ALGORITHM_RSA_ECB_PKCS1PADDING is supported, but this will be fixed and support for ENCRYPTION_ALGORITHM_RSA_ECB_OAEPWITHSHA_256ANDMGF1PADDING will be added soon.
  • encryptionKey - The Base64 encoded form of the public key to be used for the re-encryption of the payment instrument data. Must be a valid, non-blank key.

Returns:

  • the order export XML

Throws:

  • IllegalStateException - If the method is called in a transaction with changes.
  • IllegalStateException - If the order is not placed. This method can be called for placed orders only.
  • IllegalStateException - If the order export XML could not be generated.

API Version:

No longer available as of version 22.7. undefined behaviour for invalid arguments (e.g. null)


getOrderExportXML(encryptionAlgorithm: String, encryptionKey: String, encryptUsingEKID: Boolean): String

Returns the order export XML as String object, with payment instrument data re-encrypted using the given encryption algorithm and key.

NOTE: If no encryption is needed or desired please always use getOrderExportXML() instead, which returns the payment instrument data masked. Do not pass in any null arguments!

Example:

Parameters:

  • encryptionAlgorithm - The encryption algorithm to be used for the re-encryption of the payment instrument data (credit card number, bank account number, bank account driver's license number). Must be a valid, non-null algorithm. Currently, only ENCRYPTION_ALGORITHM_RSA_ECB_PKCS1PADDING is supported, but this will be fixed and support for ENCRYPTION_ALGORITHM_RSA_ECB_OAEPWITHSHA_256ANDMGF1PADDING will be added soon.
  • encryptionKey - The Base64 encoded form of the public key to be used for the re-encryption of the payment instrument data. Must be a valid, non-blank key.
  • encryptUsingEKID - ignored

Returns:

  • the order export XML

Throws:

  • IllegalStateException - If the method is called in a transaction with changes.
  • IllegalStateException - If the order is not placed. This method can be called for placed orders only.
  • IllegalStateException - If the order export XML could not be generated.

Deprecated:

This method will be removed soon. Please use the following methods instead:

No longer available as of version 22.7. undefined behaviour for invalid arguments (e.g. null)


getOrderExportXML(encryptionAlgorithm: String, encryptionKey: String): String

Returns the order export XML as String object, with payment instrument data re-encrypted using the given encryption algorithm and key.

NOTE: If no encryption is needed or desired please always use getOrderExportXML() instead, which returns the payment instrument data masked.

Example:

Parameters:

  • encryptionAlgorithm - The encryption algorithm used for the re-encryption of the payment instrument data (credit card number, bank account number, bank account driver's license number). Must be one of the following: <li>ENCRYPTION_ALGORITHM_RSA_ECB_OAEPWITHSHA_256ANDMGF1PADDING – The current and preferred algorithm. <li>ENCRYPTION_ALGORITHM_RSA_ECB_PKCS1PADDING – This algorithm is outdated/deprecated and will be removed in a future release. Please do not use anymore. </ul>
  • encryptionKey - The Base64 encoded form of the public key used for the re-encryption of the payment instrument data. Must be a valid, non-blank key.

Returns:

  • the order export XML

Throws:

  • IllegalArgumentException - If encryptionAlgorithm is not a valid known algorithm.
  • IllegalArgumentException - If encryptionKey is a blank string.
  • IllegalStateException - If the method is called in a transaction with changes.
  • IllegalStateException - If the order is not placed. This method can be called for placed orders only.
  • IllegalStateException - If the order export XML could not be generated.

API Version:

Available from version 22.7. strict encryption argument checks; no null or otherwise invalid values allowed


getOrderItem(itemID: String): OrderItem

Returns the OrderItem for the itemID. An OrderItem will only exist for ProductLineItems or ShippingLineItems which belong to the order. The method fails with an exception if no instance can be found.

Parameters:

  • itemID - the itemID

Returns:

  • the order item for itemID

Throws:

  • IllegalArgumentException - if no instance is found

See Also:


getOrderNo(): String

Returns the order number for this order.

Returns:

  • the order number for this order.

getOrderToken(): String

Returns the token for this order. The order token is a string (length 32 bytes) associated with this one order. The order token is random. It reduces the capability of malicious users to access an order through guessing. Order token can be used to further validate order ownership, but should never be used to solely validate ownership. In addition, the storefront should ensure authentication and authorization. See the Security Best Practices for Developers for details.

Returns:

  • the token for this order.

getOriginalOrder(): Order

Returns the original order associated with this order. The original order represents an order that was the first ancestor in a chain of orders. For example, if Order1 was replaced by Order2, Order2 is the current representation of the order and Order1 is the original representation of the order. If you replace Order2 with Order3, Order1 is still the original representation of the order. If this order is the first ancestor, this method returns this order.

Returns:

  • the order number of the original order associated with this order.

See Also:


getOriginalOrderNo(): String

Returns the order number of the original order associated with this order. The original order represents an order that was the first ancestor in a chain of orders. For example, if Order1 was replaced by Order2, Order2 is the current representation of the order and Order1 is the original representation of the order. If you replace Order2 with Order3, Order1 is still the original representation of the order. If this order is the first ancestor, this method returns the value of getOrderNo().

Returns:

  • the order number of the original order associated with this order.

See Also:


getPaymentStatus(): EnumValue

Returns the order payment status value.

Possible values are PAYMENT_STATUS_NOTPAID, PAYMENT_STATUS_PARTPAID or PAYMENT_STATUS_PAID.

Returns:

  • Order payment status

getPaymentTransaction(): PaymentTransaction

Returns the payment transaction associated with this order. It is possible that there are multiple payment transactions associated with the order. In this case, this method returns the transaction associated with the first PaymentInstrument returned by getPaymentInstruments().

Returns:

  • the payment transaction or null if there is no transaction.

Deprecated:

Use LineItemCtnr.getPaymentInstruments() to get the list of PaymentInstrument instances and then use getPaymentTransaction() method on each PaymentInstrument to access the individual transactions.


getRefundedAmount(): Money

Returns the sum of the refunded amounts. The refunded amounts are calculated on the fly. Associate a payment refund for an PaymentInstrument with an Invoice using Invoice.addRefundTransaction(OrderPaymentInstrument, Money).

Returns:

  • sum of refunded amounts

getRemoteHost(): String

Returns the IP address of the remote host from which the order was created.

If the IP address was not captured for the order because order IP logging was disabled at the time the order was created, null will be returned.

Returns:

  • The IP address of the remote host captured for the order or null

getReplaceCode(): EnumValue

If this order was replaced by another order, returns the value of the replace code. Otherwise. returns null.

Returns:

  • the replace code

getReplaceDescription(): String

If this order was replaced by another order, returns the value of the replace description. Otherwise returns null.

Returns:

  • the value of the replace code or null.

getReplacedOrder(): Order

Returns the order that this order replaced or null. For example, if you have three orders where Order1 was replaced by Order2 and Order2 was replaced by Order3, calling this method on Order3 will return Order2. Similarly, calling this method on Order1 will return null as Order1 was the original order.

Returns:

  • the order that replaced this order, or null.

See Also:


getReplacedOrderNo(): String

Returns the order number that this order replaced or null if this order did not replace an order. For example, if you have three orders where Order1 was replaced by Order2 and Order2 was replaced by Order3, calling this method on Order3 will return the order number for Order2. Similarly, calling this method on Order1 will return null as Order1 was the original order.

Returns:

  • the order number of the order that this order replaced or null.

See Also:


getReplacementOrder(): Order

Returns the order that replaced this order, or null.

Returns:

  • the order that replaced this order, or null.

See Also:


getReplacementOrderNo(): String

If this order was replaced by another order, returns the order number that replaced this order. Otherwise returns null.

Returns:

  • the order that replaced this order, or null.

See Also:


getReturn(returnNumber: String): Return

Returns the Return associated with this order with the given returnNumber. The method returns null if no instance can be found.

Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.

Parameters:

  • returnNumber - the return number

Returns:

  • the return associated with the given returnNumber

getReturnCase(returnCaseNumber: String): ReturnCase

Returns the ReturnCase associated with this order with the given returnCaseNumber. The method returns null if no instance can be found.

Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.

Parameters:

  • returnCaseNumber - the return case number

Returns:

  • the return case associated with the given returnCaseNumber

getReturnCaseItem(returnCaseItemID: String): ReturnCaseItem

Returns the ReturnCaseItem associated with this order with the given returnCaseItemID. The method returns null if no instance can be found.

Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.

Parameters:

  • returnCaseItemID - the ID

Returns:

  • the return case item associated with the given returnCaseItemID

getReturnCaseItems(): FilteringCollection

Returns the collection of ReturnCaseItems associated with this order.

Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.

Returns:

  • return case items belonging to this order

getReturnCases(): FilteringCollection

Returns the collection of ReturnCases associated with this order.

Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.

Returns:

  • return cases belonging to this order

getReturnItem(returnItemID: String): ReturnItem

Returns the ReturnItem associated with this order with the given ID. The method returns null if no instance can be found.

Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.

Parameters:

  • returnItemID - the ID

Returns:

  • the return item associated with the given returnItemID

getReturnItems(): FilteringCollection

Returns the collection of ReturnItems associated with this order.

Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.

Returns:

  • return items belonging to this order

getReturns(): FilteringCollection

Returns the collection of Returns associated with this order.

Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.

Returns:

  • returns belonging to this order

getShippingOrder(shippingOrderNumber: String): ShippingOrder

Returns the ShippingOrder associated with this order with the given shippingOrderNumber. The method returns null if no instance can be found.

Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.

Parameters:

  • shippingOrderNumber - the shipping order number

Returns:

  • the shipping order associated with the given shippingOrderNumber

getShippingOrderItem(shippingOrderItemID: String): ShippingOrderItem

Returns the ShippingOrderItem associated with this order with the given shippingOrderItemID. The method returns null if no instance can be found.

Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.

Parameters:

  • shippingOrderItemID - the ID

Returns:

  • the shipping order item associated with the given shippingOrderItemID

getShippingOrderItems(): FilteringCollection

Returns the collection of ShippingOrderItems associated with this order.

Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.

Returns:

  • shipping order items belonging to this order

getShippingOrders(): FilteringCollection

Returns the collection of ShippingOrders associated with this order.

Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.

Returns:

  • shipping orders belonging to this order

getShippingStatus(): EnumValue

Returns the order shipping status.

Possible values are SHIPPING_STATUS_NOTSHIPPED, SHIPPING_STATUS_PARTSHIPPED or SHIPPING_STATUS_SHIPPED.

Returns:

  • Order shipping status

getSourceCode(): String

Returns the source code stored with the order or null if no source code is attached to the order.

Returns:

  • the source code stored with the order or null if no source code is attached to the order.

getSourceCodeGroup(): SourceCodeGroup

Returns the source code group attached to the order or null if no source code group is attached to the order.

Returns:

  • the source code group attached to the order or null if no source code group is attached to the order.

getSourceCodeGroupID(): String

Returns the source code group id stored with the order or null if no source code group is attached to the order.

Returns:

  • the source code group id stored with the order or null if no source code group is attached to the order.

getStatus(): EnumValue

Returns the status of the order.

Possible values are:

The order status usually changes when a process action is initiated. Most status changes have an action which needs to executed in order to end having the order in a specific order status. When an order is created with e.g. OrderMgr.createOrder(Basket) the order status will be ORDER_STATUS_CREATED. The usual flow is that payment authorization will be added to the order. Once the order is considered as valid (payed, fraud checked, ...) the order gets placed. This can be done by calling OrderMgr.placeOrder(Order). The result of placing an order will be status ORDER_STATUS_OPEN (from a process standpoint ORDER_STATUS_NEW which has the same meaning). Status ORDER_STATUS_REPLACED is related to functionality BasketMgr.createBasketFromOrder(Order). ORDER_STATUS_COMPLETED has no meaning by default but can be used by custom implementations but is a synonym for NEW/OPEN. Below you will find the most important status changes:

Status before Action Status after Business meaning
- OrderMgr.createOrder(Basket) CREATED Order was created from a basket.
CREATED OrderMgr.placeOrder(Order) OPEN/NEW Order was considered as valid. Order can now be exported to 3rd party systems.
CREATED OrderMgr.failOrder(Order) FAILED Order was considered not valid. E.g. payment authorization was wrong or fraud check was not successful.
OPEN/NEW OrderMgr.cancelOrder(Order) CANCELLED Order was cancelled.
CANCELLED OrderMgr.undoCancelOrder(Order) OPEN/NEW Order was cancelled by mistake and this needs to be undone.
FAILED OrderMgr.undoFailOrder(Order) CREATED Order was failed by mistake and this needs to be undone.

Every status change will trigger a change in the order journal which is the base for GMV calculations.

Returns:

  • Status of the order.

See Also:


isImported(): Boolean

Returns true, if the order is imported and false otherwise.

Returns:

  • true, if the order was imported, false otherwise.

isTaxRoundedAtGroup(): Boolean

Use this method to check if the Order was created with grouped taxation calculation.

If the tax is rounded on group level, the tax is applied to the summed-up tax basis for each tax rate.

Returns:

  • true if the Order was created with grouped taxation

reauthorize(): Status

Ensures that the order is authorized.

Checks if the order is authorized by calling the hook PaymentHooks.validateAuthorization(Order). If the authorization is not valid it reauthorizes the order by calling the PaymentHooks.reauthorize(Order).

Returns:

  • the status of the operation, will be Status.OK if the order is authorized after this call

removeRemoteHost(): void

Removes the IP address of the remote host if stored.

If IP logging was enabled during order creation the IP address of the customer will be stored and can be retrieved using getRemoteHost().

See Also:


setAffiliatePartnerID(affiliatePartnerID: String): void

Sets the affiliate partner ID value.

Parameters:

  • affiliatePartnerID - the affiliate partner ID value.

setAffiliatePartnerName(affiliatePartnerName: String): void

Sets the affiliate partner name value.

Parameters:

  • affiliatePartnerName - the affiliate partner name value.

setCancelCode(cancelCode: String): void

Sets the cancel code value.

Parameters:

  • cancelCode - the cancel code value.

setCancelDescription(cancelDescription: String): void

Sets the description as to why the order was cancelled.

Parameters:

  • cancelDescription - the description for why the order was cancelled.

setConfirmationStatus(status: Number): void

Sets the confirmation status value.

Possible values are CONFIRMATION_STATUS_NOTCONFIRMED or CONFIRMATION_STATUS_CONFIRMED.

Parameters:

  • status - Order confirmation status

setCustomer(customer: Customer): void

This method is used to associate the order object with the specified customer object.

If the customer object represents a registered customer, the order will be assigned to this registered customer and the order's customer number (LineItemCtnr.getCustomerNo()) will be updated.

If the customer object represents an unregistered (anonymous) customer, the order will become an anonymous order and the order's customer number will be set to null.

Parameters:

  • customer - The customer to be associated with the order.

Throws:

  • NullArgumentException - If specified customer is null.

setCustomerNo(customerNo: String): void

Sets the customer number associated with this order.

Note it is recommended to use (setCustomer(Customer)) instead of this method. This method only sets the customer number and should be used with care as it does _not re-link the order with a customer profile</> object which can lead to an inconsistency! Ensure that the customer number used is not already taken by a different customer profile.

Parameters:

  • customerNo - the customer number associated with this order.

setCustomerOrderReference(reference: String): void

Sets the customer-specific reference information for the order.

Parameters:

  • reference - the customer-specific reference information for the order.

setExportAfter(date: Date): void

Sets the date after which an order can be exported.

Parameters:

  • date - the date after which an order can be exported.

setExportStatus(status: Number): void

Sets the export status of the order.

Possible values are: EXPORT_STATUS_NOTEXPORTED, EXPORT_STATUS_EXPORTED, EXPORT_STATUS_READY, and EXPORT_STATUS_FAILED.

Setting the status to EXPORT_STATUS_EXPORTED will also trigger the finalization of on order inventory transactions for this order meaning that all inventory transactions with type on order will be moved into final inventory transactions. This is only relevant when On Order Inventory is turned on for the inventory list ordered products are in.

In case of an exception the current transaction is marked as rollback only.

Parameters:

  • status - Order export status

setExternalOrderNo(externalOrderNo: String): void

Sets the value of an external order number associated with this order

Parameters:

  • externalOrderNo - the value of an external order number associated with this order.

setExternalOrderStatus(status: String): void

Sets the status of an external order associated with this order

Parameters:

  • status - the status of the external order.

setExternalOrderText(text: String): void

Sets the text describing the external order.

Parameters:

  • text - the text describing the external order.

setInvoiceNo(invoiceNumber: String): void

Sets the invoice number for this Order.

Notice that this value might be overwritten during order placement (e.g. with OrderMgr.placeOrder(Order)).

Parameters:

  • invoiceNumber - the invoice number for this Order.

See Also:


setOrderStatus(status: Number): void

Sets the order status.

Use this method when using Order Post Processing such as the creation of shipping orders. The only supported values are ORDER_STATUS_OPEN, ORDER_STATUS_CANCELLED. Setting the status will adjust the order item status when applicable (item status not SHIPPED or CANCELLED). Note that the order status and the status of the items are directly related and dependent on one another.

See OrderItem.setStatus(String) for more information about possible status transitions.

Warning: This method will not undo coupon redemptions upon cancellation of an order. Re-opening such an order later with OrderMgr.undoCancelOrder(Order) or OrderItem.setStatus(String) with ORDER_STATUS_OPEN will result in an additional application of the same coupon code which in turn might fail.

Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.

Parameters:

Throws:

  • IllegalArgumentException - on attempt to set an unsupported status value

Deprecated:

use setStatus(Number) instead


setPaymentStatus(status: Number): void

Sets the order payment status.

Possible values are PAYMENT_STATUS_NOTPAID, PAYMENT_STATUS_PARTPAID or PAYMENT_STATUS_PAID.

Parameters:

  • status - Order payment status

setReplaceCode(replaceCode: String): void

Sets the value of the replace code.

Parameters:

  • replaceCode - the value of the replace code.

setReplaceDescription(replaceDescription: String): void

Sets the value of the replace description.

Parameters:

  • replaceDescription - the value of the replace description.

setShippingStatus(status: Number): void

Sets the order shipping status value.

Possible values are SHIPPING_STATUS_NOTSHIPPED, SHIPPING_STATUS_PARTSHIPPED or SHIPPING_STATUS_SHIPPED.

Parameters:

  • status - Order shipping status

setStatus(status: Number): void

Sets the status of the order.

Possible values are:

This method does not support order statuses ORDER_STATUS_CREATED or ORDER_STATUS_FAILED. Please use OrderMgr.placeOrder(Order) or OrderMgr.failOrder(Order).

Setting the order status to ORDER_STATUS_CANCELLED will have the same effect as calling OrderMgr.cancelOrder(Order). Setting a canceled order to ORDER_STATUS_NEW, ORDER_STATUS_OPEN or ORDER_STATUS_COMPLETED will have the same effect as calling OrderMgr.undoCancelOrder(Order). It is recommended to use the methods in OrderMgr directly to be able to do error processing with the return code.

Parameters:

  • status - Order status

Throws:

  • IllegalArgumentException - on attempt to set status CREATED or FAILED, or status transition while cancel order or undo cancel order returns with an error code.

trackOrderChange(text: String): Note

Tracks an order change.

This adds a history entry to the order. Focus of history entries are changes through business logic, both custom and internal logic. Tracked order changes are read-only and can be accessed in the Business Manager order history. The following attributes of the created history entry are initialized:

This feature is intended to track important changes in custom order flow which should become visible in Business Manager's history tab. It is NOT intended as auditing feature for every change to an order. A warning will be produced after 600 notes are added to an order. The warning can be reviewed in Business Manager's Quota Status screen. Attempting to add a note to an order which already has 1000 notes results in an exception. Please bear in mind that internal changes, such as order status changes, also track changes. Avoid using this feature in recurring jobs which may re-process orders multiple times as the limit needs to be considered each time a change is tracked. The same limit on the number of notes added also applies when using method LineItemCtnr.addNote(String, String) to add notes.

Parameters:

  • text - the text of the history entry

Returns:

  • the created history entry