Transaction: OrderInOnlineShop
The OrderInOnlineShop transaction uses the same messages and states as the Order transaction described in the previous section. In its Veloconnect profile, a Veloconnect-compliant server supporting this transaction uses the property OrderInOnlineShop.TransactionID to declare a fixed TransactionID which distinguishes this special transaction from those of type Order.
The purpose of this transaction is to give the buyer the opportunity to compare a shopping cart in an existing online shop system with an order in their merchandise management system. In particular, the following scenarios should be possible:
The buyer fills the shopping cart at the online shop because it offers, for example, an excellent search option matched very precisely with the offered assortment. Before the shopping cart is actually ordered, the data are to be used by the own merchandise management system to generate an order.
The buyer has generated an order in their merchandise management system, and would like to add some articles whose order numbers are not yet known. To determine the order numbers, the search options available at the seller's online shop are to be used.
To set the conditions for this on the server side, a Veloconnect-compliant server which implements the OrderInOnlineShop transaction must observe the following rules:
Rule: OrderInOnlineShop (server)
There is always one transaction instance with the fixed TransactionID.
Before a request is processed according to the rules for the transaction order, the transaction context is compared with the buyer's shopping cart at the online store. This comparison should be implemented in such a way that the shopping cart is not changed, and completion of the order in the shop system would trigger the same order signal as completion of the order via the Veloconnect interface. Depending on whether or not the shopping cart is empty, the transaction instance is then in the initial or updated state.
After the transaction context has been modified as a result of processing the client's request, the shop system's shopping cart must be compared with the transaction context. This comparison should be implemented in such a way that the transaction context remains unchanged, and completion of the order in the shop system would trigger the same order signal as completion of the order via the Veloconnect interface. If the request is a FinishOrderRequest, this comparison means, in particular, that the shopping cart must be deleted (because the order has already been issued).
The decision as to which of the transactions - Order or OrderInOnlineShop - a server implements is left to the seller. Depending on conditions, it can, by all means, be easier to combine the Veloconnect interface with an existing online shop. This means that the party implementing the Veloconnect-client must be able to deal with the special features of the OrderInOnlineShop transaction. The following individual points must be noted:
A TransactionID - specifically the one mentioned in the Veloconnect profile - must also be used in the CreateOrder operation. If the server does not support Order transactions, a CreateOrderRequest without a TransactionID leads to error code 404.
If the online shopping cart is not empty for some reason, the CreateOrder operation fails with error code 430. Similarly, the UpdateOrder operation fails with error code 430 if the shopping cart is empty. Accordingly, the GetStatus or ViewOrder operation should be used to determine the shopping cart's state.
The Rollback operation also empties the online shopping cart.
If the user is offered integration of the merchandise management system with the online shopping cart as described in the scenarios above, the following must be noted: Implementation of the shopping cart in the user's internet browser generally does not allow the shopping cart to be modified from other locations. The user should therefore not be logged into the online store simultaneously while comparing the shopping cart with the order in the merchandise management system.