Technical documentation - Order Manager

This article describes the order manager in version 5.0.

Overview

Order cart has four process steps that may be turned on or off. The steps are:

  • ShoppingCart - the list of parts in the order

  • AdditionalInformation - shipping and billing address and additional information

  • ReviewOrder - sum up before placing it

  • OrderConfirmation - confirmation page after successful order

Each step may be turned on or off.

Configuration

<OrderManager> <!-- enable-external-part-number will allow user to add part numbers not in the database --> <!-- In version 5.1 order preview may show two buttons instead of one, default is false --> <OrderManager enable-external-part-number="true" allow-order-line-errors="false" add-availability-on-orderline="true" next-step-button-enabled-at-order-preview="true" > <!-- External part numbers will be accepted if they meet this regex --> <ExternalPartNumberValidationPattern>^\d+$</ExternalPartNumberValidationPattern> <!-- Generate an order number which will be passed in PlaceOrder call. From version 5.1.5 and later. --> <AutoOrderNumberSetting auto-order-number-enabled="true" prefix="SIGOrder" divider="-" sequnce-number-length="5" start-sequnce-number="1"/> <!-- Delivery options loaded from API will be cached for X minutes --> <DeliveryOptionsCache cache-time="20" site="true" type="true" /> <!-- Order type loaded from API will be cached for X minutes --> <OrderTypesCache cache-time="20" site="true" user="true"/> <!-- Regex for formatting part numbers in order view quick order area --> <AddToOrdertPartNumberFormatter pattern="((?'a'\d{3,4})[ ]{0,1}(?'b'\d{0,4})[ ]{0,1}(?'c'\d{0,4})[ ]{0,1}(?'d'\d{0,1}))" format="${a}${b}${c}${d}"/> <!-- Version 5.1. Messages on PlaceOrder messages, process, return messages and redirects, will be shown as a popup. Default is false. --> <OrderProcessMessagePopupEnabled>true</OrderProcessMessagePopupEnabled> <!-- Settings for the order cart --> <OrderCartSettings display-stock="true" display-total-price="false" display-total-price-information="false" display-order-sub-total-price="false" display-order-total-price="false"> <!-- In verstion 5.1 and later it is possible to add configurations on order lines. --> <!-- Line tag can be used to add classes to items on the order line as Name, Description etc --> <Line> <Name tag="h4"/> </Line> <!-- Menu tag is used to control menu items on the line, eg to hide the copy line icon --> <Menu template="order-cart" id="order-cart"> <Item id="copy" ignore = "true" /> </Menu> <!-- Column id can have values image, GrossTotalPrice, --> <Column id="GrossTotalPrice" class="total-price" display="none"/> </OrderCartSettings> <!-- Configuration of which process steps shall be shown --> <OrderCartMenus> <!-- <MenuNames>ShoppingCart, AdditionalInformation, ReviewOrder, OrderConfirmation</MenuNames> --> <MenuNames>ShoppingCart, ReviewOrder</MenuNames> </OrderCartMenus> <!-- Allows to purchase items also when no stock exist. Also has an impact on how replacements are presented depending on stock level. From version 5.1 setting is located in OrderManager. --> <!-- Note that this is a global setting and normally it is better to use the response from providers to control if parts are purchaseable or not. Use with care. --> <NeedsStockToOrder>false</NeedsStockToOrder> <!-- Allows to purchase items also when no price exist. From version 5.1 setting is located in OrderManager. --> <!-- Note that this is a global setting and normally it is better to use the response from providers to control if parts are purchaseable or not. Use with care. --> <NeedsPriceToOrder>false</NeedsPriceToOrder> <!-- Show a message on parts which have sellable=false, default is true from version 5.0.7. --> <ShowNotSellableMessage>true</ShowNotSellableMessage> <!-- From version 5.2 format of this tag is changed to the below. --> <ShowNotSellableMessage enable="false" message-level="Error"/> <!-- In version 5.1 it is possible to add a carousel for related documents on order page --> <DocumentDownloadCarousel class="round" outofbounds-slides-visible="true" all-slides-visible="true" indicators-layout="below"/> <!-- In version 5.1 and 5.0.6 a message will display on parts which are not sellable (sellable=false). The message is default enabled, but can be disabled --> <!-- It is also possible to configure the message level as information, warning or error. It will only effect the styling. --> <ShowNotSellableMessage enable="true" message-level="Error"/> <!-- In version 5.1 and 5.0.9 it is possible to omitt header in csv download of order lines. By default header is included. --> <OrderCartDownloadAsCsvIncludeHeader>false</OrderCartDownloadAsCsvIncludeHeader> <!-- Version 5.1.8 and later. A special tag that will trigger an error to be returned from PlaceOrder call. Intended for testing purposes only and not active by default. --> <!-- Currently this setting is available in RESTPlaceOrder and selected customer integrations. --> <PartNumberToRaiseException>123456</PartNumberToRaiseException> </OrderManager> </OrderManager>

 

Attributes

OrderManager has several attributes.

General attributes

Attribute

Options

Usage

Comment

Attribute

Options

Usage

Comment

add-availability-on-orderline

true / false

GetAvailability will be called to present availability on each order line

 

allow-order-line-errors

true / false

Allows order to be placed even though an order line contains an error.

Version 5.1

disable-order-types

true / false

Do not use the order type selector

 

disable-delivery-options

true/false

Displays delivery options selector in order cart under shipping and billing information tab

 

enable-external-part-number

true / false

Will allow user to add part numbers which does not exist in the database

 

needs-stock-to-order

true / false

Determines if a part can be offered when stock is 0. Also used when deciding which replacement to show.

Version 5.1 (earlier versions setting in root)

needs-price-to-order

true / false

If a part is missing price, can it be sold?

Version 5.1 (earlier versions setting in root)

next-step-button-enabled-at-order-preview

true / false

TBD

 

display-order-line-combined-message

true / false

TBD

 

authenticate-before-placeorder

true / false

When true, make an AuthenticationProvider.Authenticate call to ensure that current user is valid in external system before an order is placed. Default value is false.

Version 5.1

NLA and replacement codes

Attribute

Options

Usage

Comment

Attribute

Options

Usage

Comment

available-availability-code

String

Code to signal that a part is no longer available. Typically “NLA”.

 

not-available-out-of-stock-availability-code

String

Code to signal that a part is no longer available when out of stock. Typically “OOS”.

 

replace-now-replacement-code

String

Code to signal that a part is replaced. Typically “NOW”.

 

replace-not-available-replacement-code

String

Code to signal that a part is replaced when out of stock. Typically “OOS”.

 

 

Message options

In version 5.1 it is possible to configure the message at place order as a popup istead of a message bar.

 

<OrderProcessMessagePopupEnabled>true</OrderProcessMessagePopupEnabled>

Design can be altered using three variables in site.variables.less.

<!-- Header color --> @pop-header-background-color: #ef7b05; <!-- Header border at bottom --> @pop-header-bottom-color: #ef7b05; <!-- Popup corner radius --> @pop-up-border-radius:0px;

 

Generate order number

In version 5.1.5 and later it is possible to let WebViewer generate the order number. Use this setting to define if and how order numbers are generated.

Generated order numbers will be passed in PlaceOrder call, both REST calls and AssertDB calls. If the above configuration is not used and the AssertDBPlaceOrder provider is used, a default order number will be generated instead.

Specifications on order rows

It is possible to show highlighted specifications from the part on order row. This is controlled by a setting which is placed in root for version 4.4, 4.5, 5.0 and 5.1.