<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->

<entity-engine-xml>
    <!-- Marketing Manager security -->
    <SecurityGroupPermission fromDate="2001-05-13 12:00:00.0" groupId="FULLADMIN" permissionId="MARKETING_ADMIN"/>
    <SecurityGroupPermission fromDate="2001-05-13 12:00:00.0" groupId="FLEXADMIN" permissionId="MARKETING_CREATE"/>
    <SecurityGroupPermission fromDate="2001-05-13 12:00:00.0" groupId="FLEXADMIN" permissionId="MARKETING_DELETE"/>
    <SecurityGroupPermission fromDate="2001-05-13 12:00:00.0" groupId="FLEXADMIN" permissionId="MARKETING_UPDATE"/>
    <SecurityGroupPermission fromDate="2001-05-13 12:00:00.0" groupId="FLEXADMIN" permissionId="MARKETING_VIEW"/>
    <SecurityGroupPermission fromDate="2001-05-13 12:00:00.0" groupId="VIEWADMIN" permissionId="MARKETING_VIEW"/>
    <SecurityGroupPermission fromDate="2001-05-13 12:00:00.0" groupId="BIZADMIN" permissionId="MARKETING_ADMIN"/>

    <!-- SFA security -->
    <SecurityGroupPermission fromDate="2001-05-13 12:00:00.0" groupId="FULLADMIN" permissionId="SFA_ADMIN"/>
    <SecurityGroupPermission fromDate="2001-05-13 12:00:00.0" groupId="FLEXADMIN" permissionId="SFA_CREATE"/>
    <SecurityGroupPermission fromDate="2001-05-13 12:00:00.0" groupId="FLEXADMIN" permissionId="SFA_DELETE"/>
    <SecurityGroupPermission fromDate="2001-05-13 12:00:00.0" groupId="FLEXADMIN" permissionId="SFA_UPDATE"/>
    <SecurityGroupPermission fromDate="2001-05-13 12:00:00.0" groupId="FLEXADMIN" permissionId="SFA_VIEW"/>
    <SecurityGroupPermission fromDate="2001-05-13 12:00:00.0" groupId="VIEWADMIN" permissionId="SFA_VIEW"/>
    <SecurityGroupPermission fromDate="2001-05-13 12:00:00.0" groupId="BIZADMIN" permissionId="SFA_ADMIN"/>

    <!-- SFA System Property Data -->
    <SystemProperty systemResourceId="sfa" systemPropertyId="save.outgoing.directory" description="If the save.outgoing.directory is specified the file will be saved there, else it will be saved under OFBIZ_HOME"/>

    <!-- SFA Demo Data -->
    <!-- demo accounts -->
    <Party partyId="sfa100" partyTypeId="PARTY_GROUP" statusId="PARTY_ENABLED"/>
    <PartyGroup partyId="sfa100" groupName="A profitable Account"/>
    <PartyRole partyId="sfa100" roleTypeId="_NA_"/>
    <PartyRole partyId="sfa100" roleTypeId="ACCOUNT"/>
    <PartyStatus partyId="sfa100" statusId="PARTY_ENABLED" statusDate="2001-01-01 12:00:00.0"/>
    <ContactMech contactMechId="sfa100" contactMechTypeId="POSTAL_ADDRESS"/>
    <ContactMech contactMechId="sfa101" contactMechTypeId="TELECOM_NUMBER"/>
    <ContactMech contactMechId="sfa102" contactMechTypeId="EMAIL_ADDRESS" infoString="ofbiztest@example.com"/>
    <PostalAddress contactMechId="sfa100" address1="151 Madison street." city="Edison" postalCode="32451" countryGeoId="USA" stateProvinceGeoId="CA"/>
    <TelecomNumber contactMechId="sfa101" countryCode="1" areaCode="33" contactNumber="12456"/>
    <PartyContactMech partyId="sfa100" contactMechId="sfa100" fromDate="2000-01-01 00:00:00.000"/>
    <PartyContactMech partyId="sfa100" contactMechId="sfa101" fromDate="2000-01-01 00:00:00.000"/>
    <PartyContactMech partyId="sfa100" contactMechId="sfa102" fromDate="2000-01-01 00:00:00.000"/>
    <PartyContactMechPurpose partyId="sfa100" contactMechId="sfa100" contactMechPurposeTypeId="GENERAL_LOCATION" fromDate="2000-01-01 00:00:00.000"/>
    <PartyContactMechPurpose partyId="sfa100" contactMechId="sfa101" contactMechPurposeTypeId="PRIMARY_PHONE" fromDate="2000-01-01 00:00:00.000"/>
    <PartyContactMechPurpose partyId="sfa100" contactMechId="sfa102" contactMechPurposeTypeId="PRIMARY_EMAIL" fromDate="2000-01-01 00:00:00.000"/>

    <!-- demo contacts -->
    <Party partyId="DemoCustomer1" statusId="PARTY_ENABLED"/>
    <PartyRole partyId="DemoCustomer1" roleTypeId="CONTACT"/>
    <PartyStatus partyId="DemoCustomer1" statusId="PARTY_ENABLED" statusDate="2001-01-01 12:00:00.0"/>
    <PartyRelationship partyIdFrom="sfa100" roleTypeIdFrom="ACCOUNT" partyIdTo="DemoCustomer1" roleTypeIdTo="CONTACT" fromDate="2000-01-01 00:00:00.000" partyRelationshipTypeId="EMPLOYMENT"/>
    <Party partyId="DemoCustomer2" statusId="PARTY_ENABLED"/>
    <PartyRole partyId="DemoCustomer2" roleTypeId="CONTACT"/>
    <PartyStatus partyId="DemoCustomer2" statusId="PARTY_ENABLED" statusDate="2001-01-01 12:00:00.0"/>
    <PartyRelationship partyIdFrom="DemoCustCompany" roleTypeIdFrom="ACCOUNT" partyIdTo="DemoCustomer2" roleTypeIdTo="CONTACT" fromDate="2000-01-01 00:00:00.000" partyRelationshipTypeId="EMPLOYMENT"/>
    <Party partyId="DemoCustomer3" statusId="PARTY_ENABLED"/>
    <PartyRole partyId="DemoCustomer3" roleTypeId="CONTACT"/>
    <PartyStatus partyId="DemoCustomer3" statusId="PARTY_ENABLED" statusDate="2001-01-01 12:00:00.0"/>
    <PartyRelationship partyIdFrom="DemoCustCompany" roleTypeIdFrom="ACCOUNT" partyIdTo="DemoCustomer3" roleTypeIdTo="CONTACT" fromDate="2000-01-01 00:00:00.000" partyRelationshipTypeId="EMPLOYMENT"/>

    <!-- Demo Lead Owners -->
    <Party partyId="DemoLeadOwner" partyTypeId="PERSON" statusId="PARTY_ENABLED"/>
    <Person partyId="DemoLeadOwner" firstName="Demo" lastName="LeadOwner"/>
    <PartyRole partyId="DemoLeadOwner" roleTypeId="_NA_"/>
    <PartyRole partyId="DemoLeadOwner" roleTypeId="OWNER"/>
    <PartyStatus partyId="DemoLeadOwner" statusId="PARTY_ENABLED" statusDate="2001-01-01 12:00:00.0"/>
    <PartyRelationship partyIdFrom="Company" roleTypeIdFrom="_NA_" partyIdTo="DemoLeadOwner" roleTypeIdTo="_NA_" partyRelationshipTypeId="EMPLOYMENT" fromDate="2000-01-01 00:00:00"/>
    <UserLogin userLoginId="DemoLeadOwner" currentPassword="{SHA}47b56994cbc2b6d10aa1be30f70165adb305a41a" partyId="DemoLeadOwner" enabled="Y"/>
    <!-- FIXME: Establish SecurityGroup for SFA. This user should have access only to SFA -->
    <UserLoginSecurityGroup groupId="FULLADMIN" userLoginId="DemoLeadOwner" fromDate="2001-05-13 00:00:00.000"/>

    <Party partyId="DemoLeadOwner1" partyTypeId="PERSON" statusId="PARTY_ENABLED"/>
    <Person partyId="DemoLeadOwner1" firstName="Demo" lastName="LeadOwner1"/>
    <PartyRole partyId="DemoLeadOwner1" roleTypeId="_NA_"/>
    <PartyRole partyId="DemoLeadOwner1" roleTypeId="OWNER"/>
    <PartyStatus partyId="DemoLeadOwner1" statusId="PARTY_ENABLED" statusDate="2001-01-01 12:00:00.0"/>
    <PartyRelationship partyIdFrom="Company" roleTypeIdFrom="_NA_" partyIdTo="DemoLeadOwner1" roleTypeIdTo="_NA_" partyRelationshipTypeId="EMPLOYMENT" fromDate="2000-01-01 00:00:00"/>
    <UserLogin userLoginId="DemoLeadOwner1" currentPassword="{SHA}47b56994cbc2b6d10aa1be30f70165adb305a41a" partyId="DemoLeadOwner1" enabled="Y"/>
    <!-- FIXME: Establish SecurityGroup for SFA. This user should have access only to SFA -->
    <UserLoginSecurityGroup groupId="FULLADMIN" userLoginId="DemoLeadOwner1" fromDate="2001-05-13 00:00:00.000"/>

    <!-- Demo Leads -->
    <Party partyId="sfa102" partyTypeId="PARTY_GROUP" statusId="PARTY_ENABLED"/>
    <PartyGroup partyId="sfa102" groupName="A promising Lead Company"/>
    <PartyRole partyId="sfa102" roleTypeId="ACCOUNT_LEAD"/>
    <PartyRole partyId="sfa102" roleTypeId="_NA_"/>
    <PartyStatus partyId="sfa102" statusId="PARTY_ENABLED" statusDate="2001-01-01 12:00:00.0"/>
    <Party partyId="sfa101" partyTypeId="PERSON" statusId="PARTY_ENABLED"/>
    <Person partyId="sfa101" firstName="John" lastName="Lead"/>
    <PartyRole partyId="sfa101" roleTypeId="_NA_"/>
    <PartyRole partyId="sfa101" roleTypeId="LEAD"/>
    <PartyStatus partyId="sfa101" statusId="PARTY_ENABLED" statusDate="2001-01-01 12:00:00.0"/>
    <!-- company to lead relationship -->
    <PartyRelationship partyIdFrom="sfa102" roleTypeIdFrom="ACCOUNT_LEAD" partyIdTo="sfa101" roleTypeIdTo="LEAD" fromDate="2000-01-01 00:00:00.000" partyRelationshipTypeId="EMPLOYMENT"/>
    <!-- owner to lead relationship -->
    <PartyRelationship partyIdFrom="DemoLeadOwner" roleTypeIdFrom="OWNER" partyIdTo="sfa101" roleTypeIdTo="LEAD" fromDate="2000-01-01 00:00:00.000" partyRelationshipTypeId="LEAD_OWNER"/>
    <ContactMech contactMechId="sfa103" contactMechTypeId="EMAIL_ADDRESS" infoString="ofbiztestLead@example.com"/>
    <PartyContactMech partyId="sfa101" contactMechId="sfa103" fromDate="2000-01-01 00:00:00.000"/>
    <PartyContactMechPurpose partyId="sfa101" contactMechId="sfa103" contactMechPurposeTypeId="PRIMARY_EMAIL" fromDate="2000-01-01 00:00:00.000"/>
    <!-- Status Valid Change   -->
    <StatusValidChange statusId="PARTY_ENABLED" statusIdTo="LEAD_CONVERTED" transitionName="Convert Lead To Contact"/>
    <StatusValidChange statusId="LEAD_CONVERTED" statusIdTo="PARTY_DISABLED" transitionName="Disabled"/>

    <Party partyId="DemoLead" partyTypeId="PERSON" statusId="PARTY_ENABLED"/>
    <Person partyId="DemoLead" firstName="Demo" lastName="Lead"/>
    <PartyRole partyId="DemoLead" roleTypeId="_NA_"/>
    <PartyRole partyId="DemoLead" roleTypeId="LEAD"/>
    <PartyStatus partyId="DemoLead" statusId="PARTY_ENABLED" statusDate="2001-01-01 12:00:00.0"/>

    <Party partyId="DemoLead1" partyTypeId="PERSON" statusId="PARTY_ENABLED"/>
    <Person partyId="DemoLead1" firstName="Demo" lastName="Lead1"/>
    <PartyRole partyId="DemoLead1" roleTypeId="_NA_"/>
    <PartyRole partyId="DemoLead1" roleTypeId="LEAD"/>
    <PartyStatus partyId="DemoLead1" statusId="PARTY_ENABLED" statusDate="2001-01-01 12:00:00.0"/>

    <Party partyId="DemoLead2" partyTypeId="PERSON" statusId="PARTY_ENABLED"/>
    <Person partyId="DemoLead2" firstName="Demo" lastName="Lead2"/>
    <PartyRole partyId="DemoLead2" roleTypeId="_NA_"/>
    <PartyRole partyId="DemoLead2" roleTypeId="LEAD"/>
    <PartyStatus partyId="DemoLead2" statusId="PARTY_ENABLED" statusDate="2001-01-01 12:00:00.0"/>

    <Party partyId="DemoLead3" partyTypeId="PERSON" statusId="PARTY_ENABLED"/>
    <Person partyId="DemoLead3" firstName="Demo" lastName="Lead3"/>
    <PartyRole partyId="DemoLead3" roleTypeId="_NA_"/>
    <PartyRole partyId="DemoLead3" roleTypeId="LEAD"/>
    <PartyStatus partyId="DemoLead3" statusId="PARTY_ENABLED" statusDate="2001-01-01 12:00:00.0"/>

    <Party partyId="DemoLead4" partyTypeId="PERSON" statusId="PARTY_ENABLED"/>
    <Person partyId="DemoLead4" firstName="Demo" lastName="Lead4"/>
    <PartyRole partyId="DemoLead4" roleTypeId="_NA_"/>
    <PartyRole partyId="DemoLead4" roleTypeId="LEAD"/>
    <PartyStatus partyId="DemoLead4" statusId="PARTY_ENABLED" statusDate="2001-01-01 12:00:00.0"/>

    <!-- Lead Owners Team -->
    <Party partyId="DemoLeadOwnersGroup" partyTypeId="TEAM" statusId="PARTY_ENABLED"/>
    <PartyGroup partyId="DemoLeadOwnersGroup" groupName="A Group of Lead Owners"/>
    <PartyRole partyId="DemoLeadOwnersGroup" roleTypeId="_NA_"/>
    <PartyRole partyId="DemoLeadOwnersGroup" roleTypeId="INTERNAL_ORGANIZATIO"/>
    <PartyStatus partyId="DemoLeadOwnersGroup" statusId="PARTY_ENABLED" statusDate="2001-01-01 12:00:00.0"/>
    <PartyRelationship partyIdFrom="Company" partyIdTo="DemoLeadOwnersGroup" partyRelationshipTypeId="GROUP_ROLLUP" roleTypeIdFrom="_NA_" roleTypeIdTo="_NA_" fromDate="2001-05-13 00:00:00.000"/>

    <!-- Leads of DemoLeadOwner -->
    <PartyRelationship partyIdFrom="DemoLeadOwner" roleTypeIdFrom="OWNER" partyIdTo="DemoLead" roleTypeIdTo="LEAD" fromDate="2001-05-13 00:00:00.000" partyRelationshipTypeId="LEAD_OWNER"/>
    <PartyRelationship partyIdFrom="DemoLeadOwner" roleTypeIdFrom="OWNER" partyIdTo="DemoLead1" roleTypeIdTo="LEAD" fromDate="2001-05-13 00:00:00.000" partyRelationshipTypeId="LEAD_OWNER"/>
    <PartyRelationship partyIdFrom="DemoLeadOwner" roleTypeIdFrom="OWNER" partyIdTo="DemoLead2" roleTypeIdTo="LEAD" fromDate="2001-05-13 00:00:00.000" partyRelationshipTypeId="LEAD_OWNER"/>

    <!-- Leads of DemoLeadOwner1 -->
    <PartyRelationship partyIdFrom="DemoLeadOwner1" roleTypeIdFrom="OWNER" partyIdTo="DemoLead3" roleTypeIdTo="LEAD" fromDate="2001-05-13 00:00:00.000" partyRelationshipTypeId="LEAD_OWNER"/>
    <PartyRelationship partyIdFrom="DemoLeadOwner1" roleTypeIdFrom="OWNER" partyIdTo="DemoLead4" roleTypeIdTo="LEAD" fromDate="2001-05-13 00:00:00.000" partyRelationshipTypeId="LEAD_OWNER"/>

    <PartyRelationship partyIdFrom="DemoLeadOwnersGroup" roleTypeIdFrom="INTERNAL_ORGANIZATIO" partyIdTo="DemoLeadOwner" roleTypeIdTo="OWNER" fromDate="2001-05-13 00:00:00.000" partyRelationshipTypeId="LEAD_OWN_GRP_MEMBER"/>
    <PartyRelationship partyIdFrom="DemoLeadOwnersGroup" roleTypeIdFrom="INTERNAL_ORGANIZATIO" partyIdTo="DemoLeadOwner1" roleTypeIdTo="OWNER" fromDate="2001-05-13 00:00:00.000" partyRelationshipTypeId="LEAD_OWN_GRP_MEMBER"/>

    <SalesOpportunityStage opportunityStageId="SOSTG_PROSPECT" description="Prospect" defaultProbability="0.050000" sequenceNum="1"/>
    <SalesOpportunityStage opportunityStageId="SOSTG_PROPOSAL" description="Proposal" defaultProbability="0.200000" sequenceNum="2"/>
    <SalesOpportunityStage opportunityStageId="SOSTG_QUOTED" description="Quoted" defaultProbability="0.400000" sequenceNum="3"/>
    <SalesOpportunityStage opportunityStageId="SOSTG_CLOSED" description="Closed" defaultProbability="1.000000" sequenceNum="4"/>

    <Enumeration enumId="SLSOPP_ECOMMERCE" enumTypeId="SLSOPP_TYP_ENUM" description="Ecommerce"/>
    <Enumeration enumId="SLSOPP_ERP" enumTypeId="SLSOPP_TYP_ENUM" description="ERP"/>
    <Enumeration enumId="SLSOPP_INSTALL" enumTypeId="SLSOPP_TYP_ENUM" description="Installation"/>
    <Enumeration enumId="SLSOPP_CUSTM" enumTypeId="SLSOPP_TYP_ENUM" description="Customization"/>
    <Enumeration enumId="SLSOPP_SUPPORT" enumTypeId="SLSOPP_TYP_ENUM" description="Support plan"/>

</entity-engine-xml>
