Format description: Order

General

The order format is based on the standard xml catalog format. In an order one order item (position) is exactly one possible configuration of the delivery ranges defined in the catalog.

Here we can differ between configurable and simple products.

Simple (non configurable) Products

Such products can be ordered by defining the desired quantity without selection of specific product features. One articleID specifies one specific product with clearly defined product features (characteristics).

Example:

“Contact lens solution special brand 360ml”

Configurable Products

Such products (contact lenses, lenses, frames) are available with different combinations of procuct features.

Example:

Contact lens: sphere, diameter, radiusBasecurve

Frame: colour, size, templeLength

To define a valid order, all order relevant product features (includeInOrder=true) have to be defined in the order under configuration.

Layout of the order format (Order.xml)

The order format is based on the catalog format. In the element Order general information concerning the order are defined. It is devided in the two parts Client und OrderItems. In the element Order general information concerning the order are defined. It is devided in the two parts Client and OrderItems.

Validation is based on most recent schema version. It is available under the following URL:

https://templates.look4optics.com/v_1_13/Order.xsd

As an option you can quote address information of the orderer under Client. As an option you can quote address information of the orderer or deviating delivery addresses under Client.

Following is the description of the different order items (positions). Here only product features are mentioned, which are defined order relevant in the catalog (includeInOrder=true). Each order position contains a valid configuration from configuration variants that were defined in the catalog.

List of the standard product features

You will find the list of the FeatureTemplates in the document ‘Overview of Feature Templates’.

The element Order

The element Order contains the elements Client (information concerning the orderer) and OrderItems (order positions).

The element Order starts with the definition of general information for the order.

The values schemaMajorVersionID and schemaMinorVersionID should be set permanently in the ordering software, because they indicate which version of the standard is used in the structure of the document. Therefore other programs can adjust themselves when parsing the document. The values can be increased in the transmitter software, if there is a new version of the standard and the program compatibility has been tested.

For the description are the following attributes available:

Attribute Type / Use Description / Example
catalogID xs:string required Version of the catalog format on which the creation of the order is based (e.g. Schema_Catalog_1_6)
catalogName xs:string optional Name of the catalog format on which the creation of the order is based (e.g. Catalog 1.6)
clientOrderID xs:string required Order ID on the side of the sender (e.g. 00023-345785)
originalClientOrderID xs:string optional Order ID of original client, e.g. for orders of Home Delivery Services (e.g. 00023-345785)
clientSupplierID xs:string optional ID of the supplier at client (e.g. Woehlk-123456)
currency xs:string optional Currency (e.g. EURO)
generationDate xs:dateTime optional Date and time of the order generation (e.g. 2011-02-11T11:48:34)
generatorInfo xs:string optional Information about the generation software (e.g. Look4 Webservices Test)
schemaMajorVersionID xs:integer required Major version number for the description of the current schema version (e.g. 1)
schemaMinorVersionID xs:integer required Minor version number for the description of the current schema version (e.g. 0)
supplierID xs:string required Unique ID of the supplier (e.g. DE813058544)
supplierName xs:string optional Supplier name the order has to be sent to (e.g. Woehlk)
vatRate xs:decimal optional VAT rate in % (e.g. 19)

Example XML-Code:

<Order catalogID="catalog_de_de.xml" supplierID="DE813058544"
  generatorInfo="Look4 Webservices Test" generationDate="2018-02-11T11:48:34"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation=
  "https://templates.look4optics.com/v_1_13/Order.xsd"
  clientOrderID="00023-345785" schemaMajorVersionID="1"
  schemaMinorVersionID="13" >
</Order>

The element Client

The element Client contains the attributes clientID (client number at supplier) and clientName (company name). Optionally you have the possibility to define an e-mail address, to which status messages should be sent back, by using the attribute responseMail. Furthermore there can be defined optional addresses.

Attribute Type / Use Description / Example
clientID xs:string required Client number at supplier (e.g. 012345)
clientName xs:string optional Company name (e.g. Smith Optics Ltd.)
responseMail xs:string optional Mail address for status response (e.g. response@optician-test-smith.co.uk)

The element Address has following attributes:

Multiple addresses can be given in the element Address. This information is optional. If different delivery addresses are necessary, the shipping address is given here and can be assigned to individual order items under OrderItems. Thus, for example, the corporate headquarters can send orders for several stores in one order. The address can also be used to pass the associated clientID (customer number of the store at the supplier).

The handling for different delivery addresses differs at the suppliers and should therefore always be coordinated with LOOK4 or the relevant suppliers or tested extensively in the test phase.

Attribute Type / Use Description / Example
addressID xs:string required Unique ID for an address. This can be linked later to one or more orders. (e.g. 123456)
addressType xs:NMTOKEN required Address type, standard values: MainAddress, ShippingAddress, BillingAddress (e.g. MainAddress)
city xs:string required City (e.g. London)
clientBranchID xs:string optional Client branch ID (e.g. 1234)
clientID xs:string optional Client ID (e.g. 123423)
clientType xs:NMTOKEN optional Client type, standard values: Consumer, Branch, Retailer (e.g. Retailer)
email xs:string optional E-mail (e.g. mail@optician-test-smith.co.uk)
fax xs:string optional Fax (e.g. +0044 1302 344 321)
isoCountryCode xs:language required ISO country code (e.g. GB)
name xs:string required Name (e.g. Smith Optics Ltd.)
name2 xs:string optional Name 2 (e.g. Eye care and more)
phone xs:string optional Phone (e.g. +0044 1302 344 123)
street xs:string required Street (e.g. Main street 123)
zip xs:string required Zip code (e.g. DN1 1NE)

Example XML-Code:

<Addresses>
    <Address clientType="Branch" addressID="1" addressType="MainAddress"
      name="Smith Optics Ltd." name2="Eye care and more"
      street="Main street 123" zip="DN1 1NE" city="London"
      isoCountryCode="GB" phone="+0044 1302 344 123" fax="+0044 1302 344 321"
      email="mail@optician-test-smith.co.uk" />
    <!-- Address of branch -->
    <Address clientType="Retailer" addressID="2" addressType="BillingAddress"
      name="Smith Optics Ltd. Administration Office" street="Long street 347"
      zip="DN2 2NE" city="London" isoCountryCode="GB"
      phone="+0044 1302 344 123" fax="+0044 1302 344 321"
      email="central@optician-test-smith.co.uk" />
    <!-- Address of administration center -->
    <Address clientType="Consumer" addressID="3" addressType="ShippingAddress"
      name="Henry Miller" street="Short street 1" zip="DN1 1NE" city="London"
      isoCountryCode="GB" phone="+0044 123456"
      email="mail@henrytest.miller.co.uk" />
    <!-- Address of consumer -->
</Addresses>

The element OrderItems

Each element OrderItems can have one or more OrderItem elements. Each OrderItem describes one order position.

The referencing for the order response and assignment of individual order items takes place via the attribute clientOrderItemID. This field must always be filled when the orders are sent via Web service.

For description the following attributes can be used:

Attribute Type / Use Description / Example
addressID xs:string optional ID of the associated address (e.g. 123456)
articleID xs:string required Article ID at supplier (e.g. A2780)
articleName xs:string optional Article name (e.g. Contact Life Spheric Box)
clientArticleID xs:string optional Client article ID (e.g. CL-CLSB-1234)
clientArticleName xs:string optional Client article name (e.g. Woehlk - Contact Life Spheric Box)
clientOrderItemID xs:string required ID that (definitely) defines the order item on side of the sender (e.g. LOOK4-WLK-01)
originalClientOrderItemID xs:string optional ID of the original client, e.g. for orders of home delivery service provider (e.g. 23425234)
deliveryDate xs:dateTime optional Desired delivery date (e.g. 2011-02-12T09:00:00)
eanCode xs:string optional EAN-Code, 13-digit (e.g. 7234567891234)
netPurchasePrice xs:decimal optional Net purchase price (e.g. 20.00)
orderItemType xs:NMTOKEN optional Item type: standard, freeOfCharge, returns (e.g. standard)
referenceName xs:string optional Commission, client/order number (e.g. Stock)
unitOfMeasure xs:NMTOKEN optional Unit of measure, standard values: bottles, boxes, pieces (e.g. boxes)
upcCode xs:string optional UPC-Code, 12-digit (e.g. 723456789123)
vatRate xs:decimal optional VAT rate in % (e.g. 19)

Example XML-Code:

<OrderItems>
    <OrderItem articleID="A2780" articleName="Contact Life Spheric Box"
      clientOrderItemID="LOOK4-WLK-01" deliveryDate="2017-02-12T09:00:00"
      referenceName="Stock" unitOfMeasure="boxes">
        <Configuration quantity="1">
            <Feature templateID="Diameter" selectedValue="13.6"/>
            <Feature templateID="RadiusBasecurve" selectedValue="8.3"/>
            <Feature templateID="Sphere" selectedValue="-3"/>
        </Configuration>
    </OrderItem>
    <OrderItem articleID="A2780" articleName="Contact Life Spheric Box"
      clientOrderItemID="LOOK4-WLK-02" deliveryDate="2017-02-12T09:00:00"
      referenceName="Stock" unitOfMeasure="boxes">
        <Configuration quantity="1">
            <Feature templateID="Diameter" selectedValue="14.2"/>
            <Feature templateID="RadiusBasecurve" selectedValue="8.8"/>
            <Feature templateID="Sphere" selectedValue="0.25"/>
        </Configuration>
    </OrderItem>
    <OrderItem articleID="A3380" articleName="Premium Spheric 6er Box"
    clientOrderItemID="LOOK4-WLK-03" deliveryDate="2017-02-12T09:00:00"
    referenceName="Stock" unitOfMeasure="boxes">
        <Configuration quantity="1">
            <Feature templateID="Diameter" selectedValue="13.6"/>
            <Feature templateID="RadiusBasecurve" selectedValue="8.3"/>
            <Feature templateID="Sphere" selectedValue="-2.5"/>
        </Configuration>
    </OrderItem>
</OrderItems>

The element Configuration

The element Configuration describes the configuration of the ordered article. The attribute quantity declares the number of units of the defined configuration. Each configuration contains a list of order relevant product features. The availability for the article is defined in the corresponding catalog.

Attribute Type / Use Description / Example
quantity xs:positiveInteger required Desired quantity (e.g. 1)

Example XML-Code:

(all product features in catalog marked with includeInOrder=true)

<Configuration quantity="1">
    <Feature templateID="Diameter" selectedValue="14.20"/>
    <Feature templateID="RadiusBasecurve" selectedValue="8.70"/>
    <Feature templateID="Sphere" selectedValue="-9.00"/>
</Configuration>

The element AdditionalData

The optional element AdditionalData available since version 1.8 allows the addition of additional information to the order such as keratograph data for contact lenses or form data for frames.

Attribute Type / Use Description / Example
dataDescription xs:string optional Description of data content (reference name) (e.g. SUFG4656)
dataFormat xs:string required Description of data format (jpg, oma, dat) (e.g. dat)
dataSourceType xs:string required Description of the source type - used measuring device (e.g. Topcon 231)
dataSourceVersion xs:string required Version of the used source or device (e.g. TR14)
dataType xs:string required Type of data (Keratograph, split lamp, pictures, tracer data,..) (e.g. Keratograph)

The element Feature

Attribute Type / Use Description / Example
selectedValue xs:string required Values according to the parameter (e.g. 14.2)
templateID xs:string required Name of the parameter (e.g. Diameter)

Here all product features must be specified that are defined in the catalog as order relevant (includeInOrder=true). All features defined in the standard, see the document ‘Overview of the Feature Templates’.

Example XML-Code for a complete order

<Order catalogID="catalog_de_de.xml" supplierID="DE813058544"
  generatorInfo="Look4 Webservices Test" generationDate="2017-02-11T11:48:34"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation=
  "https://templates.look4optics.com/v_1_13/Order.xsd"
  clientOrderID="00023-345785" schemaMajorVersionID="1"
  schemaMinorVersionID="13" >
    <Client clientID="00011" clientName="Testkunde11" responseMail="info@look4.de">
        <Addresses>
            <Address clientType="Branch" addressID="1"
              addressType="MainAddress" name="Smith Optics Ltd."
              name2="Eye care and more" street="Main street 123" zip="DN1 1NE"
              city="London" isoCountryCode="GB" phone="+0044 1302 344 123"
              fax="+0044 1302 344 321"
              email="mail@optician-test-smith.co.uk" />
            <Address clientType="Retailer" addressID="2"
              addressType="BillingAddress"
              name="Smith Optics Ltd. Administration Office"
              street="Long street 347" zip="DN2 2NE" city="London"
              isoCountryCode="GB" phone="+0044 1302 344 123"
              fax="+0044 1302 344 321"
              email="central@optician-test-smith.co.uk" />
            <Address clientType="Consumer" addressID="3"
              addressType="ShippingAddress" name="Henry Miller"
              street="Short street 1" zip="DN1 1NE" city="London"
              isoCountryCode="GB" phone="+0044 123456"
              email="mail@henrytest.miller.co.uk" />
        </Addresses>
    </Client>
    <OrderItems>
        <OrderItem articleID="A2780" articleName="Contact Life Spheric Box"
          clientOrderItemID="LOOK4-WLK-01" deliveryDate="2017-02-12T09:00:00"
          referenceName="Stock" unitOfMeasure="boxes">
                <Configuration quantity="1">
                <Feature templateID="Diameter" selectedValue="13.6"/>
                <Feature templateID="RadiusBasecurve" selectedValue="8.3"/>
                <Feature templateID="Sphere" selectedValue="-3"/>
            </Configuration>
        </OrderItem>
        <OrderItem articleID="A2780" articleName="Contact Life Spheric Box"
          clientOrderItemID="LOOK4-WLK-02" deliveryDate="2017-02-12T09:00:00"
          referenceName="Stock" unitOfMeasure="boxes">
            <Configuration quantity="1">
                <Feature templateID="Diameter" selectedValue="14.2"/>
                <Feature templateID="RadiusBasecurve" selectedValue="8.8"/>
                <Feature templateID="Sphere" selectedValue="0.25"/>
            </Configuration>
        </OrderItem>
        <OrderItem articleID="A3380" articleName="Premium Spheric 6er Box"
          clientOrderItemID="LOOK4-WLK-03" deliveryDate="2017-02-12T09:00:00"
          referenceName="Stock" unitOfMeasure="boxes">
            <Configuration quantity="1">
                <Feature templateID="Diameter" selectedValue="13.6"/>
                <Feature templateID="RadiusBasecurve" selectedValue="8.3"/>
                <Feature templateID="Sphere" selectedValue="-2.5"/>
            </Configuration>
        </OrderItem>
    </OrderItems>
</Order>

Announcement for Schema 2.0

The two IDs clientOrderID and clientOrderItemID are mandatory. Whereby the two IDs don’t have to be unique for themselves, but in combination.

So, split orders are supported also after partial acceptance and correction.

Order Transmission

The format is independent of the type of data transfer. The transfer takes place via Web service with an HTTP request (POST). The order via the Web services of LOOK4Optics is made to the following URL:

Productive: https://www.look4optics.de/OrderService/PlaceOrder.ashx

For detailed information please contact the LOOK4 support or the supplier. The URLs for suppliers who run their own Web services can be found in the respective catalogs in the WebServices element.