Bestellung in Verbindung mit Online-Shop (Transaktion: OrderInOnlineShop)

Wir gehen von folgendem Szenario aus: Der Käufer hat im Online-Shop des Verkäufers bereits einen Artikel in den Warenkorb gelegt und hat in seinem eigenen Warenwirtschaftssystem eine Bestellung mit weiteren Artikeln angelegt. Diese beiden Bestellungen sollen synchronisiert und abgeschlossen werden. Der Client verwendet hierzu die Transaktion OrderInOnlineShop. Als erstes informiert er sich vermöge der Anfrage

1 https://shop.beispielserver.com/vc_order.jsp?BuyersID=127654&Password=secret&RequestName=ViewOrderRequest&TransactionId=online-basket

über den Inhalt des Warenkorbs. Die abweichende URL und die TransactionID hat er dem veloconnect-Profil des Servers entnommen.

Folgende Antwort wird zurückgeliefert.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 <?xml version="1.0" encoding="iso-8859-1" ?> <OrderResponse xmlns="urn:veloconnect:order-1.1" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-1.0" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-1.0" xmlns:vct="urn:veloconnect:transaction-1.0"> <vct:BuyersID>B127645</vct:BuyersID> <vct:ResponseCode>200</vct:ResponseCode> <vct:TransactionID>online-basket</vct:TransactionID> <vct:StatusCode>2</vct:StatusCode> <OrderResponseLine> <cbc:Quantity quantityUnitCode="PK">5</cbc:Quantity> <cac:Item> <cbc:Description>Speichen DD 2,0x1,8x 263 mm, silber Race,Niro, mit Messingnippel</cbc:Description> <cbc:PackQuantity quantityUnitCode="EA">100</cbc:PackQuantity> <cac:BuyersItemIdentification> <cac:ID>7285</cac:ID> </cac:BuyersItemIdentification> <cac:SellersItemIdentification> <cac:ID>42213526300</cac:ID> </cac:SellersItemIdentification> <cac:StandardItemIdentification> <cac:ID identificationSchemeID="EAN/UCC-13">4032191511108</cac:ID> </cac:StandardItemIdentification> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">34.90</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="PK">1</cbc:BaseQuantity> </cac:BasePrice> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">29.50</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="PK">1</cbc:BaseQuantity> <cbc:MinimumQuantity quantityUnitCode="PK">10</cbc:MinimumQuantity> </cac:BasePrice> <cac:RecommendedRetailPrice> <cbc:PriceAmount amountCurrencyID="EUR">0.70</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="EA">1</cbc:BaseQuantity> </cac:RecommendedRetailPrice> </cac:Item> <cac:UnitPrice amountCurrencyID="EUR">29.50</cac:UnitPrice> <Availability> <Code>available</Code> </Availability> </OrderResponseLine> </OrderResponse>

Durch Abgleich mit den eigenen Stammdaten oder durch Abfrage beim Benutzer ermittelt der Client die interne Artikelnummer und fügt den Inhalt des Warenkorbs in die Bestellung ein. Die noch nicht im Warenkorb befindlichen Positionen dieser Bestellung werden dem Server durch Übermittlung folgenden XML-Dokuments an die URL https://shop.beispielserver.com/vc_order.jsp mitgeteilt.

 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 <?xml version="1.0" encoding="iso-8859-1" ?> <UpdateOrderRequest xmlns="urn:veloconnect:order-1.1" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-1.0" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-1.0" xmlns:vct="urn:veloconnect:transaction-1.0"> <vct:BuyersID>B127645</vct:BuyersID> <vct:Credential><vct:Password>secret</vct:Password></vct:Credential> <vct:TransactionID>online-basket</vct:TransactionID> <OrderRequestLine> <cac:SellersItemIdentification> <cac:ID>42038057500</cac:ID> </cac:SellersItemIdentification> <cbc:Quantity quantityUnitCode="EA">20</cbc:Quantity> <cac:BuyersItemIdentification> <cac:ID>7290</cac:ID> </cac:BuyersItemIdentification> </OrderRequestLine> <OrderRequestLine> <cac:SellersItemIdentification> <cac:ID>52090311100</cac:ID> </cac:SellersItemIdentification> <cbc:Quantity quantityUnitCode="PK">4</cbc:Quantity> <cac:BuyersItemIdentification> <cac:ID>7295</cac:ID> </cac:BuyersItemIdentification> </OrderRequestLine> </UpdateOrderRequest>

 

Der Server antwortet hierauf so:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 <?xml version="1.0" encoding="iso-8859-1" ?> <OrderResponse xmlns="urn:veloconnect:order-1.1" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-1.0" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-1.0" xmlns:vct="urn:veloconnect:transaction-1.0"> <vct:BuyersID>B127645</vct:BuyersID> <vct:ResponseCode>200</vct:ResponseCode> <vct:TransactionID>online-basket</vct:TransactionID> <vct:StatusCode>2</vct:StatusCode> <OrderResponseLine> <cbc:Quantity quantityUnitCode="PK">5</cbc:Quantity> <cac:Item> <cbc:Description>Speichen DD 2,0x1,8x 263 mm, silber Race,Niro, mit Messingnippel</cbc:Description> <cbc:PackQuantity quantityUnitCode="EA">100</cbc:PackQuantity> <cac:BuyersItemIdentification> <cac:ID>7285</cac:ID> </cac:BuyersItemIdentification> <cac:SellersItemIdentification> <cac:ID>42213526300</cac:ID> </cac:SellersItemIdentification> <cac:StandardItemIdentification> <cac:ID identificationSchemeID="EAN/UCC-13">4032191511108</cac:ID> </cac:StandardItemIdentification> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">34.90</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="PK">1</cbc:BaseQuantity> </cac:BasePrice> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">29.50</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="PK">1</cbc:BaseQuantity> <cbc:MinimumQuantity quantityUnitCode="PK">10</cbc:MinimumQuantity> </cac:BasePrice> <cac:RecommendedRetailPrice> <cbc:PriceAmount amountCurrencyID="EUR">0.70</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="EA">1</cbc:BaseQuantity> </cac:RecommendedRetailPrice> </cac:Item> <cac:UnitPrice amountCurrencyID="EUR">29.50</cac:UnitPrice> <Availability> <Code>available</Code> </Availability> </OrderResponseLine> <OrderResponseLine> <cbc:Quantity quantityUnitCode="PK">2</cbc:Quantity> <cac:Item> <cbc:Description>Bremsinnenzug 1800 mm mit Quernippel</cbc:Description> <cbc:PackSizeNumeric>10</cbc:PackSizeNumeric> <cac:BuyersItemIdentification> <cac:ID>7290</cac:ID> </cac:BuyersItemIdentification> <cac:SellersItemIdentification> <cac:ID>42038057500</cac:ID> </cac:SellersItemIdentification> <cac:StandardItemIdentification> <cac:ID identificationSchemeID="EAN/UCC-13">4032191018164</cac:ID> </cac:StandardItemIdentification> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">5.5</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="PK">1</cbc:BaseQuantity> </cac:BasePrice> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">4.8</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="PK">1</cbc:BaseQuantity> <cbc:MinimumQuantity quantityUnitCode="PK">2</cbc:MinimumQuantity> </cac:BasePrice> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">4.5</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="PK">1</cbc:BaseQuantity> <cbc:MinimumQuantity quantityUnitCode="PK">5</cbc:MinimumQuantity> </cac:BasePrice> <cac:RecommendedRetailPrice> <cbc:PriceAmount amountCurrencyID="EUR">0.99</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="EA">1</cbc:BaseQuantity> </cac:RecommendedRetailPrice> </cac:Item> <cac:UnitPrice amountCurrencyID="EUR">4.80</cac:UnitPrice> <Availability> <Code>available</Code> </Availability> </OrderResponseLine> <OrderResponseLine> <cbc:Quantity quantityUnitCode="PK">4</cbc:Quantity> <cac:Item> <cbc:Description>Shimano Bremsaußenhülle M-System schwarz</cbc:Description> <cbc:PackQuantity quantityUnitCode="MTR">30</cbc:PackQuantity> <cac:BuyersItemIdentification> <cac:ID>7295</cac:ID> </cac:BuyersItemIdentification> <cac:SellersItemIdentification> <cac:ID>52090311100</cac:ID> </cac:SellersItemIdentification> <cac:StandardItemIdentification> <cac:ID identificationSchemeID="EAN/UCC-13">4032191027388</cac:ID> </cac:StandardItemIdentification> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">0.96</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="MTR">1</cbc:BaseQuantity> </cac:BasePrice> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">0.87</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="MTR">1</cbc:BaseQuantity> <cbc:MinimumQuantity quantityUnitCode="MTR">60</cbc:MinimumQuantity> </cac:BasePrice> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">0.79</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="MTR">1</cbc:BaseQuantity> <cbc:MinimumQuantity quantityUnitCode="MTR">90</cbc:MinimumQuantity> </cac:BasePrice> <cac:RecommendedRetailPrice> <cbc:PriceAmount amountCurrencyID="EUR">1.77</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="MTR">1</cbc:BaseQuantity> </cac:RecommendedRetailPrice> </cac:Item> <cac:UnitPrice amountCurrencyID="EUR">23.70</cac:UnitPrice> <Availability> <Code>available</Code> </Availability> </OrderResponseLine> </OrderResponse>

Nunmehr sind Warenkorb und Bestellung abgeglichen. Würde der Benutzer im Online-Shop den aktuellen Warenkorb abrufen, enthielte dieser genau die gleichen drei Positionen, die die Bestellung im eigenen Warenwirtschaftssystem enthält. Die Bestellung wird nun mit der Anfrage

1 https://shop.beispielserver.com/vc_order.jsp?BuyersID=127654&Password=secret&RequestName=FinishOrderRequest&TransactionId=online-basket

abgeschlossen, worauf der Server die erwartete komplette Bestellung zurückliefert.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 <?xml version="1.0" encoding="iso-8859-1" ?> <FinalOrderResponse xmlns="urn:veloconnect:order-1.1" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-1.0" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-1.0" xmlns:vct="urn:veloconnect:transaction-1.0"> <vct:BuyersID>B127645</vct:BuyersID> <vct:ResponseCode>200</vct:ResponseCode> <vct:TransactionID>online-basket</vct:TransactionID> <vct:StatusCode>100</vct:StatusCode> <OrderHeader> <OrderID>123456-BS-2345</OrderID> <cbc:IssueDate>2005-07-01</cbc:IssueDate> </OrderHeader> <OrderResponseLine> <cbc:Quantity quantityUnitCode="PK">5</cbc:Quantity> <cac:Item> <cbc:Description>Speichen DD 2,0x1,8x 263 mm, silber Race,Niro, mit Messingnippel</cbc:Description> <cbc:PackQuantity quantityUnitCode="EA">100</cbc:PackQuantity> <cac:BuyersItemIdentification> <cac:ID>7285</cac:ID> </cac:BuyersItemIdentification> <cac:SellersItemIdentification> <cac:ID>42213526300</cac:ID> </cac:SellersItemIdentification> <cac:StandardItemIdentification> <cac:ID identificationSchemeID="EAN/UCC-13">4032191511108</cac:ID> </cac:StandardItemIdentification> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">34.90</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="PK">1</cbc:BaseQuantity> </cac:BasePrice> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">29.50</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="PK">1</cbc:BaseQuantity> <cbc:MinimumQuantity quantityUnitCode="PK">10</cbc:MinimumQuantity> </cac:BasePrice> <cac:RecommendedRetailPrice> <cbc:PriceAmount amountCurrencyID="EUR">0.70</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="EA">1</cbc:BaseQuantity> </cac:RecommendedRetailPrice> </cac:Item> <cac:UnitPrice amountCurrencyID="EUR">29.50</cac:UnitPrice> <Availability> <Code>available</Code> </Availability> </OrderResponseLine> <OrderResponseLine> <cbc:Quantity quantityUnitCode="PK">2</cbc:Quantity> <cac:Item> <cbc:Description>Bremsinnenzug 1800 mm mit Quernippel</cbc:Description> <cbc:PackSizeNumeric>10</cbc:PackSizeNumeric> <cac:BuyersItemIdentification> <cac:ID>7290</cac:ID> </cac:BuyersItemIdentification> <cac:SellersItemIdentification> <cac:ID>42038057500</cac:ID> </cac:SellersItemIdentification> <cac:StandardItemIdentification> <cac:ID identificationSchemeID="EAN/UCC-13">4032191018164</cac:ID> </cac:StandardItemIdentification> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">5.5</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="PK">1</cbc:BaseQuantity> </cac:BasePrice> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">4.8</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="PK">1</cbc:BaseQuantity> <cbc:MinimumQuantity quantityUnitCode="PK">2</cbc:MinimumQuantity> </cac:BasePrice> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">4.5</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="PK">1</cbc:BaseQuantity> <cbc:MinimumQuantity quantityUnitCode="PK">5</cbc:MinimumQuantity> </cac:BasePrice> <cac:RecommendedRetailPrice> <cbc:PriceAmount amountCurrencyID="EUR">0.99</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="EA">1</cbc:BaseQuantity> </cac:RecommendedRetailPrice> </cac:Item> <cac:UnitPrice amountCurrencyID="EUR">4.80</cac:UnitPrice> <Availability> <Code>available</Code> </Availability> </OrderResponseLine> <OrderResponseLine> <cbc:Quantity quantityUnitCode="PK">4</cbc:Quantity> <cac:Item> <cbc:Description>Shimano Bremsaußenhülle M-System schwarz</cbc:Description> <cbc:PackQuantity quantityUnitCode="MTR">30</cbc:PackQuantity> <cac:BuyersItemIdentification> <cac:ID>7295</cac:ID> </cac:BuyersItemIdentification> <cac:SellersItemIdentification> <cac:ID>52090311100</cac:ID> </cac:SellersItemIdentification> <cac:StandardItemIdentification> <cac:ID identificationSchemeID="EAN/UCC-13">4032191027388</cac:ID> </cac:StandardItemIdentification> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">0.96</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="MTR">1</cbc:BaseQuantity> </cac:BasePrice> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">0.87</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="MTR">1</cbc:BaseQuantity> <cbc:MinimumQuantity quantityUnitCode="MTR">60</cbc:MinimumQuantity> </cac:BasePrice> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">0.79</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="MTR">1</cbc:BaseQuantity> <cbc:MinimumQuantity quantityUnitCode="MTR">90</cbc:MinimumQuantity> </cac:BasePrice> <cac:RecommendedRetailPrice> <cbc:PriceAmount amountCurrencyID="EUR">1.77</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="MTR">1</cbc:BaseQuantity> </cac:RecommendedRetailPrice> </cac:Item> <cac:UnitPrice amountCurrencyID="EUR">23.70</cac:UnitPrice> <Availability> <Code>available</Code> </Availability> </OrderResponseLine> </FinalOrderResponse>

Damit ist nun auch der Warenkorb im Online-Shop wieder leer und die Bestellung im Warenwirtschaftssystem des Käufers als bestellt markiert.