<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:annotation>
    <xs:documentation>Title: Basket Response Schema</xs:documentation>
    <xs:documentation>The basket response provides details of the promotions applied to a basket, and any new lines created, or coupons and points issued.</xs:documentation>
    <xs:documentation>Version 1.0 : 2014-08-07.  Initial schema creation.</xs:documentation>
    <xs:documentation>Version 1.1 : 2014-09-04.  Updated to include 'yourref' and 'groupcode' for applied promotions.</xs:documentation>
    <xs:documentation>Version 1.2 : 2015-06-15.  Updated to include issued points and issued coupons.</xs:documentation>
    <xs:documentation>Version 1.3 : 2015-06-26.  Standardised reporting code attribute/element names.</xs:documentation>
    <xs:documentation>Version 1.4 : 2015-10-02.  Updates after changes to provide additional details with applied promotions and coupons.</xs:documentation>
    <xs:documentation>Version 1.5 : 2016-10-29.  Added Missed Promotions to response.</xs:documentation>
    <xs:documentation>Version 1.6 : 2018-04-24.  Company key is no longer a required attribute..</xs:documentation>
  </xs:annotation>
  <xs:element name="response">
    <xs:complexType>
      <xs:all>
        <xs:element minOccurs="0" maxOccurs="1" name="summary">
          <xs:complexType>
            <xs:all>
              <xs:element minOccurs="0" maxOccurs="1" name="action">
                <xs:annotation>
                  <xs:documentation>The Name of the API service action</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:simpleContent>
                    <xs:extension base="xs:string">
                      <xs:attribute name="id" type="xs:integer" use="optional">
                        <xs:annotation>
                          <xs:documentation>The Id of the API service action</xs:documentation>
                        </xs:annotation>
                      </xs:attribute>
                    </xs:extension>
                  </xs:simpleContent>
                </xs:complexType>
              </xs:element>
              <xs:element minOccurs="0" maxOccurs="1" name="promotions">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element minOccurs="0" maxOccurs="unbounded" name="promotion">
                      <xs:complexType>
                        <xs:all>
                          <xs:element minOccurs="0" maxOccurs="1" name="name" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>The promotion name</xs:documentation>
                            </xs:annotation>
                          </xs:element>
                          <xs:element minOccurs="0" maxOccurs="1" name="displaytext" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>The end-user/display text defined against the promotiton.</xs:documentation>
                            </xs:annotation>
                          </xs:element>
                        </xs:all>
                        <xs:attribute name="id" type="xs:integer" use="optional">
                          <xs:annotation>
                            <xs:documentation>The Id of the promotion that has been applied to the basket.</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="yourref" type="xs:string" use="optional">
                          <xs:annotation>
                            <xs:documentation>The reference assigned to the promotion.</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="reportingcode" type="xs:string" use="optional">
                          <xs:annotation>
                            <xs:documentation>The reporting code assigned to the promotion.</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="type" use="optional">
                          <xs:annotation>
                            <xs:documentation>The type of the promotion that has been applied to the basket.</xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:enumeration value="BASKETREDUCTION" />
                              <xs:enumeration value="BOGOF" />
                              <xs:enumeration value="BOGOR" />
                              <xs:enumeration value="BUNDLE" />
                              <xs:enumeration value="PRODUCTSREDUCTION" />
                              <xs:enumeration value="DEAL" />
                              <xs:enumeration value="DELIVERYREDUCTION" />
                              <xs:enumeration value="ISSUECOUPON" />
                              <xs:enumeration value="ISSUEPOINTS" />
                              <xs:enumeration value="FREEPRODUCT" />
                              <xs:enumeration value="WORKFLOWTRIGGER" />
                              <xs:enumeration value="MULTIBUY" />
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:attribute>
                        <xs:attribute name="unpublished" type="xs:boolean" use="optional">
                          <xs:annotation>
                            <xs:documentation>Flag indicating whether the promotion has been published.</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="display" type="xs:string" use="optional">
                          <xs:annotation>
                            <xs:documentation>Display text version of the promotion type.</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="discountamount" type="xs:decimal" use="optional">
                          <xs:annotation>
                            <xs:documentation>The total discount applied to the basket for this instance of the promotion.</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="instance" type="xs:integer" use="optional">
                          <xs:annotation>
                            <xs:documentation>The instance of the promotion applied to the basket.  Where a promotion is applied multiple times to the basket, each instance will be assigned an incremented number for that instance.</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="deliverylevel" type="xs:boolean" use="optional">
                          <xs:annotation>
                            <xs:documentation>Flag indicating whether the promotion will be applied to the delivery price for the basket.</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="basketlevel" type="xs:boolean" use="optional">
                          <xs:annotation>
                            <xs:documentation>A flag indicating whether the promotion is applied to all items in the basket.</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="alwaysapply" type="xs:boolean" use="optional">
                          <xs:annotation>
                            <xs:documentation>A flag indicating whether the promotion is configured to be applied outside of the best deal calculations.</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="whentoapply" use="optional">
                          <xs:annotation>
                            <xs:documentation>Where the promotion is configured as 'alwaysapply', provides a value indicating whether promotion will be applied before or after best deal calculations.</xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:enumeration value="BeforeBestDeal" />
                              <xs:enumeration value="AfterBestDeal" />
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:attribute>
                        <xs:attribute name="alwaysapplysequence" type="xs:integer" use="optional">
                          <xs:annotation>
                            <xs:documentation>Where the 'AlwaysApply' flag is true, the sequence in which the promotion was applied within the context of promotions flagged as 'AlwaysApply'.</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="issuedpoints" type="xs:decimal" use="optional">
                          <xs:annotation>
                            <xs:documentation>The total number of points issued to the basket for this instance of the promotion.</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="issuedcoupon" type="xs:boolean" use="optional">
                          <xs:annotation>
                            <xs:documentation>Flag indicating whether the promotion issued a voucher code when it was applied.</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="issuedproduct" type="xs:boolean" use="optional">
                          <xs:annotation>
                            <xs:documentation>Flag indicating whether the promotion add a product to the basket when it was applied.</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="attributetoken" type="xs:string" use="optional">
                          <xs:annotation>
                            <xs:documentation>Where appropriate, the name of the attribute that the promotion updated when it was applied.</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element minOccurs="0" maxOccurs="1" name="messages">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element minOccurs="0" maxOccurs="unbounded" name="message">
                      <xs:annotation>
                        <xs:documentation>The message text.</xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:extension base="xs:string">
                            <xs:attribute name="code" type="xs:string" use="optional">
                              <xs:annotation>
                                <xs:documentation>The code associated with the message.</xs:documentation>
                              </xs:annotation>
                            </xs:attribute>
                            <xs:attribute name="for" type="xs:string" use="optional" />
                          </xs:extension>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:all>
            <xs:attribute name="promotionsapplied" type="xs:integer" use="optional" />
            <xs:attribute name="vuid" type="xs:string" use="optional">
              <xs:annotation>
                <xs:documentation>A unique ID assigned to the basket at the point of being validated.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="result" type="xs:boolean" use="optional">
              <xs:annotation>
                <xs:documentation>Flag indicating whether the process completed without errors.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
        <xs:element minOccurs="0" maxOccurs="1" name="coupons">
          <xs:complexType>
            <xs:sequence>
              <xs:element minOccurs="0" maxOccurs="unbounded" name="coupon">
                <xs:complexType>
                  <xs:all>
                    <xs:element minOccurs="0" maxOccurs="1" name="couponname" type="xs:string">
                      <xs:annotation>
                        <xs:documentation>The name of the coupon against which the code is defined.</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element minOccurs="0" maxOccurs="1" name="displaytext" type="xs:string">
                      <xs:annotation>
                        <xs:documentation>Where specified, the text defined against the promotion to be returned with issued voucher codes.</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element minOccurs="0" maxOccurs="1" name="referafriend">
                      <xs:annotation>
                        <xs:documentation>Where applicable, refer-a-friend details</xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:attribute name="referralcode" type="xs:boolean" use="optional">
                          <xs:annotation>
                            <xs:documentation>Flag indicating whether the code is the referral code to be provided to friends.</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="reservedcode" type="xs:boolean" use="optional">
                          <xs:annotation>
                            <xs:documentation>Flag indicating whether the code is the customer's reserved code, and as such will be activated when the referral code has been redeemed.</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                      </xs:complexType>
                    </xs:element>
                    <xs:element minOccurs="0" maxOccurs="1" name="message">
                      <xs:annotation>
                        <xs:documentation>The message text.</xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:extension base="xs:string">
                            <xs:attribute name="code" type="xs:string" use="optional">
                              <xs:annotation>
                                <xs:documentation>A code for the message.</xs:documentation>
                              </xs:annotation>
                            </xs:attribute>
                          </xs:extension>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                    <xs:element minOccurs="0" maxOccurs="1" name="utilizations">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element minOccurs="0" maxOccurs="unbounded" name="promotion">
                            <xs:complexType>
                              <xs:all>
                                <xs:element minOccurs="0" maxOccurs="1" name="message">
                                  <xs:annotation>
                                    <xs:documentation>The message text.</xs:documentation>
                                  </xs:annotation>
                                  <xs:complexType>
                                    <xs:simpleContent>
                                      <xs:extension base="xs:string">
                                        <xs:attribute name="code" type="xs:string" use="optional">
                                          <xs:annotation>
                                            <xs:documentation>A code for the message.</xs:documentation>
                                          </xs:annotation>
                                        </xs:attribute>
                                      </xs:extension>
                                    </xs:simpleContent>
                                  </xs:complexType>
                                </xs:element>
                              </xs:all>
                              <xs:attribute name="id" type="xs:integer" use="optional">
                                <xs:annotation>
                                  <xs:documentation>The Id of the promotion which utilized the code.</xs:documentation>
                                </xs:annotation>
                              </xs:attribute>
                              <xs:attribute name="instance" type="xs:integer" use="optional">
                                <xs:annotation>
                                  <xs:documentation>The instance number, for the promotion which utilized the code.</xs:documentation>
                                </xs:annotation>
                              </xs:attribute>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                  </xs:all>
                  <xs:attribute name="code" type="xs:string" use="optional">
                    <xs:annotation>
                      <xs:documentation>The coupon code.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="utilized" type="xs:boolean" use="optional">
                    <xs:annotation>
                      <xs:documentation>A flag indicating whether the code has been utilized by a promotion.  A code is deemed to be utilized where a promotion has been applied to the basket, and that promotion has a criteria defined that is matched against the code.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="reportingcode" type="xs:string" use="optional">
                    <xs:annotation>
                      <xs:documentation>Where specified, the reporting code defined against the coupon.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="issued" type="xs:boolean" use="optional">
                    <xs:annotation>
                      <xs:documentation>A flag indicating whether the code has been issud by a promotion.  Only the 'IssueVoucherCode' promotion type may issue coupon codes against a basket.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="issueconfirmed" type="xs:boolean" use="optional">
                    <xs:annotation>
                      <xs:documentation>A flag indicating whether the code has been confirmed as issued against this basket.  Unconfirmed codes issued against a basket will not be available to be utilized.  Issued codes are confirmed when the basket request 'confirmed' flag is set to true.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="utilizeconfirmed" type="xs:boolean" use="optional">
                    <xs:annotation>
                      <xs:documentation>A flag indicating whether the utilization of the code has been confirmed.  Unconfirmed utilizations will not be logged against the code, and any maximum uses for the code will not be affected.  Utilizations are confirmed when the basket request 'confirmed' flag is set to true.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="frompreviousiteration" type="xs:boolean" use="optional">
                    <xs:annotation>
                      <xs:documentation>A flag indicating whether the code was issued or utilized by a previously confirmed instance of the basket.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="issuedbypromotion" type="xs:integer" use="optional">
                    <xs:annotation>
                      <xs:documentation>The Id of the 'IssueVoucherCode' type promotion which issued the code.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="issuedbypromotioninstance" type="xs:integer" use="optional">
                    <xs:annotation>
                      <xs:documentation>The instance number, for the promotion which issued the code.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="issuedcodemaximumuses" type="xs:integer" use="optional">
                    <xs:annotation>
                      <xs:documentation>The maximum number of uses for the issued code.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="locksinuse" type="xs:boolean" use="optional">
                    <xs:annotation>
                      <xs:documentation>Flag indicating whether uses for codes of the coupon will be tracked and the code use locked until the transaction is confirmed, or the lock release time is exceeded.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="locksactive" type="xs:integer" use="optional">
                    <xs:annotation>
                      <xs:documentation>Where locks are in use - the count of locks currently active for the code.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="lockreleasetime" type="xs:integer" use="optional">
                    <xs:annotation>
                      <xs:documentation>Where locks are in use - the time in minutes that a lock for a code will be held since the most recent submission.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element minOccurs="0" maxOccurs="1" name="items">
          <xs:complexType>
            <xs:sequence>
              <xs:element minOccurs="0" maxOccurs="unbounded" name="item">
                <xs:complexType>
                  <xs:all>
                    <xs:element minOccurs="0" maxOccurs="1" name="description" type="xs:string">
                      <xs:annotation>
                        <xs:documentation>Where available, the description of the product for this basket item.</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element minOccurs="0" maxOccurs="1" name="giftcard">
                      <xs:complexType>
                        <xs:all>
                          <xs:element minOccurs="0" maxOccurs="1" name="message">
                            <xs:annotation>
                              <xs:documentation>The message text</xs:documentation>
                            </xs:annotation>
                            <xs:complexType>
                              <xs:simpleContent>
                                <xs:extension base="xs:string">
                                  <xs:attribute name="code" type="xs:string" use="optional">
                                    <xs:annotation>
                                      <xs:documentation>The code for the message</xs:documentation>
                                    </xs:annotation>
                                  </xs:attribute>
                                </xs:extension>
                              </xs:simpleContent>
                            </xs:complexType>
                          </xs:element>
                        </xs:all>
                        <xs:attribute name="status" use="optional">
                          <xs:annotation>
                            <xs:documentation>The status for the gift card processing result</xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:enumeration value="NotSpecified" />
                              <xs:enumeration value="Invalid" />
                              <xs:enumeration value="Activated" />
                              <xs:enumeration value="Allocated" />
                              <xs:enumeration value="ToActivateOnBasketConfirm" />
                              <xs:enumeration value="ToAllocateOnBasketConfirm" />
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:attribute>
                        <xs:attribute name="expirydate" type="xs:dateTime" use="optional">
                          <xs:annotation>
                            <xs:documentation>Where available, the expiry date for the gift card</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="newbalance" type="xs:decimal" use="optional">
                          <xs:annotation>
                            <xs:documentation>Where available, the new balance for the gift card</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="activationtoken" type="xs:string" use="optional">
                          <xs:annotation>
                            <xs:documentation>For Allocated card numbers, the token to be used when activating</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                      </xs:complexType>
                    </xs:element>
                    <xs:element minOccurs="0" maxOccurs="1" name="promotions">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element minOccurs="0" maxOccurs="unbounded" name="promotion">
                            <xs:complexType>
                              <xs:attribute name="id" type="xs:integer" use="optional">
                                <xs:annotation>
                                  <xs:documentation>The Id of the promotion applied to the basket item.</xs:documentation>
                                </xs:annotation>
                              </xs:attribute>
                              <xs:attribute name="discountamount" type="xs:decimal" use="optional">
                                <xs:annotation>
                                  <xs:documentation>Where applicable, the calculated discount for this promotion against the basket item.</xs:documentation>
                                </xs:annotation>
                              </xs:attribute>
                              <xs:attribute name="instance" type="xs:integer" use="optional">
                                <xs:annotation>
                                  <xs:documentation>The instance number of the promotion for this application.</xs:documentation>
                                </xs:annotation>
                              </xs:attribute>
                              <xs:attribute name="deliverylevel" type="xs:boolean" use="optional">
                                <xs:annotation>
                                  <xs:documentation>A flag indicating whether the promotion is applied to the delivery amount only.</xs:documentation>
                                </xs:annotation>
                              </xs:attribute>
                              <xs:attribute name="basketlevel" type="xs:boolean" use="optional">
                                <xs:annotation>
                                  <xs:documentation>A flag indicating whether the promotion is applied to the entire basket.</xs:documentation>
                                </xs:annotation>
                              </xs:attribute>
                              <xs:attribute name="issuedpoints" type="xs:decimal" use="optional">
                                <xs:annotation>
                                  <xs:documentation>The points issued by an 'IssuePoints' promotion against the basket item.</xs:documentation>
                                </xs:annotation>
                              </xs:attribute>
                              <xs:attribute name="forlineid" type="xs:integer" use="optional">
                                <xs:annotation>
                                  <xs:documentation>The Id of the basket item against which this promotion instance has been applied.</xs:documentation>
                                </xs:annotation>
                              </xs:attribute>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                  </xs:all>
                  <xs:attribute name="id" type="xs:integer" use="optional">
                    <xs:annotation>
                      <xs:documentation>A line number for the basket item.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="engineid" type="xs:integer" use="optional" />
                  <xs:attribute name="productcode" type="xs:string" use="optional">
                    <xs:annotation>
                      <xs:documentation>A product code to identify the product for this basket item.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="variantcode" type="xs:string" use="optional">
                    <xs:annotation>
                      <xs:documentation>Where applicable, the variant code of the product for this basket item.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="barcode" type="xs:string" use="optional">
                    <xs:annotation>
                      <xs:documentation>Where applicable, the barcode of the product for this basket item.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="price" type="xs:decimal" use="optional">
                    <xs:annotation>
                      <xs:documentation>The price at which the product is to be sold.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="manualdiscount" type="xs:decimal" use="optional">
                    <xs:annotation>
                      <xs:documentation>Where applicable, the manual discount (per item) applied to the product for this basket item.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="quantity" type="xs:integer" use="optional">
                    <xs:annotation>
                      <xs:documentation>The number of items being sold for this basket item.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="linepromotiondiscount" type="xs:decimal" use="optional">
                    <xs:annotation>
                      <xs:documentation>The total line level discounts applied by promotions to this basket item.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="alwaysexcluded" type="xs:boolean" use="optional">
                    <xs:annotation>
                      <xs:documentation>A flag indicating whether the basket item is configured to always be excluded from promotions.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="totaldiscount" type="xs:decimal" use="optional">
                    <xs:annotation>
                      <xs:documentation>The total line level discounts for this basket item, including manual and promotion discounts.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="originalprice" type="xs:decimal" use="optional">
                    <xs:annotation>
                      <xs:documentation>The price for this basket item provided with the basket request.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="originalquantity" type="xs:integer" use="optional">
                    <xs:annotation>
                      <xs:documentation>The quantity for this basket item provided with the basket request.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="originalamount" type="xs:decimal" use="optional">
                    <xs:annotation>
                      <xs:documentation>The line amount for this basket item provided with the basket request.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="appliedpromotioncount" type="xs:integer" use="optional" />
                  <xs:attribute name="splitfromlineid" type="xs:integer" use="optional">
                    <xs:annotation>
                      <xs:documentation>The Id of the item from which this basket item was split.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="isdelivery" type="xs:boolean" use="optional">
                    <xs:annotation>
                      <xs:documentation>A flag indicating whether the basket item is a delivery item.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="generated" type="xs:boolean" use="optional">
                    <xs:annotation>
                      <xs:documentation>A flag indicating whether the basket item was added during basket validation.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="totalissuedpoints" type="xs:decimal" use="optional">
                    <xs:annotation>
                      <xs:documentation>The total points issued to this basket item from 'IssuePoints' type promotions applied.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="lineamount" type="xs:decimal" use="optional">
                    <xs:annotation>
                      <xs:documentation>The amount of the basket item, including any discounts.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="isgiftcard" type="xs:boolean" use="optional">
                    <xs:annotation>
                      <xs:documentation>Flag indicating whether this line is a gift card line</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element minOccurs="0" maxOccurs="1" name="missedpromotions">
          <xs:complexType>
            <xs:sequence>
              <xs:element minOccurs="0" maxOccurs="unbounded" name="promotion">
                <xs:complexType>
                  <xs:all>
                    <xs:element minOccurs="0" maxOccurs="1" name="name" type="xs:string">
                      <xs:annotation>
                        <xs:documentation>The name of the missed promotion.</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element minOccurs="0" maxOccurs="1" name="displaytext" type="xs:string">
                      <xs:annotation>
                        <xs:documentation>The end-user description assigned to the promotion being reported as missed.</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element minOccurs="0" maxOccurs="1" name="unpublished" type="xs:boolean">
                      <xs:annotation>
                        <xs:documentation>Flag indicating whether the promotion is unpublished.</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element minOccurs="0" maxOccurs="1" name="missedpromotiondetail">
                      <xs:complexType>
                        <xs:all>
                          <xs:element minOccurs="0" maxOccurs="1" name="displaytext" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>Where defined, the Missed Promotions end-user/customer free text defined for the promotion.</xs:documentation>
                            </xs:annotation>
                          </xs:element>
                        </xs:all>
                        <xs:attribute name="reportingcode" type="xs:string" use="optional">
                          <xs:annotation>
                            <xs:documentation>Where applicable, the selected Missed Promotions reporting code for the promotion.</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                      </xs:complexType>
                    </xs:element>
                    <xs:element minOccurs="0" maxOccurs="1" name="action">
                      <xs:complexType>
                        <xs:all>
                          <xs:element minOccurs="0" maxOccurs="1" name="couponname" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>Where the 'type' property is configured to 'Issue_Coupon', the name of the coupon to issue a voucher code for.</xs:documentation>
                            </xs:annotation>
                          </xs:element>
                          <xs:element minOccurs="0" maxOccurs="1" name="actionitems">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element minOccurs="0" maxOccurs="unbounded" name="item">
                                  <xs:complexType>
                                    <xs:attribute name="type" use="optional">
                                      <xs:annotation>
                                        <xs:documentation>The type of the action item.</xs:documentation>
                                      </xs:annotation>
                                      <xs:simpleType>
                                        <xs:restriction base="xs:string">
                                          <xs:enumeration value="Product">
                                            <xs:annotation>
                                              <xs:documentation>Product</xs:documentation>
                                            </xs:annotation>
                                          </xs:enumeration>
                                          <xs:enumeration value="ProductAttribute">
                                            <xs:annotation>
                                              <xs:documentation>Product Attribute</xs:documentation>
                                            </xs:annotation>
                                          </xs:enumeration>
                                        </xs:restriction>
                                      </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="productcode" type="xs:string" use="optional">
                                      <xs:annotation>
                                        <xs:documentation>Where applicable, the product code for the product action item.</xs:documentation>
                                      </xs:annotation>
                                    </xs:attribute>
                                    <xs:attribute name="anyvariant" type="xs:boolean" use="optional">
                                      <xs:annotation>
                                        <xs:documentation>Flag indicating where the criteria is for a product with multiple variants, that any variant is permitted.</xs:documentation>
                                      </xs:annotation>
                                    </xs:attribute>
                                    <xs:attribute name="variantcode" type="xs:string" use="optional">
                                      <xs:annotation>
                                        <xs:documentation>Where applicable, the variant code for the product action item.</xs:documentation>
                                      </xs:annotation>
                                    </xs:attribute>
                                    <xs:attribute name="barcode" type="xs:string" use="optional">
                                      <xs:annotation>
                                        <xs:documentation>Where applicable, the barcode for the product action item.</xs:documentation>
                                      </xs:annotation>
                                    </xs:attribute>
                                    <xs:attribute name="name" type="xs:string" use="optional">
                                      <xs:annotation>
                                        <xs:documentation>Where the action 'type' is set to 'ProductAttribute', the name of the attribute.</xs:documentation>
                                      </xs:annotation>
                                    </xs:attribute>
                                    <xs:attribute name="value" type="xs:string" use="optional">
                                      <xs:annotation>
                                        <xs:documentation>Where the action 'type' is set to 'ProductAttribute', the value of the attribute.</xs:documentation>
                                      </xs:annotation>
                                    </xs:attribute>
                                    <xs:attribute name="matched" type="xs:boolean" use="optional">
                                      <xs:annotation>
                                        <xs:documentation>Flag indicating whether the item has been matched against the basket.</xs:documentation>
                                      </xs:annotation>
                                    </xs:attribute>
                                  </xs:complexType>
                                </xs:element>
                              </xs:sequence>
                            </xs:complexType>
                          </xs:element>
                        </xs:all>
                        <xs:attribute name="type" use="optional">
                          <xs:annotation>
                            <xs:documentation>The type of action to be performed when the promotion being reported as missed is applied successfully to a basket.</xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:enumeration value="Discount_AllMatchedItems">
                                <xs:annotation>
                                  <xs:documentation>The action details applies to all matched items</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="Discount_ProductGroupA">
                                <xs:annotation>
                                  <xs:documentation>The action details applies to matched products from Group A</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="Discount_ProductGroupB">
                                <xs:annotation>
                                  <xs:documentation>The action details applies to matched products from Group B</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="Discount_ProductGroupC">
                                <xs:annotation>
                                  <xs:documentation>The action details applies to matched products from Group C</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="Discount_ProductGroupD">
                                <xs:annotation>
                                  <xs:documentation>The action details applies to matched products from Group D</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="Discount_ProductGroupE">
                                <xs:annotation>
                                  <xs:documentation>The action details applies to matched products from Group E</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="Discount_SelectedProductGroups">
                                <xs:annotation>
                                  <xs:documentation>The action details applies to matched products from selected groups</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="Discount_DiscountItems">
                                <xs:annotation>
                                  <xs:documentation>The action details applies to the discount items</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="Discount_BasketIncludingDelivery">
                                <xs:annotation>
                                  <xs:documentation>The action details applies to the basket total including delivery</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="Discount_BasketExcludingDelivery">
                                <xs:annotation>
                                  <xs:documentation>The action details applies to the basket total excluding delivery</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="Discount_Delivery">
                                <xs:annotation>
                                  <xs:documentation>The action details applies to the delivery charge</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="Issue_Points">
                                <xs:annotation>
                                  <xs:documentation>The action details applies to issuing points</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="Issue_Coupon">
                                <xs:annotation>
                                  <xs:documentation>The action details applies to issuing a coupon code</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="Add_Product">
                                <xs:annotation>
                                  <xs:documentation>The action details applies to products to be added</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="Set_Attribute">
                                <xs:annotation>
                                  <xs:documentation>The action details applies to setting an attribute</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:attribute>
                        <xs:attribute name="attributetoken" type="xs:string" use="optional">
                          <xs:annotation>
                            <xs:documentation>Where the 'type' property is configured to 'Set_Attribute', the token for the attribute to be set.</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="attributevalue" type="xs:string" use="optional">
                          <xs:annotation>
                            <xs:documentation>Where the 'type' property is configured to 'Set_Attribute', the value for the attribute to be set.</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="coupontype" type="xs:string" use="optional" />
                        <xs:attribute name="details" use="optional">
                          <xs:annotation>
                            <xs:documentation>Where the 'type' property is configured to apply a discount, details on how the discount will be applied to the selected items.</xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:enumeration value="None">
                                <xs:annotation>
                                  <xs:documentation>The action details does not apply</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="CheapestItemFree">
                                <xs:annotation>
                                  <xs:documentation>The action details applies to setting the cheapest item to free</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="CheapestItemPercentageDiscount">
                                <xs:annotation>
                                  <xs:documentation>The action details applies to discounting the cheapest item by a percentage</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="CheapestItemFixedDiscount">
                                <xs:annotation>
                                  <xs:documentation>The action details applies to discounting the cheapest item by a fixed amount</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="CheapestItemFixedPrice">
                                <xs:annotation>
                                  <xs:documentation>The action details applies to setting the cheapest item to a fixed price</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="PercentageDiscount">
                                <xs:annotation>
                                  <xs:documentation>The action details applies to a percentage discount</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="FixedDiscount">
                                <xs:annotation>
                                  <xs:documentation>The action details applies to a fixed discount</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="BundleOrFixedPrice">
                                <xs:annotation>
                                  <xs:documentation>The action details applies to a bundles or fixed price</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="NewPrice">
                                <xs:annotation>
                                  <xs:documentation>The action details applies to a fixed price</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:attribute>
                        <xs:attribute name="issuesremaining" type="xs:integer" use="optional" />
                        <xs:attribute name="pointsfrom" type="xs:decimal" use="optional">
                          <xs:annotation>
                            <xs:documentation>Where the 'type' property is configured to 'Issue_Points', the minimum number of points to be issued.</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="percentage" type="xs:decimal" use="optional" />
                        <xs:attribute name="newprice" type="xs:decimal" use="optional">
                          <xs:annotation>
                            <xs:documentation>Where applicable, the percentage discount to be applied.</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="savefrom" type="xs:decimal" use="optional">
                          <xs:annotation>
                            <xs:documentation>The estimated saving if the promotion is applied.</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                      </xs:complexType>
                    </xs:element>
                    <xs:element minOccurs="0" maxOccurs="1" name="criteria">
                      <xs:complexType>
                        <xs:all>
                          <xs:element minOccurs="0" maxOccurs="1" name="criteriaitems">
                            <xs:complexType>
                              <xs:all>
                                <xs:element minOccurs="0" maxOccurs="1" name="criteriaitem">
                                  <xs:complexType>
                                    <xs:all>
                                      <xs:element minOccurs="0" maxOccurs="1" name="matcheditems">
                                        <xs:complexType>
                                          <xs:sequence>
                                            <xs:element minOccurs="0" maxOccurs="unbounded" name="item" type="xs:integer" />
                                          </xs:sequence>
                                        </xs:complexType>
                                      </xs:element>
                                    </xs:all>
                                    <xs:attribute name="type" use="optional">
                                      <xs:annotation>
                                        <xs:documentation>The type of the criteria item.</xs:documentation>
                                      </xs:annotation>
                                      <xs:simpleType>
                                        <xs:restriction base="xs:string">
                                          <xs:enumeration value="Product">
                                            <xs:annotation>
                                              <xs:documentation>Product</xs:documentation>
                                            </xs:annotation>
                                          </xs:enumeration>
                                          <xs:enumeration value="ProductAttribute">
                                            <xs:annotation>
                                              <xs:documentation>Product Attribute</xs:documentation>
                                            </xs:annotation>
                                          </xs:enumeration>
                                        </xs:restriction>
                                      </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="exclude" type="xs:boolean" use="optional">
                                      <xs:annotation>
                                        <xs:documentation>Flag indicating whether the criteria is an exclusion.</xs:documentation>
                                      </xs:annotation>
                                    </xs:attribute>
                                    <xs:attribute name="productcode" type="xs:string" use="optional">
                                      <xs:annotation>
                                        <xs:documentation>Where applicable, the product code for the product defined against the criteria.</xs:documentation>
                                      </xs:annotation>
                                    </xs:attribute>
                                    <xs:attribute name="anyvariant" type="xs:boolean" use="optional">
                                      <xs:annotation>
                                        <xs:documentation>Where applicable, Flag indicating whether to accept any variant for the product.</xs:documentation>
                                      </xs:annotation>
                                    </xs:attribute>
                                    <xs:attribute name="variantcode" type="xs:string" use="optional">
                                      <xs:annotation>
                                        <xs:documentation>Where applicable, the variant code for the product defined against the criteria.</xs:documentation>
                                      </xs:annotation>
                                    </xs:attribute>
                                    <xs:attribute name="barcode" type="xs:string" use="optional">
                                      <xs:annotation>
                                        <xs:documentation>Where applicable, the barcode for the product defined against the criteria.</xs:documentation>
                                      </xs:annotation>
                                    </xs:attribute>
                                    <xs:attribute name="name" type="xs:string" use="optional">
                                      <xs:annotation>
                                        <xs:documentation>Where applicable, the name of the product attribute.</xs:documentation>
                                      </xs:annotation>
                                    </xs:attribute>
                                    <xs:attribute name="value" type="xs:string" use="optional">
                                      <xs:annotation>
                                        <xs:documentation>Where applicable, the value of the product attribute.</xs:documentation>
                                      </xs:annotation>
                                    </xs:attribute>
                                    <xs:attribute name="matched" type="xs:boolean" use="optional">
                                      <xs:annotation>
                                        <xs:documentation>Flag indicating whether the criteria has been matched against the basket.</xs:documentation>
                                      </xs:annotation>
                                    </xs:attribute>
                                  </xs:complexType>
                                </xs:element>
                              </xs:all>
                              <xs:attribute name="fullymatched" type="xs:boolean" use="optional">
                                <xs:annotation>
                                  <xs:documentation>Flag indicating that the criteria item has been fully matched against the basket.</xs:documentation>
                                </xs:annotation>
                              </xs:attribute>
                              <xs:attribute name="source" use="optional">
                                <xs:annotation>
                                  <xs:documentation>The source of the criteria item from the promotion definition.</xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                    <xs:enumeration value="ProductCriteria">
                                      <xs:annotation>
                                        <xs:documentation>Product Criteria group</xs:documentation>
                                      </xs:annotation>
                                    </xs:enumeration>
                                    <xs:enumeration value="ProductGroupA">
                                      <xs:annotation>
                                        <xs:documentation>Product Criteria group A</xs:documentation>
                                      </xs:annotation>
                                    </xs:enumeration>
                                    <xs:enumeration value="ProductGroupB">
                                      <xs:annotation>
                                        <xs:documentation>Product Criteria group B</xs:documentation>
                                      </xs:annotation>
                                    </xs:enumeration>
                                    <xs:enumeration value="ProductGroupC">
                                      <xs:annotation>
                                        <xs:documentation>Product Criteria group C</xs:documentation>
                                      </xs:annotation>
                                    </xs:enumeration>
                                    <xs:enumeration value="DiscountItems">
                                      <xs:annotation>
                                        <xs:documentation>Discount Items group</xs:documentation>
                                      </xs:annotation>
                                    </xs:enumeration>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:attribute>
                              <xs:attribute name="onlymatcheditems" type="xs:boolean" use="optional">
                                <xs:annotation>
                                  <xs:documentation>Flag indicating that the criteria additional spend/quantity must be applied to the matched items.</xs:documentation>
                                </xs:annotation>
                              </xs:attribute>
                              <xs:attribute name="additionalspend" type="xs:decimal" use="optional">
                                <xs:annotation>
                                  <xs:documentation>Where applicable the additional spend required to satisfy the criteria.</xs:documentation>
                                </xs:annotation>
                              </xs:attribute>
                              <xs:attribute name="additionalqty" type="xs:decimal" use="optional">
                                <xs:annotation>
                                  <xs:documentation>Where applicable the additional quantity required to satisfy the criteria.</xs:documentation>
                                </xs:annotation>
                              </xs:attribute>
                              <xs:attribute name="allitems" type="xs:boolean" use="optional">
                                <xs:annotation>
                                  <xs:documentation>Flag indicating whether all criteria items have been returned.  For large number of criteria items, the response list may be truncated.</xs:documentation>
                                </xs:annotation>
                              </xs:attribute>
                            </xs:complexType>
                          </xs:element>
                        </xs:all>
                        <xs:attribute name="basketadditionalspend" type="xs:decimal" use="optional">
                          <xs:annotation>
                            <xs:documentation>Where applicable, the additional basket spend required to trigger the promotion.</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="totaladditionalspend" type="xs:decimal" use="optional">
                          <xs:annotation>
                            <xs:documentation>Where applicable, the additional spend required to trigger the promotion, including all criteria items and basket additional spend.</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                      </xs:complexType>
                    </xs:element>
                  </xs:all>
                  <xs:attribute name="id" type="xs:integer" use="optional">
                    <xs:annotation>
                      <xs:documentation>The Id of the promotion being reported as missed.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="yourref" type="xs:string" use="optional">
                    <xs:annotation>
                      <xs:documentation>A reference assigned to the promotion being reported as missed.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="reportingcode" type="xs:string" use="optional">
                    <xs:annotation>
                      <xs:documentation>A reporting code assigned to the promotion being reported as missed.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="type" use="optional">
                    <xs:annotation>
                      <xs:documentation>The type of the promotion being reported as missed.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:enumeration value="BASKETREDUCTION" />
                        <xs:enumeration value="BOGOF" />
                        <xs:enumeration value="BOGOR" />
                        <xs:enumeration value="BUNDLE" />
                        <xs:enumeration value="PRODUCTSREDUCTION" />
                        <xs:enumeration value="DEAL" />
                        <xs:enumeration value="DELIVERYREDUCTION" />
                        <xs:enumeration value="ISSUECOUPON" />
                        <xs:enumeration value="ISSUEPOINTS" />
                        <xs:enumeration value="FREEPRODUCT" />
                        <xs:enumeration value="WORKFLOWTRIGGER" />
                        <xs:enumeration value="MULTIBUY" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="display" type="xs:string" use="optional">
                    <xs:annotation>
                      <xs:documentation>Display text version of the promotion type.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="category" use="optional">
                    <xs:annotation>
                      <xs:documentation>The category of promotion being reported as missed.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:enumeration value="LineLevel">
                          <xs:annotation>
                            <xs:documentation>The missed promotion is line level</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="DeliveryLevel">
                          <xs:annotation>
                            <xs:documentation>The missed promotion is delivery level</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="BasketLevel">
                          <xs:annotation>
                            <xs:documentation>The missed promotion is basket level</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="IssuePoints">
                          <xs:annotation>
                            <xs:documentation>The missed promotion would issue points</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="IssueCoupon">
                          <xs:annotation>
                            <xs:documentation>The missed promotion would issue a coupon code</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="instance" type="xs:integer" use="optional">
                    <xs:annotation>
                      <xs:documentation>A unique incrementing number assigned to each instance of the same promotion that is being reported as missed.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="customsort" type="xs:decimal" use="optional">
                    <xs:annotation>
                      <xs:documentation>Where applicable, a custom sort value for the promotion being reported as missed.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="alwaysapply" type="xs:boolean" use="optional">
                    <xs:annotation>
                      <xs:documentation>A flag indicating whether the promotion being reported as missed is configured to be applied outside of the best deal calculations.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="whentoapply" use="optional">
                    <xs:annotation>
                      <xs:documentation>Where the promotion being reported as missed is configured as 'alwaysapply', provides a value indicating whether promotion will be applied before or after best deal calculations.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:enumeration value="BeforeBestDeal" />
                        <xs:enumeration value="AfterBestDeal" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element minOccurs="0" maxOccurs="1" name="selectlists">
          <xs:complexType>
            <xs:sequence>
              <xs:element minOccurs="0" maxOccurs="unbounded" name="selectlist">
                <xs:complexType>
                  <xs:all>
                    <xs:element minOccurs="0" maxOccurs="1" name="description" type="xs:string">
                      <xs:annotation>
                        <xs:documentation>The description to be presented to the end-user/customer to help them understand what to select.</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element minOccurs="0" maxOccurs="1" name="selectitem">
                      <xs:complexType>
                        <xs:attribute name="id" type="xs:integer" use="optional">
                          <xs:annotation>
                            <xs:documentation>The unique id for the select item in the list</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="type" use="optional">
                          <xs:annotation>
                            <xs:documentation>The type of the select item</xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:enumeration value="Product" />
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:attribute>
                        <xs:attribute name="isexisting" type="xs:boolean" use="optional">
                          <xs:annotation>
                            <xs:documentation>Flag indicating whether the item already exists in the basket.</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="productcode" type="xs:string" use="optional">
                          <xs:annotation>
                            <xs:documentation>Where applicable, the product code for the select list item</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="variantcode" type="xs:string" use="optional">
                          <xs:annotation>
                            <xs:documentation>Where applicable, the variant code for the select list item</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="isselected" type="xs:boolean" use="optional">
                          <xs:annotation>
                            <xs:documentation>Flag indicating whether this item was selected in the request</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="useexisting" type="xs:boolean" use="optional">
                          <xs:annotation>
                            <xs:documentation>Flag indicating whether the request selection indicated to use the existing item in the basket</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                      </xs:complexType>
                    </xs:element>
                  </xs:all>
                  <xs:attribute name="status" use="optional">
                    <xs:annotation>
                      <xs:documentation>The status of the select list, indicating whether action is needed by the integrated system.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:enumeration value="Pending" />
                        <xs:enumeration value="Complete" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="source" type="xs:string" use="optional">
                    <xs:annotation>
                      <xs:documentation>The source for the select list</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="promotionid" type="xs:integer" use="optional">
                    <xs:annotation>
                      <xs:documentation>Where available, the promotion id associated with the select list.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="quantitytoselect" type="xs:integer" use="optional">
                    <xs:annotation>
                      <xs:documentation>Where applicable, the quantity to be selected.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:all>
      <xs:attribute name="id" use="optional">
        <xs:annotation>
          <xs:documentation>A unique identifier for the basket.  This can be a transaction or session reference, or order identifier.  The id should be persisted for each submission of the basket.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="100" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="date" type="xs:dateTime" use="optional">
        <xs:annotation>
          <xs:documentation>The sale date and time for the transaction.  The date and time will be used to establish available promotions.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="confirmed" type="xs:boolean" use="optional">
        <xs:annotation>
          <xs:documentation>A flag indicating whether the basket is for a confirmed order.  When the confirmed flag is provided, any coupon codes that have been utilized or issued will be committed.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="customergroup" use="optional">
        <xs:annotation>
          <xs:documentation>The customer group supplied with the basket request.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="1000" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="customerid" use="optional">
        <xs:annotation>
          <xs:documentation>The customer ID supplied with the basket request.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="1000" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="channel" use="optional">
        <xs:annotation>
          <xs:documentation>The channel supplied with the basket request.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="1000" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="store" use="optional">
        <xs:annotation>
          <xs:documentation>The store supplied with the basket request.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="1000" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="storegroup" use="optional">
        <xs:annotation>
          <xs:documentation>The store group supplied with the basket request.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="1000" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="deliverymethod" use="optional">
        <xs:annotation>
          <xs:documentation>The delivery method supplied with the basket request.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="1000" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="manualdiscount" type="xs:decimal" use="optional">
        <xs:annotation>
          <xs:documentation>The manual discount supplied with the basket request.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="basketdiscount" type="xs:decimal" use="optional">
        <xs:annotation>
          <xs:documentation>The total basket level discount applied to the basket.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="linestotaldiscount" type="xs:decimal" use="optional">
        <xs:annotation>
          <xs:documentation>The total line level discount applied to the basket.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="linestotalpromotiondiscount" type="xs:decimal" use="optional">
        <xs:annotation>
          <xs:documentation>The total line level promotional discount applied to the basket.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="linestotalmanualdiscount" type="xs:decimal" use="optional">
        <xs:annotation>
          <xs:documentation>The total line level manual discount applied to the basket.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="totaldiscount" type="xs:decimal" use="optional">
        <xs:annotation>
          <xs:documentation>The total discount applied to the basket.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="baskettotal" type="xs:decimal" use="optional">
        <xs:annotation>
          <xs:documentation>The basket total.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="originalbaskettotal" type="xs:decimal" use="optional">
        <xs:annotation>
          <xs:documentation>The basket total supplied with the basket request.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="deliverymanualdiscount" type="xs:decimal" use="optional">
        <xs:annotation>
          <xs:documentation>The manual delivery price discount supplied with the basket request.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="deliveryprice" type="xs:decimal" use="optional">
        <xs:annotation>
          <xs:documentation>The delivery price including any applied discounts.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="deliverypromotiondiscount" type="xs:decimal" use="optional">
        <xs:annotation>
          <xs:documentation>The total promotional discount applied to the delivery.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="deliverytotaldiscount" type="xs:decimal" use="optional">
        <xs:annotation>
          <xs:documentation>The total discount applied to the delivery.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="deliveryoriginalprice" type="xs:decimal" use="optional">
        <xs:annotation>
          <xs:documentation>The delivery price supplied with the basket request.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="totalissuedpoints" type="xs:decimal" use="optional">
        <xs:annotation>
          <xs:documentation>The total number of points issued to the basket.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="currencycode" type="xs:string" use="optional">
        <xs:annotation>
          <xs:documentation>The currency code provided with the request</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:anyAttribute processContents="skip" />
    </xs:complexType>
  </xs:element>
</xs:schema>