Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
typeflat

Die Transaktion OrderInOnlineShop verwendet die gleichen Nachrichten und die gleichen Zustände wie die im vorherigen Abschnitt beschriebene Transaktion Order. Ein veloconnect-konformer Server, der diese Transaktion unterstützt, gibt in seinem veloconnect-Profil mit der Eigenschaft OrderInOnlineShop.TransactionID eine feste TransactionID bekannt, die diese spezielle Transaktion von den Transaktionen vom Typ Order unterscheidet.

Sinn dieser Transaktion ist es, dem Käufer die Möglichkeit zu geben, einen Warenkorb in einem vorhandenen Online-Shop-System mit einer Bestellung in seinem Warenwirtschaftssystem abzugleichen. Insbesondere folgende Szenarien sollten möglich sein:

  • Der Käufer füllt den Warenkorb im Onlineshop, da dieser zum Beispiel eine exzellente Suchmöglichkeit bietet, die sehr genau auf das angebotenen Sortiment abgestimmt ist. Bevor der Warenkorb bestellt wird, soll aus den Daten eine Bestellung im eigenen Warenwirtschaftssystem generiert werden.

  • Der Käufer hat eine Bestellung in seinem Warenwirtschaftssystem generiert und möchte noch einige Artikel hinzufügen, für die die Bestellnummern noch nicht bekannt sind. Zur Ermittlung der Bestellnummern soll der Onlineshop des Verkäufers verwendet werden, um die dort vorhandenen Suchmöglichkeiten auszunützen.

Um hierfür auf Serverseite die Voraussetzungen zu schaffen, muss ein veloconnect-konformer Server, der die Transaktion OrderInOnlineShop implementiert, folgende Regeln einhalten:

Regel: OrderInOnlineShop (Server)

  1. Es existiert stets eine Transaktionsinstanz mit der fixierten TransactionID.

  2. Bevor ein Request gemäß den Regeln für die Transaktion Order abgearbeitet wird, wird der Transaktionskontext mit dem Warenkorb des Käufers im Onlineshop abgeglichen. Dieser Abgleich ist so zu implementieren, dass der Warenkorb nicht verändert wird und ein Abschluß der Bestellung im Shopsystem die gleiche Bestellung auslösen würde, wie ein Abschluß der Bestellung über die veloconnect-Schnittstelle. Abhängig davon, ob der Warenkorb leer ist oder nicht, befindet sich danach die Transaktionsinstanz im Startzustand oder im Updatezustand.

  3. Nachdem der Transaktionskontext gemäß der Verarbeitung der Anfrage des Clients modifiziert wurde, ist der Warenkorb des Shopsystems mit dem Transaktionskontext abzugleichen. Dieser Abgleich ist so zu implementieren, dass der Transaktionskontext nicht verändert wird und ein Abschluß der Bestellung im Shopsystem die gleiche Bestellung auslösen würde, wie ein Abschluß der Bestellung über die veloconnect-Schnittstelle. Ist der Request ein FinishOrderRequest, so bedeutet dieser Abgleich insbesondere, dass der Warenkorb zu löschen ist. (Die Bestellung ist ja bereits erfolgt)

Welche der Transaktionen Order oder OrderInOnlineShop ein Server implementiert, bleibt der Entscheidung des Verkäufers überlassen. Abhängig von den Voraussetzungen kann es durchaus einfacher sein, die veloconnect-Schnittstelle auf einem vorhandenen Online-Shop aufzusetzen. Für den Implementeur eines veloconnect-Clients bedeutet das, dass er mit den Besonderheiten der Transaktion OrderInOnlineShop zurecht kommen muss. Im einzelnen ist zu beachten:

...

Auch in der Operation CreateOrder muss eine TransactionID verwendet werden, und zwar die im veloconnect-profil angegebene. Falls der Server die Transaktion Order nicht unterstützt, führt ein CreateOrderRequest ohne TransactionID zum Fehlercode 404.

...

Falls aus irgendwelchen Gründen der Warenkorb des Online-Shops nicht leer ist, schlägt die Operation CreateOrder mit dem Fehlercode 430 fehl. Analog schlägt die Operation UpdateOrder bei leerem Warenkorb mit Fehlercode 430 fehl. Es sollte also mittels der Operation GetStatus oder ViewOrder der Zustand des Warenkorbs ermittelt werden.

...

Die Operation Rollback löscht auch den Warenkorb des Online-Shops

...

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)

  1. There is always one transaction instance with the fixed TransactionID.

  2. 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.

  3. 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.