Order simulation for test purpose

Order simulation for test purpose

In order to test the web service independently as much as possible, a test order based on a few characteristics, that the customer provides, must be processed fully automatically. The functionality described here is available on CB's test environment, but not on the production environment.

Operation of order simulation web service MediaOrderB2C

The order simulation functionality is built into the order handling and processing. 

Simulation characteristic

An order is included in the order simulation on the basis of a test characteristic in the order. The attribute identifier is:

Test attribute

$CB*TST

The attribute is 7 positions long. The maximum length of command reference fields supported is 10 positions. The remaining 3 positions are reserved for additional command instructions. 

The customer can specify this attribute in one of the two order reference fields:

  • BuyerReference 
  • OwnerReference

The customer can choose which field is used for the characteristic. The other field remains available for the customer's reference. A customer who wants to use both order reference fields in production for his own references must, in order to apply the order simulation, choose which of the two fields is “sacrificed” for the characteristic.

Order Instructions

By default one ShippingUnitID is created for each order, independent of the number of order lines, ordered copies and dimensions of the items. We simulate that everything fits into one ShippingUnitID, which gives the customer a clear expectation of the result of the order. In practice, not everything fits in a ShippingUnitID, so the customer can indicate in the order how many ShippingUnitID's CB need to create.

Test characteristic addition for more than one ShippingUnitID

This is optional and is placed after the test attribute with:

Cnn

Where nn stands for the number of ShippingUnitID's (2 to 99). For instance:

  • $CB*TSTC3   => Test feature + request for 3 ShippingUnitID's
  • $CB*TSTC05 => Test feature + request for 5 ShippingUnitID's
  • $CB*TSTC15 => Test feature + request for 15 ShippingUnitID's 

The maximum number of ShippingUnitID's to be made is equal to the number of copies ordered (i.e. 1 copy per ShippingUnitID). If more ShippingUnitID's are requested than there are ordered copies in an order, a ShippingUnitID is created for each ordered copy. No error message or warning is given.

Orderline instruction

By default, for each OrderLine, the number of copies ordered is also included in the ShippingUnitID as delivered. In practice, various scenarios are possible, as a result of which a different number of copies is delivered. The order simulation supports one scenario, a shortage ('manco') situation. The customer can indicate at the Orderline how many copies are reported missing. 

Scenario 'Shortage' situation

This is optional and comes with the shortage attribute:

$MANCO;n

The customer can specify this attribute in one of the two order reference fields at Orderline level:

  • BuyerReference 
  • OwnerReference

Where stands for the number of ShippingUnitID's (2 to 99). For instance:

  • $MANCO;1 => Request for 1 copy shortage with this order line
  • $MANCO;5 => Request for 5 copy shortage with this order line

The maximum number of shortages is the number of copies ordered. If more shortages are requested than there are ordered copies in a OrderLine, then 0 (null) copies delivered are reported. No error message or warning is given. No new OrderLine for the missing copies is created. The intended situation is to deliver less than requested. Backordering is not supported in order simulation.

Test articles

Articles available for test
ISBNTitelDiscountCode

ProductAvailability 

Stock 

YES/NO

9789029511537MediaOrderB2C Title 1 AReprint/HerdrukNO
9789029585071MediaOrderB2C Title 2 AAnnounced/AangekondigdNO
9789063055998MediaOrderB2C Title 3ONot available/UitverkochtNO
9789045119731MediaOrderB2C Title 4SIn stock/VerschenenYES
9789045119755MediaOrderB2C Title 5AIn stock/VerschenenYES
9789025307349

MediaOrderB2C Title 6

AIn stock/VerschenenYES
9789025308339

MediaOrderB2C Title 7

AIn stock/VerschenenYES
9789025309640MediaOrderB2C Title 8AIn stock/VerschenenYES
9789025309954MediaOrderB2C Title 9AIn stock/VerschenenYES
9789029505598MediaOrderB2C Title 10AIn stock/VerschenenYES
9789029506182

MediaOrderB2C Title 11

AIn stock/VerschenenYES
9789029506335MediaOrderB2C Title 12AIn stock/VerschenenYES
9789029506885MediaOrderB2C Title 13 AIn stock/VerschenenYES

ONIX file with Product records:  Testarticles-ini-1van1_onx.xml

Results for customer

The customer is informed almost immediately when the order status is changed. The diagram below shows which stages are defined and which web service operations are used to communicate or make information available to the customer. 


Description:

  • The customer places one or more items in the shopping cart of a shop
  • The webshop submits the order to CB
  • CB checks the order and if accepted, CB sends an order notification with status event “In Progress”
  • CB reserves stock and releases the order (line) for logistics. The order line cannot be cancelled from that moment on. CB sends an order notification with status event “ProductionReady”
  • The webshop can retrieve the status of the order to see which order lines have been released
  • CB performs the order simulation and sends a shipment notification per shipment unit with status event “Processed”
  • The webhop can retrieve the details of each shipment unit and thus inform the customer.