Promotion Schedule Import/Export
All promotion classes support an optional promotion schedule that controls when a promotion is active.
The following is a snippet from the Promotion Schedule section of the promotion.xsd.
<xsd:complexType name="PromotionSchedule" mixed="false">
<xsd:sequence>
<xsd:element name="start-date" type="xsd:dateTime" minOccurs="0" maxOccurs="1" />
<xsd:element name="end-date" type="xsd:dateTime" minOccurs="0" maxOccurs="1" />
<xsd:element name="recurrence" type="PromotionSchedule.Recurrence" minOccurs="0" maxOccurs="1" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="PromotionSchedule.Recurrence" mixed="false">
<xsd:sequence>
<xsd:element name="day-of-week" type="PromotionSchedule.DayOfWeek" minOccurs="0" maxOccurs="1" />
<xsd:element name="time-of-day" type="PromotionSchedule.TimeOfDay" minOccurs="0" maxOccurs="1" />
</xsd:sequence>
</xsd:complexType>
This sample XML contains a schedule for the month of January (see start end date) that limits promotions to Monday, Friday, Saturday and Sunday between 9 AM and 7 PM (on those days).
<schedule>
<start-date>2008-01-01T13:32:01</start-date>
<end-date>2008-01-31T13:33:30</end-date>
<recurrence>
<day-of-week>
<weekday>Monday</weekday>
<weekday>Friday</weekday>
<weekday>Saturday</weekday>
<weekday>Sunday</weekday>
</day-of-week>
<time-of-day>
<time-from>09:00:00</time-from>
<time-to>19:00:00</time-to>
</time-of-day>
</recurrence>
</schedule>