<?xml version="1.0" encoding="utf-8"?>
<!--
        
        ** OAGIS® Revision: 9.1  **
        ** Date: 11 May 2007 **
        ** Copyright 1997-2007, All Rights Reserved **
        
        This is an OAGIS® BOD XML Schema (XSD) Definition.
        
       License information for this file is provided in the file **OAGi License Agreement.txt** that is provided with this download package.
        
        For support, more information, or to report implementation bugs, please contact the Open Applications Group at xml@openapplications.org.
        
        XML Schema 
        
-->
 
<!--
© Copyright 2007 Infor Global Solutions Technology GmbH and/or its affiliates and subsidiaries. All rights reserved. The 
word and design marks set forth herein are trademarks and/or registered trademarks of Infor Global Solutions 
Technology GmbH and/or its affiliates and subsidiaries. All rights reserved. All other trademarks listed herein 
are the property of their respective owners.
 
-->
 
<!--    *****     Update Log     *****
 
Date          By      Note
06/17/10      NIO     Replaced SoldToParty with a new EmployerReference as requested in JIRA BOD-1369
06/29/10      NIO     Added ContactReference and AssignedToPerson for JIRA BOD-1369

        *****     Update End     *****
 
-->


<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schema.infor.com/InforOAGIS/2"
    targetNamespace="http://schema.infor.com/InforOAGIS/2" elementFormDefault="qualified"
    attributeFormDefault="unqualified">

    <xsd:include schemaLocation="../Components/Common/Components.xsd"/>

    <xsd:element name="ContactMaster" type="ContactMasterType">
        <xsd:annotation>
            <xsd:documentation> ContactMasterType... </xsd:documentation>
        </xsd:annotation>
    </xsd:element>

    <xsd:complexType name="ContactMasterType">
        <xsd:complexContent>
            <xsd:extension base="StatusEnabledStandardHeaderType">
                <xsd:sequence>
                    <xsd:group ref="PersonNameGroup" minOccurs="0" maxOccurs="unbounded"/>
                    <xsd:element ref="JobTitle" minOccurs="0"/>
                    <xsd:element ref="Responsibility" minOccurs="0" maxOccurs="unbounded"/>
                    <xsd:element ref="DepartmentName" minOccurs="0"/>
                    <xsd:element ref="CommunicationDetail" minOccurs="0" maxOccurs="unbounded"/>
                    <xsd:element ref="CommunicationSummary" minOccurs="0" maxOccurs="unbounded"/>
                    <xsd:element ref="Classification" minOccurs="0" maxOccurs="unbounded"/>
                    <xsd:element ref="Preference" minOccurs="0"/>
                    <xsd:element ref="EmployerReference" minOccurs="0" maxOccurs="unbounded"/>
                    <xsd:element ref="Address" minOccurs="0"/>
                    <xsd:element ref="UserArea" minOccurs="0"/>
                    <xsd:element ref="ContactTask" minOccurs="0" maxOccurs="unbounded"/>
                    <xsd:element ref="ContactActivity" minOccurs="0" maxOccurs="unbounded"/>
                    <xsd:element ref="ContactReference" minOccurs="0" maxOccurs="unbounded"/>
                    <xsd:element ref="AssignedToPerson" minOccurs="0" maxOccurs="unbounded"/>
                    <xsd:element ref="GenderCode" minOccurs="0"/>
                    <xsd:element ref="MaritalStatusCode" minOccurs="0"/>
                    <xsd:element ref="BirthDateTime" minOccurs="0"/>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:complexType name="ParentContactMasterType">
        <xsd:sequence>
            <xsd:element ref="IDs" minOccurs="0"/>
            <xsd:element ref="Name" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="ContactReferenceType">
        <xsd:sequence>
            <xsd:element ref="IDs" minOccurs="0"/>
            <xsd:element ref="Name" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
        <xsd:attribute name="type" type="NormalizedStringType">
            <xsd:annotation>
                <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">Indicate the type
                    of contact (eg., Manager, Assistant, etc..)</xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
    </xsd:complexType>

    <xsd:complexType name="CommunicationDetailType">
        <xsd:complexContent>
            <xsd:extension base="CommunicationType">
                <xsd:sequence>
                    <xsd:element ref="DoNotCallIndicator" minOccurs="0"/>
                    <xsd:element ref="DoNotEMailIndicator" minOccurs="0"/>
                    <xsd:element ref="DefaultLanguageCode" minOccurs="0"/>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="CommunicationDetail" type="CommunicationDetailType"/>

    <xsd:complexType name="CommunicationSummaryType">
        <xsd:sequence>
            <xsd:element ref="ChannelCode" minOccurs="0"/>
            <xsd:element ref="UseCode" minOccurs="0"/>
            <xsd:element ref="DoNotUseIndicator" minOccurs="0"/>
            <xsd:element ref="PreferenceSequence" minOccurs="0"/>
        </xsd:sequence>
        <xsd:attribute name="preferredIndicator" type="IndicatorType"/>
    </xsd:complexType>
    <xsd:element name="CommunicationSummary" type="CommunicationSummaryType"/>

    <xsd:complexType name="ContactTaskType">
        <xsd:sequence>
            <xsd:element ref="ID" minOccurs="0" maxOccurs="unbounded"/>
            <xsd:element ref="Subject" minOccurs="0"/>
            <xsd:element ref="PriorityCode" minOccurs="0"/>
            <xsd:group ref="FreeFormTextGroup" minOccurs="0"/>
            <xsd:element ref="Status" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">Task status
                        such as in plannig, in prorgress, completed</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element ref="CategoryCodes" minOccurs="0"/>
            <xsd:element ref="PrivateIndicator" minOccurs="0"/>
            <xsd:element ref="ParentTaskID" minOccurs="0"/>
            <xsd:element ref="EscalationLevelCode" minOccurs="0"/>
            <xsd:element ref="PlannedTimePeriod" minOccurs="0"/>
            <xsd:element ref="ScheduledTimePeriod" minOccurs="0"/>
            <xsd:element ref="ActualTimePeriod" minOccurs="0"/>
            <xsd:element ref="CompletionPercent" minOccurs="0"/>
            <xsd:element ref="CompletedDuration" minOccurs="0"/>
            <xsd:element ref="PlannedEffortDuration" minOccurs="0"/>
            <xsd:element ref="ActualEffortDuration" minOccurs="0"/>
            <xsd:element ref="RepeatingFrequencyCode" minOccurs="0"/>
            <xsd:group ref="ReferencesGroup" minOccurs="0"/>
            <xsd:element ref="UserArea" minOccurs="0"/>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="ContactTask" type="ContactTaskType"/>

    <xsd:complexType name="ContactActivityType">
        <xsd:annotation>
            <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">Captures the Contact
                Activity.</xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element ref="ID" minOccurs="0" maxOccurs="unbounded"/>
            <xsd:element ref="DateTime" minOccurs="0"/>
            <xsd:element ref="MaterialRequested" minOccurs="0" maxOccurs="unbounded"/>
            <xsd:element ref="MaterialSent" minOccurs="0" maxOccurs="unbounded"/>
            <xsd:element ref="EmailResultCode" minOccurs="0"/>
            <xsd:element ref="RequestContactIndicator" minOccurs="0"/>
            <xsd:element ref="Result" minOccurs="0" maxOccurs="unbounded"/>
            <xsd:group ref="FreeFormTextGroup" minOccurs="0"/>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="ContactActivity" type="ContactActivityType"/>

    <xsd:element name="ParentContactMaster" type="ParentContactMasterType"/>
    <xsd:element name="DoNotCallIndicator" type="IndicatorType"/>
    <xsd:element name="DoNotEMailIndicator" type="IndicatorType"/>
    <xsd:element name="EmployerReference" type="DocumentReferenceType">
        <xsd:annotation>
            <xsd:documentation>A contact, in our definition, is someone who is not an employee. A
                contact is a person that can represent one or more customers or suppliers in a
                business transaction. A customer or a supplier can have a reference to 0 to many
                contacts. In this relationship then, a contact can be associated with multiple
                customers or suppliers. The purpose of the EmployerReference is a way to identify if
                the contact is actually employed by one of the suppliers or
            customers.</xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    <xsd:element name="ContactReference" type="ContactReferenceType"/>
    <xsd:element name="AssignedToPerson" type="PersonType"/>

    <xsd:element name="DoNotUseIndicator" type="IndicatorType"/>
    <xsd:element name="PreferenceSequence" type="PositiveIntegerNumericType"/>

</xsd:schema>
