<?xml version="1.0" encoding="UTF-8"?>
<!--
Ver.   Date                By                      Action 
1.0     2005-08-17     Mike Overholt    Original Release
-->
<schema targetNamespace="http://support.furnishnet.com/xml/schemas/fidx_ProdActivity_v1.0" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:fidxIIA="http://xml.FIDX.org/xml/schemas/fidxInvInqAdv_v1.3" xmlns:fnBase="http://support.furnishnet.com/xml/schemas/fnBase_v1.5" xmlns:fnItem="http://support.furnishnet.com/xml/schemas/fnItem_v1.5" xmlns:fnParty="http://support.furnishnet.com/xml/schemas/fnParty_v1.4" xmlns:fidx_PAD="http://support.furnishnet.com/xml/schemas/fidx_ProdActivity_v1.0" version="1.0">
	<import namespace="http://support.furnishnet.com/xml/schemas/fnBase_v1.5" schemaLocation="http://support.furnishnet.com/xml/schemas/fn_base_v1.5.xsd"/>
	<import namespace="http://support.furnishnet.com/xml/schemas/fnItem_v1.5" schemaLocation="http://support.furnishnet.com/xml/schemas/fn_item_v1.5.xsd"/>
	<import namespace="http://support.furnishnet.com/xml/schemas/fnParty_v1.4" schemaLocation="http://support.furnishnet.com/xml/schemas/fn_party_v1.4.xsd"/>
	<element name="productActivity" type="fidx_PAD:productActivityType">
		<annotation>
			<documentation>Root transaction element for Product Activity Data (852) schema.</documentation>
		</annotation>
	</element>
	<complexType name="productActivityType">
		<sequence>
			<element name="paHeader" type="fidx_PAD:paHeaderType"/>
			<choice>
				<element name="paSalesDataLine" type="fidx_PAD:paItemSalesDataType" maxOccurs="unbounded">
					<annotation>
						<documentation>Used to report actual sales of product by sender.</documentation>
					</annotation>
				</element>
				<element name="paInventoryAvailabilityLine" type="fidx_PAD:inventoryAvailabilityType" maxOccurs="unbounded">
					<annotation>
						<documentation>Used to report stock position for products being held in dedicated inventory by sender (for receiver).</documentation>
					</annotation>
				</element>
			</choice>
		</sequence>
	</complexType>
	<complexType name="paHeaderType">
		<sequence>
			<element name="document" type="fidx_PAD:paDocumentType">
				<annotation>
					<documentation>Standard FIDX document information element. Type attribute is fixed at "productActivity".</documentation>
				</annotation>
			</element>
			<element name="actionRequestIndicator" type="fnBase:actionRequestIndicatorType" minOccurs="0">
				<annotation>
					<documentation>Specifies that this document  issues an initial (create), update (change) or cancellation (cancel) of a prior transaction with the same transaction ID.</documentation>
				</annotation>
			</element>
			<element name="transactionHandlingCode" type="fidx_PAD:transactionHandlingCodeType">
				<annotation>
					<documentation>Indicates how the transaction is intended to be used: "shippedProductReport" indicates sales data for informational purposes only, "recommendedPurchaseOrder" indicates sales data to be used in generating a new PO / recommended PO, "inventoryAvailabilityReport" indicates current inventory position for dedicated product being held for the receiver (by the sender).</documentation>
				</annotation>
			</element>
			<element name="sender" type="fnParty:partyIdentificationType">
				<annotation>
					<documentation>The party that generated the transaction. Typically a manufacturer / vendor if the transactionHandlingCode is "inventoryAvailabilityReport", otherwise a reseller (customer)</documentation>
				</annotation>
			</element>
			<element name="receiver" type="fnParty:partyIdentificationType">
				<annotation>
					<documentation>The party that will receive / process the transaction.</documentation>
				</annotation>
			</element>
			<element name="salesLocation" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>Report can be generated in aggregate for the sender or for one or more of their specific locations (stores, warehouses, etc.)</documentation>
				</annotation>
				<complexType>
					<complexContent>
						<extension base="fnParty:partyIdentificationType">
							<attribute name="description" type="fnBase:locationType" use="optional"/>
							<attribute name="id" type="string" use="optional"/>
						</extension>
					</complexContent>
				</complexType>
			</element>
		</sequence>
		<attribute name="comment" type="string" use="optional"/>
	</complexType>
	<complexType name="paDocumentType">
		<complexContent>
			<restriction base="fnBase:documentType">
				<sequence>
					<element name="creationDate" type="date">
						<annotation>
							<documentation>The creation date of the transaction referred to by this element.  Format is CCYY-MM-DD.</documentation>
						</annotation>
					</element>
					<element name="creationTime" type="time" minOccurs="0">
						<annotation>
							<documentation>The time on creationDate that the document was created.  Format is HH:MM:SS.</documentation>
						</annotation>
					</element>
				</sequence>
				<attribute name="type" fixed="productActivity"/>
			</restriction>
		</complexContent>
	</complexType>
	<simpleType name="transactionHandlingCodeType">
		<restriction base="string">
			<enumeration value="shippedProductReport"/>
			<enumeration value="recommendedPurchaseOrder"/>
			<enumeration value="inventoryAvailabilityReport"/>
		</restriction>
	</simpleType>
	<complexType name="reportDatesType">
		<sequence>
			<element name="beginDate" type="date">
				<annotation>
					<documentation>Date sales were made (or begin date of a range).</documentation>
				</annotation>
			</element>
			<element name="endDate" type="date" minOccurs="0">
				<annotation>
					<documentation>End date of a range for reported sales (sales made on this date should be included in the quantity reported.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="paItemSalesDataType">
		<sequence>
			<element name="productID" type="fnItem:itemIdentifierType">
				<annotation>
					<documentation>Identifies the specific product being reported.</documentation>
				</annotation>
			</element>
			<element name="soldQuantity">
				<annotation>
					<documentation>Quantity of the specified product that was sold.</documentation>
				</annotation>
				<complexType>
					<complexContent>
						<extension base="fidx_PAD:quantityType">
							<sequence>
								<element name="salesLocation" minOccurs="0" maxOccurs="unbounded">
									<annotation>
										<documentation>Used to break down the total quantity sold by sales location.</documentation>
									</annotation>
									<complexType>
										<attribute name="salesLocationID" type="string" use="required"/>
										<attribute name="quantity" type="float" use="required"/>
									</complexType>
								</element>
							</sequence>
						</extension>
					</complexContent>
				</complexType>
			</element>
			<element name="salesDates" type="fidx_PAD:reportDatesType">
				<annotation>
					<documentation>Date (or date range) when reported quantity was sold.</documentation>
				</annotation>
			</element>
			<element name="salesDataSystemReference" type="fnBase:systemReferenceType" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>A system reference facilitates automated processing of the document by including data elements that are not necessarily part of a standard transaction but are required or desired by the computer systems of the trading partners.  Effective use of system references requires pre-arrangement between trading partners.  NOTE: this structure should not be used for data that is otherwise accommodated within a transaction schema.</documentation>
				</annotation>
			</element>
		</sequence>
		<attribute name="lineNumber" type="positiveInteger" use="required"/>
		<attribute name="comment" type="string" use="optional"/>
	</complexType>
	<complexType name="quantityType">
		<complexContent>
			<extension base="fnBase:quantityType"/>
		</complexContent>
	</complexType>
	<complexType name="tempType"/>
	<complexType name="inventoryAvailabilityType">
		<sequence>
			<element name="productID" type="fnItem:itemIdentifierType">
				<annotation>
					<documentation>Identifies the specific product being reported.</documentation>
				</annotation>
			</element>
			<element name="productAvailability" type="fidx_PAD:productAvailabilityType" maxOccurs="unbounded">
				<annotation>
					<documentation>Inventory level being reported.</documentation>
				</annotation>
			</element>
			<element name="inventoryAvailabilitySystemReference" type="fnBase:systemReferenceType" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>A system reference facilitates automated processing of the document by including data elements that are not necessarily part of a standard transaction but are required or desired by the computer systems of the trading partners.  Effective use of system references requires pre-arrangement between trading partners.  NOTE: this structure should not be used for data that is otherwise accommodated within a transaction schema.</documentation>
				</annotation>
			</element>
		</sequence>
		<attribute name="lineNumber" type="positiveInteger" use="optional"/>
		<attribute name="comment" type="string" use="optional"/>
	</complexType>
	<complexType name="productAvailabilityType">
		<sequence>
			<element name="availableQuantity" type="fnBase:quantityType">
				<annotation>
					<documentation>Inventory quantity being reported. Can be either current or planned inventory (see "availability" attribute of parent element).</documentation>
				</annotation>
			</element>
			<element name="availableDate" type="date" minOccurs="0">
				<annotation>
					<documentation>Only used if "availability" is set to "future" to indicate the planned in-stock date.</documentation>
				</annotation>
			</element>
			<element name="availableLocation" type="fidx_PAD:productLocationType" minOccurs="0">
				<annotation>
					<documentation>Specifies a location (warehouse / facility) where reported inventory is (will be) held.</documentation>
				</annotation>
			</element>
			<element name="productAvailabilitySystemReference" type="fnBase:systemReferenceType" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>A system reference facilitates automated processing of the document by including data elements that are not necessarily part of a standard transaction but are required or desired by the computer systems of the trading partners.  Effective use of system references requires pre-arrangement between trading partners.  NOTE: this structure should not be used for data that is otherwise accommodated within a transaction schema.</documentation>
				</annotation>
			</element>
		</sequence>
		<attribute name="availability" use="required">
			<simpleType>
				<restriction base="string">
					<enumeration value="current"/>
					<enumeration value="future"/>
				</restriction>
			</simpleType>
		</attribute>
	</complexType>
	<complexType name="productLocationType">
		<attribute name="locationQualifier" type="fnBase:locationType" use="required"/>
		<attribute name="salesLocationID" type="string" use="required"/>
	</complexType>
</schema>
