<?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: Configure Promotions - Edit - request schema</xs:documentation>
    <xs:documentation>Edit a promotion</xs:documentation>
    <xs:documentation>Version 1.0 : 2018-10-01.  Initial schema creation</xs:documentation>
  </xs:annotation>
  <xs:element name="promotion">
    <xs:complexType>
      <xs:all>
        <xs:element minOccurs="0" maxOccurs="1" name="remoteusername" type="xs:string">
          <xs:annotation>
            <xs:documentation>Where available, the name of the user in the remote system.</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element minOccurs="1" maxOccurs="1" name="name">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:minLength value="1" />
              <xs:maxLength value="1000" />
            </xs:restriction>
          </xs:simpleType>
        </xs:element>
        <xs:element minOccurs="0" maxOccurs="1" name="yourreference">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:maxLength value="100" />
            </xs:restriction>
          </xs:simpleType>
        </xs:element>
        <xs:element minOccurs="1" maxOccurs="1" name="promotiongroupname">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:minLength value="1" />
              <xs:maxLength value="1000" />
            </xs:restriction>
          </xs:simpleType>
        </xs:element>
        <xs:element minOccurs="0" maxOccurs="1" name="reportingcode">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:maxLength value="50" />
            </xs:restriction>
          </xs:simpleType>
        </xs:element>
        <xs:element minOccurs="0" maxOccurs="1" name="description" type="xs:string" />
        <xs:element minOccurs="0" maxOccurs="1" name="enduserdescription" type="xs:string" />
        <xs:element minOccurs="0" maxOccurs="1" name="currencyforvalues">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:maxLength value="1000" />
            </xs:restriction>
          </xs:simpleType>
        </xs:element>
        <xs:element minOccurs="0" maxOccurs="1" name="details">
          <xs:complexType>
            <xs:all>
              <xs:element minOccurs="0" maxOccurs="1" name="selectfromlistdescription" type="xs:string">
                <xs:annotation>
                  <xs:documentation>Where applicable, when the customer is selecting from a list, provides text to assist them in their selection</xs:documentation>
                </xs:annotation>
              </xs:element>
              <xs:element minOccurs="0" maxOccurs="1" name="attributetoken" type="xs:string">
                <xs:annotation>
                  <xs:documentation>For promotion type(s):  Workflow Trigger</xs:documentation>
                  <xs:documentation>Indicates the token of the attribute to set as the result of applying the promotion.</xs:documentation>
                </xs:annotation>
              </xs:element>
              <xs:element minOccurs="0" maxOccurs="1" name="attributevalue" type="xs:string">
                <xs:annotation>
                  <xs:documentation>For promotion type(s):  Workflow Trigger</xs:documentation>
                  <xs:documentation>Indicates the value to set the attribute to as the result of applying the promotion.</xs:documentation>
                </xs:annotation>
              </xs:element>
              <xs:element minOccurs="0" maxOccurs="1" name="restrictnextpromotions">
                <xs:complexType>
                  <xs:attribute name="basketdiscounts" type="xs:boolean" use="optional" />
                  <xs:attribute name="deliverydiscounts" type="xs:boolean" use="optional" />
                  <xs:attribute name="issuevouchercodes" type="xs:boolean" use="optional" />
                  <xs:attribute name="issuepoints" type="xs:boolean" use="optional" />
                  <xs:attribute name="workflow" type="xs:boolean" use="optional" />
                </xs:complexType>
              </xs:element>
              <xs:element minOccurs="0" maxOccurs="1" name="overridepriceattributes">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element minOccurs="0" maxOccurs="unbounded" name="currency">
                      <xs:complexType>
                        <xs:all>
                          <xs:element minOccurs="0" maxOccurs="1" name="attributetoken" type="xs:string" />
                        </xs:all>
                        <xs:attribute name="code" type="xs:string" use="optional" />
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element minOccurs="0" maxOccurs="1" name="currencyvalues">
                <xs:complexType>
                  <xs:all>
                    <xs:element minOccurs="0" maxOccurs="1" name="minimumspend">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element minOccurs="0" maxOccurs="unbounded" name="currency">
                            <xs:complexType>
                              <xs:attribute name="value" type="xs:decimal" use="optional" />
                              <xs:attribute name="code" type="xs:string" use="optional" />
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element minOccurs="0" maxOccurs="1" name="maximumspend">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element minOccurs="0" maxOccurs="unbounded" name="currency">
                            <xs:complexType>
                              <xs:attribute name="value" type="xs:decimal" use="optional" />
                              <xs:attribute name="code" type="xs:string" use="optional" />
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element minOccurs="0" maxOccurs="1" name="limitcalculateddiscountto">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element minOccurs="0" maxOccurs="unbounded" name="currency">
                            <xs:complexType>
                              <xs:attribute name="value" type="xs:decimal" use="optional" />
                              <xs:attribute name="code" type="xs:string" use="optional" />
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element minOccurs="0" maxOccurs="1" name="valuediscount">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element minOccurs="0" maxOccurs="unbounded" name="currency">
                            <xs:complexType>
                              <xs:attribute name="value" type="xs:decimal" use="optional" />
                              <xs:attribute name="code" type="xs:string" use="optional" />
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element minOccurs="0" maxOccurs="1" name="newprice">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element minOccurs="0" maxOccurs="unbounded" name="currency">
                            <xs:complexType>
                              <xs:attribute name="value" type="xs:decimal" use="optional" />
                              <xs:attribute name="code" type="xs:string" use="optional" />
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element minOccurs="0" maxOccurs="1" name="bundleprice">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element minOccurs="0" maxOccurs="unbounded" name="currency">
                            <xs:complexType>
                              <xs:attribute name="value" type="xs:decimal" use="optional" />
                              <xs:attribute name="code" type="xs:string" use="optional" />
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                  </xs:all>
                </xs:complexType>
              </xs:element>
              <xs:element minOccurs="0" maxOccurs="1" name="ranges">
                <xs:annotation>
                  <xs:documentation>For promotion type(s):  Multi-buy</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:sequence>
                    <xs:element minOccurs="0" maxOccurs="unbounded" name="range">
                      <xs:complexType>
                        <xs:attribute name="minimumquantity" type="xs:integer" use="optional" />
                        <xs:attribute name="minimumspend" type="xs:decimal" use="optional" />
                        <xs:attribute name="discountpercentage" type="xs:decimal" use="optional" />
                        <xs:attribute name="discountvalue" type="xs:decimal" use="optional" />
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element minOccurs="0" maxOccurs="1" name="coupon">
                <xs:annotation>
                  <xs:documentation>For promotion type(s):  Issue Voucher Code</xs:documentation>
                  <xs:documentation>Provides details on which Voucher to issue codes from as a result of applying the promotion.</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:all>
                    <xs:element minOccurs="0" maxOccurs="1" name="name" type="xs:string" />
                    <xs:element minOccurs="0" maxOccurs="1" name="confirmeddescription" type="xs:string" />
                    <xs:element minOccurs="0" maxOccurs="1" name="notconfirmeddescription" type="xs:string" />
                    <xs:element minOccurs="0" maxOccurs="1" name="referafriend">
                      <xs:complexType>
                        <xs:all>
                          <xs:element minOccurs="0" maxOccurs="1" name="name" type="xs:string" />
                          <xs:element minOccurs="0" maxOccurs="1" name="description" type="xs:string" />
                        </xs:all>
                        <xs:attribute name="importexportkey" type="xs:string" use="optional" />
                      </xs:complexType>
                    </xs:element>
                  </xs:all>
                  <xs:attribute name="importexportkey" type="xs:string" use="optional" />
                  <xs:attribute name="maxissues" type="xs:integer" use="optional" />
                </xs:complexType>
              </xs:element>
              <xs:element minOccurs="0" maxOccurs="1" name="points">
                <xs:annotation>
                  <xs:documentation>For promotion type(s):  Issue Points</xs:documentation>
                  <xs:documentation>Provides details on how to calculate points to be returned with a basket as a result of applying the promotion.</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:attribute name="method" use="optional">
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:enumeration value="Fixed">
                          <xs:annotation>
                            <xs:documentation>The promotion will issue a fixed number of points</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="BasketValue">
                          <xs:annotation>
                            <xs:documentation>The promotion will issue points calculated from the basket value (including delivery)</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="BasketValueExcludingDelivery">
                          <xs:annotation>
                            <xs:documentation>The promotion will issue points calculated from the basket value excluding delivery</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="MatchedCriteriaItemsValue">
                          <xs:annotation>
                            <xs:documentation>The promotion will issue points calculated from the value of the matched items</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="DeliveryValue">
                          <xs:annotation>
                            <xs:documentation>The promotion will issue points calculated from the delivery value</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="points" type="xs:decimal" use="optional" />
                  <xs:attribute name="decimalplaces" type="xs:integer" use="optional" />
                  <xs:attribute name="usediscountedpricesinpointcalculation" type="xs:boolean" use="optional" />
                  <xs:attribute name="includeapportionedbasketdiscounts" type="xs:boolean" use="optional" />
                  <xs:attribute name="useloyaltyscheme" type="xs:boolean" use="optional" />
                  <xs:attribute name="overrideschemepoints" type="xs:boolean" use="optional" />
                </xs:complexType>
              </xs:element>
              <xs:element minOccurs="0" maxOccurs="1" name="restrictions">
                <xs:complexType>
                  <xs:attribute name="totaluses" type="xs:integer" use="optional" />
                  <xs:attribute name="usesperbasket" type="xs:integer" use="optional" />
                  <xs:attribute name="restrictionrule" use="optional">
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:enumeration value="NoRestriction">
                          <xs:annotation>
                            <xs:documentation>There are no restrictions on the number of times this promotion can be applied</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="PerCustomer">
                          <xs:annotation>
                            <xs:documentation>The promotion will be applied only n-times per customer</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="PerCouponCode">
                          <xs:annotation>
                            <xs:documentation>The promotion will only be applied n-times per coupon code</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="PerCustomerAndCouponCode">
                          <xs:annotation>
                            <xs:documentation>The promotion will only be applied n-times per customer and coupon code</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="restrictionvalue" type="xs:integer" use="optional" />
                  <xs:attribute name="requirecustomer" type="xs:boolean" use="optional" />
                  <xs:attribute name="countmultipleusesperbasket" type="xs:boolean" use="optional" />
                </xs:complexType>
              </xs:element>
              <xs:element minOccurs="0" maxOccurs="1" name="missedpromotions">
                <xs:complexType>
                  <xs:all>
                    <xs:element minOccurs="0" maxOccurs="1" name="reportingcode" type="xs:string" />
                    <xs:element minOccurs="0" maxOccurs="1" name="enduserdescription" type="xs:string" />
                  </xs:all>
                  <xs:attribute name="excluded" type="xs:boolean" use="optional" />
                  <xs:attribute name="customweighting" type="xs:decimal" use="optional" />
                </xs:complexType>
              </xs:element>
            </xs:all>
            <xs:attribute name="action" use="optional">
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:enumeration value="NotApplicable">
                    <xs:annotation>
                      <xs:documentation>Not applicable</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="ReduceAll">
                    <xs:annotation>
                      <xs:documentation>All matched items will be reduced.</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="CheapestItemFree">
                    <xs:annotation>
                      <xs:documentation>The cheapest matched item will have a 100% discount applied.</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="BundlePrice">
                    <xs:annotation>
                      <xs:documentation>The matched criteria items will be discounted such that their combined prices equal the 'bundleprice'.</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="ReduceCheapest">
                    <xs:annotation>
                      <xs:documentation>The cheapest item will be discounted by the specified percentage or value.</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="ReduceCheapestToNewPrice">
                    <xs:annotation>
                      <xs:documentation>The cheapest item will be discounted such that its new price equals the 'newprice'.</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="IssueVoucherCode">
                    <xs:annotation>
                      <xs:documentation>A voucher code will be issued to the basket.</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="IssuePoints">
                    <xs:annotation>
                      <xs:documentation>Points will be issued to the basket.</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="AddFreeGift">
                    <xs:annotation>
                      <xs:documentation>The discount product(s) will be added to the basket with a 100% discount.</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="SetAttribute">
                    <xs:annotation>
                      <xs:documentation>The specified attribute will be updated or appended with the given value.</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="ReducePerItem">
                    <xs:annotation>
                      <xs:documentation>Each matched item will be discounted by the specified percentage or value</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="OverridePriceFromAttribute">
                    <xs:annotation>
                      <xs:documentation>Override the line item price with a new price from a product attribute</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="appliesto" use="optional">
              <xs:annotation>
                <xs:documentation>For all basket, delivery, and line level discount, and Workflow Trigger promotion type(s)</xs:documentation>
                <xs:documentation>Indicates what will be affected within the basket when the promotion is applied.</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:enumeration value="NotApplicable">
                    <xs:annotation>
                      <xs:documentation>The applies to is not applicable for the selected promotion type</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="MatchedCriteriaItems">
                    <xs:annotation>
                      <xs:documentation>The matched criteria items will have the discount applied</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="DiscountItems">
                    <xs:annotation>
                      <xs:documentation>The matched items from the discount group will have the discount applied</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="DiscountItemsAllInBasket">
                    <xs:annotation>
                      <xs:documentation>All matched items in the basket will have the discount applied</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="DiscountItemsCheapestInBasket">
                    <xs:annotation>
                      <xs:documentation>The cheapest matched item in the basket will have the discount applied</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="ProductCriteriaGroup1">
                    <xs:annotation>
                      <xs:documentation>The discount will be applied to the matched item from product group 1</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="ProductCriteriaGroup2">
                    <xs:annotation>
                      <xs:documentation>The discount will be applied to the matched item from product group 2</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="ProductCriteriaGroup3">
                    <xs:annotation>
                      <xs:documentation>The discount will be applied to the matched item from product group 3</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="Delivery">
                    <xs:annotation>
                      <xs:documentation>The discount will be applied to the delivery amount</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="Basket">
                    <xs:annotation>
                      <xs:documentation>The discount will be applied to the basket total</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="All">
                    <xs:annotation>
                      <xs:documentation>The discount will be applied to all items in the basket</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="DiscountItemsInSelectedGroups">
                    <xs:annotation>
                      <xs:documentation>The discount will be applied to the matched item from selected product group(s)</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="ProductCriteriaGroup4">
                    <xs:annotation>
                      <xs:documentation>The discount will be applied to the matched item from product group 4</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="ProductCriteriaGroup5">
                    <xs:annotation>
                      <xs:documentation>The discount will be applied to the matched item from product group 5</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="discounttype" use="optional">
              <xs:annotation>
                <xs:documentation>For all basket, delivery, and line level discount promotion type(s)</xs:documentation>
                <xs:documentation>Indicates whether to apply a percentage or value discount when the promotion is applied.</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:enumeration value="NotApplicable">
                    <xs:annotation>
                      <xs:documentation>The selected promotion type does not give a discount (eg, Issue Points)</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="PercentageDiscount">
                    <xs:annotation>
                      <xs:documentation>The selected promotion gives a percentage discount</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="FixedDiscount">
                    <xs:annotation>
                      <xs:documentation>The selected promotion gives a fixed discount</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="percentagediscount" type="xs:decimal" use="optional" />
            <xs:attribute name="limitcalculateddiscountto" type="xs:decimal" use="optional" />
            <xs:attribute name="valuediscount" type="xs:decimal" use="optional">
              <xs:annotation>
                <xs:documentation>For promotion type(s): Buy one get one reduced, Product % or Value Off, Deal Price, Basket % or Value Off, Delivery % or Value Off</xs:documentation>
                <xs:documentation>Where a value discount is to be applied by the promotion, indicates the amount of discount value to apply to the target items.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="bundleprice" type="xs:decimal" use="optional">
              <xs:annotation>
                <xs:documentation>For promotion type(s): Bundle Price, Deal Price</xs:documentation>
                <xs:documentation>Indicates the new total price to use for the target items.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="newprice" type="xs:decimal" use="optional">
              <xs:annotation>
                <xs:documentation>For promotion type(s): Buy one get one reduced, Deal Price</xs:documentation>
                <xs:documentation>Indicates the new price to use for the target item(s).</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="onlywhenproductsnotfound" type="xs:boolean" use="optional">
              <xs:annotation>
                <xs:documentation>For promotion type(s): Free Gift</xs:documentation>
                <xs:documentation>For the Free Gift promotion type, indicates whether to only apply the promotion when the product(s) to be provided free are not found in the basket.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="alwaysaddfreeproducts" type="xs:boolean" use="optional">
              <xs:annotation>
                <xs:documentation>For promotion type(s): Free Gift</xs:documentation>
                <xs:documentation>For the Free Gift promotion type, indicates whether to always add the product(s) to be provided free.  Where this flag is not set to true the Free Gift promotion will use product(s) in the basket where they already exist.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="includefreegiftinspendcalc" type="xs:boolean" use="optional">
              <xs:annotation>
                <xs:documentation>Where applicable, when applying the free gift promotion and where a basket level spend qualification is in use, indicate whether the free gift product(s) should be included in the spend qualification calculation</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="selectfromlist" type="xs:boolean" use="optional">
              <xs:annotation>
                <xs:documentation>Where applicable, indicates whether the customer must select from a list before the promotion is applied</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="selectfromlistquantity" type="xs:integer" use="optional">
              <xs:annotation>
                <xs:documentation>Where applicable, when the customer selecting from a list, indicates the quantity of items the customer must select</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="apportiondiscount" use="optional">
              <xs:annotation>
                <xs:documentation>For promotion type(s): Buy one get one free, Buy one get one reduced, Deal Price</xs:documentation>
                <xs:documentation>Indicates how to apportion the discount against the lines to be discounted.</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:enumeration value="NotApplicable">
                    <xs:annotation>
                      <xs:documentation>The selected promotion type does not give a discount that can be apportioned</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="AcrossItems">
                    <xs:annotation>
                      <xs:documentation>The discount for the selected promotion will be apportioned across all matched items</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="SecondItem">
                    <xs:annotation>
                      <xs:documentation>The discount for the selected promotion (BOGOF/BOGOR) will be applied to the second item</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="validationmethod" use="optional">
              <xs:annotation>
                <xs:documentation>For promotion type(s): Multi-buy</xs:documentation>
                <xs:documentation>Indicates whether to validate for spend or quantity.</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:enumeration value="NotApplicable">
                    <xs:annotation>
                      <xs:documentation>The current settings have no applicable validation methods for qualifying items</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="ValidateQuantity">
                    <xs:annotation>
                      <xs:documentation>The qualifying items will be validated by quantity</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="ValidateSpend">
                    <xs:annotation>
                      <xs:documentation>The qualifying items will be validated by spend</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="applymultipletimes" type="xs:boolean" use="optional">
              <xs:annotation>
                <xs:documentation>For all line level discount, Issue Voucher Code, Issue Points, Free Gift and Workflow Trigger promotion type(s)</xs:documentation>
                <xs:documentation>Indicates whether the promotion can be applied multiple times to a basket.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="minimumspend" type="xs:decimal" use="optional">
              <xs:annotation>
                <xs:documentation>For promotion type(s): Deal Price, Basket % or Value off, Delivery % or Value off, Issue Voucher Code, Issue Points, Free Gift, Workflow Trigger</xs:documentation>
                <xs:documentation>Indicates a minimum basket spend threshold to be validated before applying the promotion.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="maximumspend" type="xs:decimal" use="optional">
              <xs:annotation>
                <xs:documentation>For promotion type(s): Free Gift</xs:documentation>
                <xs:documentation>Indicates a maximum basket spend threshold to be validated before applying the promotion.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="includedeliveryinspendvalidation" type="xs:boolean" use="optional">
              <xs:annotation>
                <xs:documentation>For promotion type(s): Deal Price, Basket % or Value off, Delivery % or Value off, Issue Voucher Code, Issue Points, Free Gift, Workflow Trigger</xs:documentation>
                <xs:documentation>When validating spend thresholds, indicates whether to include delivery within the total spend.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="usediscountedpricesinspendvalidation" type="xs:boolean" use="optional">
              <xs:annotation>
                <xs:documentation>For promotion type(s): Basket % or Value off, Delivery % or Value off, Issue Voucher Code, Issue Points, Free Gift, Workflow Trigger</xs:documentation>
                <xs:documentation>When validating spend thresholds, indicates whether to include previously applied discounts within the total spend.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="includedeliverywhendiscounting" type="xs:boolean" use="optional">
              <xs:annotation>
                <xs:documentation>For promotion type(s): Basket % or Value off</xs:documentation>
                <xs:documentation>Indicates whether to discount the delivery along with all other items in the basket when applying the promotion.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="reusequalificationitems" type="xs:boolean" use="optional">
              <xs:annotation>
                <xs:documentation>For promotion type(s): Buy one get one free, Buy one get one reduced, Product % or Value Off, Deal Price.  Indicates whether basket products used to establish whether the promotion should be applied, but have not been discounts, are available to be used by other line level promotions.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="overridepriceinvalidvalue" use="optional">
              <xs:annotation>
                <xs:documentation>For promotion type(s): Product % or Value Off</xs:documentation>
                <xs:documentation>Indicates how to proceed with an invalid or missing attribute value.</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:enumeration value="NotApplicable">
                    <xs:annotation>
                      <xs:documentation>The selected promotion type does not support overriding the price, or the override price option is not selected.</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="DoNotApplyPromotion">
                    <xs:annotation>
                      <xs:documentation>Do not apply the promotion where the value for the selected attribute is missing or invalid</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="UseZeroPrice">
                    <xs:annotation>
                      <xs:documentation>Use a zero price where the value for the selected attribute is missing or invalid</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="overridepriceisexclusive" type="xs:boolean" use="optional">
              <xs:annotation>
                <xs:documentation>For promotion type(s): Product % or Value Off</xs:documentation>
                <xs:documentation>Indicates whether the override price promotion should be regarded as exclusive and have priority over any other promotion that could be applied to the line.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="permitcodereuse" type="xs:boolean" use="optional">
              <xs:annotation>
                <xs:documentation>Only applicable to line-level promotions.  Flag indicating whether to permit a voucher or coupon code to be reused for all iterations of a promotion within a basket.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
        <xs:element minOccurs="0" maxOccurs="1" name="collateral">
          <xs:complexType>
            <xs:sequence>
              <xs:element minOccurs="0" maxOccurs="unbounded" name="item">
                <xs:complexType>
                  <xs:all>
                    <xs:element minOccurs="0" maxOccurs="1" name="attributetoken" type="xs:string" />
                    <xs:element minOccurs="0" maxOccurs="1" name="value" type="xs:string" />
                    <xs:element minOccurs="0" maxOccurs="1" name="data" type="xs:string" />
                  </xs:all>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element minOccurs="0" maxOccurs="1" name="criteria">
          <xs:complexType>
            <xs:all>
              <xs:element minOccurs="0" maxOccurs="1" name="basketcriteria">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element minOccurs="0" maxOccurs="unbounded" name="criteriaitem">
                      <xs:complexType>
                        <xs:all>
                          <xs:element minOccurs="0" maxOccurs="1" name="attributetoken" type="xs:string" />
                          <xs:element minOccurs="0" maxOccurs="1" name="value" type="xs:string" />
                          <xs:element minOccurs="0" maxOccurs="1" name="formula">
                            <xs:complexType>
                              <xs:all>
                                <xs:element minOccurs="0" maxOccurs="1" name="value" type="xs:string">
                                  <xs:annotation>
                                    <xs:documentation>Where appropriate, the fixed value to compare the attribute value against, using the defined operator</xs:documentation>
                                  </xs:annotation>
                                </xs:element>
                                <xs:element minOccurs="0" maxOccurs="1" name="function" type="xs:string">
                                  <xs:annotation>
                                    <xs:documentation>Where appropriate, the name of the function to be used to calculate the comparison value.  For a full list on supported function names please refer to the Qixol Promo Help documentation.</xs:documentation>
                                  </xs:annotation>
                                </xs:element>
                                <xs:element minOccurs="0" maxOccurs="1" name="functionparametervalues">
                                  <xs:annotation>
                                    <xs:documentation>Where appropriate, parameter values for the selected function</xs:documentation>
                                  </xs:annotation>
                                  <xs:complexType>
                                    <xs:sequence>
                                      <xs:element minOccurs="0" maxOccurs="unbounded" name="value" type="xs:string" />
                                    </xs:sequence>
                                  </xs:complexType>
                                </xs:element>
                              </xs:all>
                              <xs:attribute name="valuetype" use="required">
                                <xs:annotation>
                                  <xs:documentation>The type of values provided for the attribute</xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                    <xs:enumeration value="Text" />
                                    <xs:enumeration value="Numeric" />
                                    <xs:enumeration value="Date" />
                                    <xs:enumeration value="DateTime" />
                                    <xs:enumeration value="Time" />
                                    <xs:enumeration value="Function" />
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:attribute>
                              <xs:attribute name="operator" use="required">
                                <xs:annotation>
                                  <xs:documentation>The operator to be used when comparing the provided attribute value against the fixed value or function result</xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                    <xs:enumeration value="NotEstablished" />
                                    <xs:enumeration value="Equals" />
                                    <xs:enumeration value="NotEquals" />
                                    <xs:enumeration value="GreaterThan" />
                                    <xs:enumeration value="GreaterThanOrEqualTo" />
                                    <xs:enumeration value="LessThan" />
                                    <xs:enumeration value="LessThanOrEqualTo" />
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:attribute>
                              <xs:attribute name="functionusesbasketdate" type="xs:boolean" use="optional">
                                <xs:annotation>
                                  <xs:documentation>Where appropriate, for functions that calculate a date, date/time or time value comparison value, indicates whether calculate from the basket date/time or the current date/time</xs:documentation>
                                </xs:annotation>
                              </xs:attribute>
                            </xs:complexType>
                          </xs:element>
                        </xs:all>
                        <xs:attribute name="exclude" type="xs:boolean" use="optional" />
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element minOccurs="0" maxOccurs="1" name="couponcriteria">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element minOccurs="0" maxOccurs="unbounded" name="criteriaitem">
                      <xs:complexType>
                        <xs:all>
                          <xs:element minOccurs="0" maxOccurs="1" name="name" type="xs:string" />
                        </xs:all>
                        <xs:attribute name="importexportkey" type="xs:string" use="optional" />
                        <xs:attribute name="exclude" type="xs:boolean" use="optional" />
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element minOccurs="0" maxOccurs="1" name="productcriteria">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element minOccurs="0" maxOccurs="unbounded" name="group">
                      <xs:complexType>
                        <xs:choice maxOccurs="unbounded">
                          <xs:element minOccurs="0" maxOccurs="1" name="currencyvalues">
                            <xs:complexType>
                              <xs:all>
                                <xs:element minOccurs="0" maxOccurs="1" name="minimumspend">
                                  <xs:complexType>
                                    <xs:sequence>
                                      <xs:element minOccurs="0" maxOccurs="unbounded" name="currency">
                                        <xs:complexType>
                                          <xs:attribute name="value" type="xs:decimal" use="optional" />
                                          <xs:attribute name="code" type="xs:string" use="optional" />
                                        </xs:complexType>
                                      </xs:element>
                                    </xs:sequence>
                                  </xs:complexType>
                                </xs:element>
                              </xs:all>
                            </xs:complexType>
                          </xs:element>
                          <xs:element minOccurs="0" maxOccurs="unbounded" name="criteriaitem">
                            <xs:complexType>
                              <xs:all>
                                <xs:element minOccurs="0" maxOccurs="1" name="productcode" type="xs:string" />
                                <xs:element minOccurs="0" maxOccurs="1" name="variantcode" type="xs:string" />
                                <xs:element minOccurs="0" maxOccurs="1" name="attributetoken" type="xs:string" />
                                <xs:element minOccurs="0" maxOccurs="1" name="value" type="xs:string" />
                                <xs:element minOccurs="0" maxOccurs="1" name="formula">
                                  <xs:complexType>
                                    <xs:all>
                                      <xs:element minOccurs="0" maxOccurs="1" name="value" type="xs:string">
                                        <xs:annotation>
                                          <xs:documentation>Where appropriate, the fixed value to compare the attribute value against, using the defined operator</xs:documentation>
                                        </xs:annotation>
                                      </xs:element>
                                      <xs:element minOccurs="0" maxOccurs="1" name="function" type="xs:string">
                                        <xs:annotation>
                                          <xs:documentation>Where appropriate, the name of the function to be used to calculate the comparison value.  For a full list on supported function names please refer to the Qixol Promo Help documentation.</xs:documentation>
                                        </xs:annotation>
                                      </xs:element>
                                      <xs:element minOccurs="0" maxOccurs="1" name="functionparametervalues">
                                        <xs:annotation>
                                          <xs:documentation>Where appropriate, parameter values for the selected function</xs:documentation>
                                        </xs:annotation>
                                        <xs:complexType>
                                          <xs:sequence>
                                            <xs:element minOccurs="0" maxOccurs="unbounded" name="value" type="xs:string" />
                                          </xs:sequence>
                                        </xs:complexType>
                                      </xs:element>
                                    </xs:all>
                                    <xs:attribute name="valuetype" use="required">
                                      <xs:annotation>
                                        <xs:documentation>The type of values provided for the attribute</xs:documentation>
                                      </xs:annotation>
                                      <xs:simpleType>
                                        <xs:restriction base="xs:string">
                                          <xs:enumeration value="Text" />
                                          <xs:enumeration value="Numeric" />
                                          <xs:enumeration value="Date" />
                                          <xs:enumeration value="DateTime" />
                                          <xs:enumeration value="Time" />
                                          <xs:enumeration value="Function" />
                                        </xs:restriction>
                                      </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="operator" use="required">
                                      <xs:annotation>
                                        <xs:documentation>The operator to be used when comparing the provided attribute value against the fixed value or function result</xs:documentation>
                                      </xs:annotation>
                                      <xs:simpleType>
                                        <xs:restriction base="xs:string">
                                          <xs:enumeration value="NotEstablished" />
                                          <xs:enumeration value="Equals" />
                                          <xs:enumeration value="NotEquals" />
                                          <xs:enumeration value="GreaterThan" />
                                          <xs:enumeration value="GreaterThanOrEqualTo" />
                                          <xs:enumeration value="LessThan" />
                                          <xs:enumeration value="LessThanOrEqualTo" />
                                        </xs:restriction>
                                      </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="functionusesbasketdate" type="xs:boolean" use="optional">
                                      <xs:annotation>
                                        <xs:documentation>Where appropriate, for functions that calculate a date, date/time or time value comparison value, indicates whether calculate from the basket date/time or the current date/time</xs:documentation>
                                      </xs:annotation>
                                    </xs:attribute>
                                  </xs:complexType>
                                </xs:element>
                              </xs:all>
                              <xs:attribute name="exclude" type="xs:boolean" use="optional" />
                            </xs:complexType>
                          </xs:element>
                        </xs:choice>
                        <xs:attribute name="group" type="xs:integer" use="optional" />
                        <xs:attribute name="estimatedmatchedproducts" type="xs:integer" use="optional" />
                        <xs:attribute name="validationmethod" use="optional">
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:enumeration value="NotApplicable">
                                <xs:annotation>
                                  <xs:documentation>The current settings have no applicable validation methods for qualifying items</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="ValidateQuantity">
                                <xs:annotation>
                                  <xs:documentation>The qualifying items will be validated by quantity</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="ValidateSpend">
                                <xs:annotation>
                                  <xs:documentation>The qualifying items will be validated by spend</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:attribute>
                        <xs:attribute name="minimumquantity" type="xs:integer" use="optional" />
                        <xs:attribute name="minimumspend" type="xs:decimal" use="optional" />
                        <xs:attribute name="itemmatching" use="optional">
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:enumeration value="NoRestriction">
                                <xs:annotation>
                                  <xs:documentation>There is no restriction on the items in a group that match the criteria</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="SameItems">
                                <xs:annotation>
                                  <xs:documentation>To match this group, all items must be the same</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="DifferentItems">
                                <xs:annotation>
                                  <xs:documentation>To match this group, all items must be different</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:attribute>
                        <xs:attribute name="discounttarget" type="xs:boolean" use="optional" />
                        <xs:attribute name="quantitytodiscount" type="xs:decimal" use="optional" />
                        <xs:attribute name="matchusing" use="optional">
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:enumeration value="NotApplicable">
                                <xs:annotation>
                                  <xs:documentation>There is no defined rule for matching products and/or attributes</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="SelectedProductsOrAttributes">
                                <xs:annotation>
                                  <xs:documentation>When matching products against the group criteria, products will be matched using the defined attribute criteria in combination with the selected products.</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="SelectedProductsAndAttributes">
                                <xs:annotation>
                                  <xs:documentation>When matching products against the group criteria, products may be matched using either the defined attribute criteria or the selected products.</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:attribute>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element minOccurs="0" maxOccurs="1" name="timebands">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element minOccurs="0" maxOccurs="unbounded" name="timeband">
                      <xs:complexType>
                        <xs:attribute name="start" type="xs:dateTime" use="optional" />
                        <xs:attribute name="end" type="xs:dateTime" use="optional" />
                        <xs:attribute name="saturday" type="xs:boolean" use="optional" />
                        <xs:attribute name="sunday" type="xs:boolean" use="optional" />
                        <xs:attribute name="monday" type="xs:boolean" use="optional" />
                        <xs:attribute name="tuesday" type="xs:boolean" use="optional" />
                        <xs:attribute name="wednesday" type="xs:boolean" use="optional" />
                        <xs:attribute name="thursday" type="xs:boolean" use="optional" />
                        <xs:attribute name="friday" type="xs:boolean" use="optional" />
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element minOccurs="0" maxOccurs="1" name="linkeditems">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element minOccurs="0" maxOccurs="unbounded" name="linkeditem">
                      <xs:complexType>
                        <xs:all>
                          <xs:element minOccurs="0" maxOccurs="1" name="value" type="xs:string" />
                        </xs:all>
                        <xs:attribute name="linkeditemtype" use="optional">
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:enumeration value="PROMOTION" />
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:attribute>
                        <xs:attribute name="id" type="xs:integer" use="optional" />
                        <xs:attribute name="exclude" type="xs:boolean" use="optional" />
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:all>
            <xs:attribute name="permittedproductgroups" type="xs:integer" use="optional" />
          </xs:complexType>
        </xs:element>
        <xs:element minOccurs="0" maxOccurs="1" name="discountitems">
          <xs:complexType>
            <xs:sequence>
              <xs:element minOccurs="0" maxOccurs="unbounded" name="discountitem">
                <xs:complexType>
                  <xs:all>
                    <xs:element minOccurs="0" maxOccurs="1" name="productcode" type="xs:string" />
                    <xs:element minOccurs="0" maxOccurs="1" name="variantcode" type="xs:string" />
                    <xs:element minOccurs="0" maxOccurs="1" name="attributetoken" type="xs:string" />
                    <xs:element minOccurs="0" maxOccurs="1" name="value" type="xs:string" />
                    <xs:element minOccurs="0" maxOccurs="1" name="formula">
                      <xs:complexType>
                        <xs:all>
                          <xs:element minOccurs="0" maxOccurs="1" name="value" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>Where appropriate, the fixed value to compare the attribute value against, using the defined operator</xs:documentation>
                            </xs:annotation>
                          </xs:element>
                          <xs:element minOccurs="0" maxOccurs="1" name="function" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>Where appropriate, the name of the function to be used to calculate the comparison value.  For a full list on supported function names please refer to the Qixol Promo Help documentation.</xs:documentation>
                            </xs:annotation>
                          </xs:element>
                          <xs:element minOccurs="0" maxOccurs="1" name="functionparametervalues">
                            <xs:annotation>
                              <xs:documentation>Where appropriate, parameter values for the selected function</xs:documentation>
                            </xs:annotation>
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element minOccurs="0" maxOccurs="unbounded" name="value" type="xs:string" />
                              </xs:sequence>
                            </xs:complexType>
                          </xs:element>
                        </xs:all>
                        <xs:attribute name="valuetype" use="required">
                          <xs:annotation>
                            <xs:documentation>The type of values provided for the attribute</xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:enumeration value="Text" />
                              <xs:enumeration value="Numeric" />
                              <xs:enumeration value="Date" />
                              <xs:enumeration value="DateTime" />
                              <xs:enumeration value="Time" />
                              <xs:enumeration value="Function" />
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:attribute>
                        <xs:attribute name="operator" use="required">
                          <xs:annotation>
                            <xs:documentation>The operator to be used when comparing the provided attribute value against the fixed value or function result</xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:enumeration value="NotEstablished" />
                              <xs:enumeration value="Equals" />
                              <xs:enumeration value="NotEquals" />
                              <xs:enumeration value="GreaterThan" />
                              <xs:enumeration value="GreaterThanOrEqualTo" />
                              <xs:enumeration value="LessThan" />
                              <xs:enumeration value="LessThanOrEqualTo" />
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:attribute>
                        <xs:attribute name="functionusesbasketdate" type="xs:boolean" use="optional">
                          <xs:annotation>
                            <xs:documentation>Where appropriate, for functions that calculate a date, date/time or time value comparison value, indicates whether calculate from the basket date/time or the current date/time</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                      </xs:complexType>
                    </xs:element>
                  </xs:all>
                  <xs:attribute name="exclude" type="xs:boolean" use="optional" />
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element minOccurs="0" name="displaytype">
          <xs:annotation>
            <xs:documentation>The 'displaytype' element is included in another schema where this object is defined, but is not used in this schema.</xs:documentation>
            <xs:documentation>To ensure the object can be passed between service methods without manipulation, 'displaytype' is also included here.</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element minOccurs="0" name="statistics">
          <xs:annotation>
            <xs:documentation>The 'statistics' element is included in another schema where this object is defined, but is not used in this schema.</xs:documentation>
            <xs:documentation>To ensure the object can be passed between service methods without manipulation, 'statistics' is also included here.</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip" />
            </xs:sequence>
            <xs:anyAttribute processContents="skip" />
          </xs:complexType>
        </xs:element>
      </xs:all>
      <xs:attribute name="id" type="xs:integer" use="optional" />
      <xs:attribute name="type" use="required">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="NotSpecified">
              <xs:annotation>
                <xs:documentation>No filter will be applied for this field.</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="BASKETREDUCTION">
              <xs:annotation>
                <xs:documentation>Basket % or Value Off</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="BOGOF">
              <xs:annotation>
                <xs:documentation>Buy one get one free</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="BOGOR">
              <xs:annotation>
                <xs:documentation>Buy one get one reduced</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="BUNDLE">
              <xs:annotation>
                <xs:documentation>Bundle Price</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="PRODUCTSREDUCTION">
              <xs:annotation>
                <xs:documentation>Product(s) % or value Off</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="DEAL">
              <xs:annotation>
                <xs:documentation>Deal Price</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="DELIVERYREDUCTION">
              <xs:annotation>
                <xs:documentation>Delivery Reduction</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="ISSUECOUPON">
              <xs:annotation>
                <xs:documentation>Issue Voucher Code</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="ISSUEPOINTS">
              <xs:annotation>
                <xs:documentation>Issue Points</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="FREEPRODUCT">
              <xs:annotation>
                <xs:documentation>Add Free Product(s)</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="WORKFLOWTRIGGER">
              <xs:annotation>
                <xs:documentation>Workflow Trigger</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="MULTIBUY">
              <xs:annotation>
                <xs:documentation>Multi-buy</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="validfrom" type="xs:dateTime" use="required" />
      <xs:attribute name="validto" type="xs:dateTime" use="required" />
      <xs:attribute name="alwaysapply" type="xs:boolean" use="optional" />
      <xs:attribute name="alwaysapplypass" use="optional">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="BeforeBestDeal" />
            <xs:enumeration value="AfterBestDeal" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="alwaysapplylast" type="xs:boolean" use="optional" />
      <xs:anyAttribute processContents="skip" />
    </xs:complexType>
  </xs:element>
</xs:schema>