<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">

  <xs:include schemaLocation="BaseType.xsd"></xs:include>
  
  <xs:element name="Admin" type="baseAdminType">

    <xs:key name="ActivityId">
      <xs:selector xpath="InboundActivities/InboundActivity|OutboundActivities/OutboundActivity" />
      <xs:field xpath="@id" />
    </xs:key>

   
    <xs:key name="QualificationId">
      <xs:selector xpath="Qualifications/Qualification" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="AgentId">
      <xs:selector xpath="Agents/Agent" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="SkillId">
      <xs:selector xpath="Skills/Skill" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="TeamId">
      <xs:selector xpath="Teams/Team" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="AgentProfileId">
      <xs:selector xpath="AgentProfiles/AgentProfile" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="PauseGroupId">
      <xs:selector xpath="Pauses/Pause" />
      <xs:field xpath="GroupId" />
    </xs:key>

    <xs:key name="GuiLanguageId">
      <xs:selector xpath="GuiLanguages/GuiLanguage" />
      <xs:field xpath="." />
    </xs:key>

    <xs:key name="LanguageId">
      <xs:selector xpath="Languages/Language" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="InboundId">
      <xs:selector xpath="InboundActivities/InboundActivity" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="OutboundId">
      <xs:selector xpath="OutboundActivities/OutboundActivity" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="PlanningTimeSpanId">
      <xs:selector xpath="PlanningTimeSpans/PlanningTimeSpan" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="SpecialDayId">
      <xs:selector xpath="SpecialDays/SpecialDay" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="LocationId">
      <xs:selector xpath="Locations/Location" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="WorkflowId">
      <xs:selector xpath="Workflows/Workflow" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="RoleId">
      <xs:selector xpath="Roles/Role" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="RightId">
      <xs:selector xpath="Rights/Right" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="SecuredAdminObjectId">
      <xs:selector xpath="InboundActivities/InboundActivity|OutboundActivities/OutboundActivity|Campaigns/Campaign|SecurityContexts/SecurityContext|Queues/Queue|Teams/Team|Settings/Setting" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="PromptId">
      <xs:selector xpath="Prompts/Prompt" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="PromptRelatedId">
      <xs:selector xpath="Campaigns/Campaign|InboundActivities/InboundActivity|OutboundActivities/OutboundActivity|Queues/Queue" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="ResourceId">
      <xs:selector xpath="Resources/Resource" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="CarrierId">
      <xs:selector xpath="Carriers/Carrier" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="QueueId">
      <xs:selector xpath="Queues/Queue" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="AppointmentsContextsId">
      <xs:selector xpath="AppointmentsContexts/AppointmentsContext" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="AppointmentsMembersId">
      <xs:selector xpath="AppointmentsMembers/AppointmentsMember" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="AppointmentsAreasId">
      <xs:selector xpath="AppointmentsAreas/AppointmentsArea" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="CampaignId">
      <xs:selector xpath="Campaigns/Campaign" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="CallbackRulesetId">
      <xs:selector xpath="CallbackRulesets/CallbackRuleset" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="AddressBookId">
      <xs:selector xpath="AddressBooks/AddressBook" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="PreprocessorId">
      <xs:selector xpath="Preprocessors/Preprocessor" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="PlanningId">
      <xs:selector xpath="Plannings/Planning" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="SecurityContextId">
      <xs:selector xpath="SecurityContexts/SecurityContext" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="AmdSettingsId">
      <xs:selector xpath="AmdSettings/AmdSettings" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="NumberFormatId">
      <xs:selector xpath="NumberFormats/NumberFormat" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="DynamicParameterDefinitionId">
      <xs:selector xpath="DynamicParameterDefinitions/DynamicParameterDefinition" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="DynamicParameterTemplateDefinitionId">
      <xs:selector xpath="DynamicParameterTemplateDefinitions/DynamicParameterTemplateDefinition|Hidden/DynamicParameterTemplateDefinitions/DynamicParameterTemplateDefinition" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="DynamicParameterListId">
      <xs:selector xpath="DynamicParameterLists/DynamicParameterList" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="AdminObjectId">
      <xs:selector xpath="*/*" />
      <xs:field xpath="@id" />
    </xs:key>




    <xs:key name="AllAgentsIds">
      <xs:selector xpath="Agents/Agent|Hidden/Agents/Agent" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="AllQueuesIds">
      <xs:selector xpath="Queues/Queue|Hidden/Queues/Queue" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="AllCampaignsIds">
      <xs:selector xpath="Campaigns/Campaign|Hidden/Campaigns/Campaign" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="AllQualificationsIds">
      <xs:selector xpath="Qualifications/Qualification|Hidden/Qualifications/Qualification" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="AllAppointmentsContextsId">
      <xs:selector xpath="AppointmentsContexts/AppointmentsContext|Hidden/AppointmentsContexts/AppointmentsContext" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="AllPauseGroupId">
      <xs:selector xpath="Pauses/Pause|Hidden/Pauses/Pause" />
      <xs:field xpath="GroupId" />
    </xs:key>

    <xs:key name="AllSecurityContextId">
      <xs:selector xpath="SecurityContexts/SecurityContext|Hidden/SecurityContexts/SecurityContext" />
      <xs:field xpath="@id" />
    </xs:key>

    <xs:key name="AllLanguageId">
      <xs:selector xpath="Languages/Language|Hidden/Languages/Language" />
      <xs:field xpath="@id" />
    </xs:key>



    <xs:keyref name="CreatorReference" refer="AllAgentsIds">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>defaultagent++++++++++++++++++++</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="*/*|Hidden/*/*" />
      <xs:field xpath="@creator" />
    </xs:keyref>

    <xs:keyref name="ModificatorReference" refer="AllAgentsIds">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>defaultagent++++++++++++++++++++</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="*/*|Hidden/*/*" />
      <xs:field xpath="@modificator" />
    </xs:keyref>

    <xs:keyref name="GuiLanguageReference" refer="GuiLanguageId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Agents/Agent" />
      <xs:field xpath="GuiLanguage" />
    </xs:keyref>

    <xs:keyref name="ActivitiesLanguagesActivityReference" refer="ActivityId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="ActivitiesLanguages/ActivityLanguage" />
      <xs:field xpath="@activityid" />
    </xs:keyref>

    <xs:keyref name="ActivitiesLanguagesLanguageReference" refer="LanguageId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="ActivitiesLanguages/ActivityLanguage" />
      <xs:field xpath="@languageid" />
    </xs:keyref>

    <xs:keyref name="AgentsLanguagesAgentReference" refer="AgentId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="AgentsLanguages/AgentLanguage" />
      <xs:field xpath="@agentid" />
    </xs:keyref>

    <xs:keyref name="AgentsLanguagesLanguageReference" refer="LanguageId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="AgentsLanguages/AgentLanguage" />
      <xs:field xpath="@languageid" />
    </xs:keyref>

    <xs:keyref name="AgentsProfileReference" refer="AgentProfileId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Agents/Agent" />
      <xs:field xpath="Profile" />
    </xs:keyref>


    <xs:keyref name="DynamicParameterLinksAdminObjectIdReference" refer="AdminObjectId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="DynamicParameterLinks/DynamicParameterLink" />
      <xs:field xpath="@adminobjectid" />
    </xs:keyref>

    <xs:keyref name="DynamicParameterLinksDynamicParameterDefinitionidReference" refer="DynamicParameterDefinitionId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="DynamicParameterLinks/DynamicParameterLink" />
      <xs:field xpath="@dynamicparameterdefinitionid" />
    </xs:keyref>

    <xs:keyref name="DynamicParameterDefinitionParentParamReference" refer="DynamicParameterDefinitionId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="DynamicParameterDefinitions/DynamicParameterDefinition" />
      <xs:field xpath="ParentParam" />
    </xs:keyref>    
    
    <xs:keyref name="DynamicParameterDefinitionParentIdReference" refer="DynamicParameterDefinitionId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="DynamicParameterDefinitions/DynamicParameterDefinition" />
      <xs:field xpath="@parentid" />
    </xs:keyref>

    <xs:keyref name="DynamicParameterTemplateDefinitionParentParamReference" refer="DynamicParameterTemplateDefinitionId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="DynamicParameterTemplateDefinitions/DynamicParameterTemplateDefinition" />
      <xs:field xpath="ParentParam" />
    </xs:keyref>

    <xs:keyref name="DynamicParameterTemplateDefinitionParentIdReference" refer="DynamicParameterTemplateDefinitionId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="DynamicParameterTemplateDefinitions/DynamicParameterTemplateDefinition" />
      <xs:field xpath="@parentid" />
    </xs:keyref>

    <xs:keyref name="DynamicParameterListReference" refer="DynamicParameterListId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="DynamicParameterDefinitions/DynamicParameterDefinition" />
      <xs:field xpath="List" />
    </xs:keyref>

    <xs:keyref name="DynamicParameterListIdReference" refer="DynamicParameterListId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="DynamicParameterDefinitions/DynamicParameterDefinition" />
      <xs:field xpath="@listid" />
    </xs:keyref>

    <xs:keyref name="DynamicParameterTemplateListReference" refer="DynamicParameterListId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="DynamicParameterTemplateDefinitions/DynamicParameterDefinition" />
      <xs:field xpath="List" />
    </xs:keyref>

    <xs:keyref name="DynamicParameterTemplateListIdReference" refer="DynamicParameterListId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="DynamicParameterTemplateDefinitions/DynamicParameterTemplateDefinition" />
      <xs:field xpath="@listid" />
    </xs:keyref>


    <xs:keyref name="QualificationsExclusionsActivityReference" refer="ActivityId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="QualificationsExclusions/QualificationExclusion" />
      <xs:field xpath="@activityid" />
    </xs:keyref>

    <xs:keyref name="QualificationsExclusionsQualificationReference" refer="QualificationId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="QualificationsExclusions/QualificationExclusion" />
      <xs:field xpath="@qualificationid" />
    </xs:keyref>

    <xs:keyref name="ActivitiesSkillsActivityReference" refer="ActivityId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="ActivitiesSkills/ActivitySkill" />
      <xs:field xpath="@activityid" />
    </xs:keyref>

    <xs:keyref name="ActivitiesSkillsSkillReference" refer="SkillId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="ActivitiesSkills/ActivitySkill" />
      <xs:field xpath="@skill" />
    </xs:keyref>

    <xs:keyref name="AgentsSkillsAgentReference" refer="AgentId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="AgentsSkills/AgentSkill" />
      <xs:field xpath="@agentid" />
    </xs:keyref>

    <xs:keyref name="AgentsSkillsSkillReference" refer="SkillId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="AgentsSkills/AgentSkill" />
      <xs:field xpath="@skillid" />
    </xs:keyref>

    <xs:keyref name="AgenstTeamsAgentReference" refer="AgentId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="AgentsTeams/AgentTeam" />
      <xs:field xpath="@agentid" />
    </xs:keyref>

    <xs:keyref name="AgenstTeamsTeamReference" refer="TeamId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="AgentsTeams/AgentTeam" />
      <xs:field xpath="@teamid" />
    </xs:keyref>

    <xs:keyref name="InboundActivityTimeSpanActionsInboundActivityReference" refer="InboundId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="InboundActivityTimeSpanActions/InboundActivityTimeSpanAction" />
      <xs:field xpath="@inboundactivityid" />
    </xs:keyref>

    <xs:keyref name="InboundActivityTimeSpanActionsPlanningTimeSpanReference" refer="PlanningTimeSpanId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="InboundActivityTimeSpanActions/InboundActivityTimeSpanAction" />
      <xs:field xpath="@planningtimespanid" />
    </xs:keyref>

    <xs:keyref name="InboundActivityTimeSpanActionsActivityReference" refer="InboundId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="InboundActivityTimeSpanActions/InboundActivityTimeSpanAction" />
      <xs:field xpath="ActivityId" />
    </xs:keyref>

    <xs:keyref name="InboundActivityTimeSpanActionsPlanningReference" refer="PlanningId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="InboundActivityTimeSpanActions/InboundActivityTimeSpanAction" />
      <xs:field xpath="PlanningId" />
    </xs:keyref>

    <xs:keyref name="InboundActivityTimeSpanActionsClosedReasonReference" refer="PlanningTimeSpanId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="InboundActivityTimeSpanActions/InboundActivityTimeSpanAction" />
      <xs:field xpath="ClosedReasonId" />
    </xs:keyref>

    <xs:keyref name="InboundActivitySpecialDayActionsInboundActivityReference" refer="InboundId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="InboundActivitySpecialDayActions/InboundActivitySpecialDayAction" />
      <xs:field xpath="@inboundactivityid" />
    </xs:keyref>

    <xs:keyref name="InboundActivitySpecialDayActionsSpecialDayReference" refer="SpecialDayId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="InboundActivitySpecialDayActions/InboundActivitySpecialDayAction" />
      <xs:field xpath="@specialdayid" />
    </xs:keyref>

    <xs:keyref name="LocationCostsFromLocationAttributeReference" refer="LocationId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="LocationCosts/LocationCost" />
      <xs:field xpath="@fromlocation" />
    </xs:keyref>

    <xs:keyref name="LocationCostsToLocationAttributeReference" refer="LocationId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="LocationCosts/LocationCost" />
      <xs:field xpath="@tolocation" />
    </xs:keyref>

    <xs:keyref name="LocationCostsFromLocationReference" refer="LocationId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="LocationCosts/LocationCost" />
      <xs:field xpath="FromLocation" />
    </xs:keyref>

    <xs:keyref name="LocationCostsToLocationReference" refer="LocationId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="LocationCosts/LocationCost" />
      <xs:field xpath="ToLocation" />
    </xs:keyref>

    <xs:keyref name="ObjectsSecuritySecuredAdminObjectAttributeReference" refer="SecuredAdminObjectId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="ObjectsSecurity/ObjectSecurity" />
      <xs:field xpath="@securedadminobjectid" />
    </xs:keyref>

    <xs:keyref name="ObjectsSecurityRoleAttributeReference" refer="RoleId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="ObjectsSecurity/ObjectSecurity" />
      <xs:field xpath="@roleid" />
    </xs:keyref>

    <xs:keyref name="ObjectsSecurityRightAttributeReference" refer="RightId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="ObjectsSecurity/ObjectSecurity" />
      <xs:field xpath="@rightid" />
    </xs:keyref>

    <xs:keyref name="ObjectsSecuritySecuredAdminObjectReference" refer="SecuredAdminObjectId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="ObjectsSecurity/ObjectSecurity" />
      <xs:field xpath="SecuredAdminObjectId" />
    </xs:keyref>

    <xs:keyref name="ObjectsSecurityRoleReference" refer="RoleId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="ObjectsSecurity/ObjectSecurity" />
      <xs:field xpath="RoleId" />
    </xs:keyref>

    <xs:keyref name="ObjectsSecurityRightReference" refer="RightId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="ObjectsSecurity/ObjectSecurity" />
      <xs:field xpath="RightId" />
    </xs:keyref>

    <xs:keyref name="PromptsLinksPromptReference" refer="PromptId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="PromptsLinks/PromptLink" />
      <xs:field xpath="@promptid" />
    </xs:keyref>

    <xs:keyref name="PromptsLinksAdminObjectReference" refer="PromptRelatedId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="PromptsLinks/PromptLink" />
      <xs:field xpath="@adminobjectid" />
    </xs:keyref>

    <xs:keyref name="ResourcesCarriersResourceReference" refer="ResourceId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="ResourcesCarriers/ResourceCarrier" />
      <xs:field xpath="@resourceid" />
    </xs:keyref>

    <xs:keyref name="ResourcesCarriersCarrierReference" refer="CarrierId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="ResourcesCarriers/ResourceCarrier" />
      <xs:field xpath="@carrierid" />
    </xs:keyref>

     <xs:keyref name="ResourcesLocationReference" refer="LocationId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>defaultlocation+++++++++++++++++</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Resources/Resource" />
      <xs:field xpath="Location" />
    </xs:keyref>

    
    <xs:keyref name="RoleMembersAgentReference" refer="AgentId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="RoleMembers/RoleMember" />
      <xs:field xpath="@agentid" />
    </xs:keyref>

    <xs:keyref name="RoleMembersRoleReference" refer="RoleId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="RoleMembers/RoleMember" />
      <xs:field xpath="@roleid" />
    </xs:keyref>

    <xs:keyref name="QueuesTeamsQueueReference" refer="QueueId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="QueuesTeams/QueueTeam" />
      <xs:field xpath="@queueid" />
    </xs:keyref>

    <xs:keyref name="QueuesTeamsTeamReference" refer="TeamId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="QueuesTeams/QueueTeam" />
      <xs:field xpath="@teamid" />
    </xs:keyref>

    <xs:keyref name="AppointmentsAreasContextReference" refer="AppointmentsContextsId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="AppointmentsAreas/AppointmentsArea" />
      <xs:field xpath="Context" />
    </xs:keyref>

    <xs:keyref name="AppointmentsMembersContextReference" refer="AppointmentsContextsId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="AppointmentsMembers/AppointmentsMember" />
      <xs:field xpath="Context" />
    </xs:keyref>

    <xs:keyref name="AppointmentsAreasContextAttributeReference" refer="AppointmentsContextsId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="AppointmentsAreas/AppointmentsArea" />
      <xs:field xpath="@context" />
    </xs:keyref>

    <xs:keyref name="AppointmentsMembersContextAttributeReference" refer="AppointmentsContextsId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="AppointmentsMembers/AppointmentsMember" />
      <xs:field xpath="@context" />
    </xs:keyref>

    <xs:keyref name="AppointmentsRelationsMemberReference" refer="AppointmentsMembersId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="AppointmentsRelations/AppointmentsRelation" />
      <xs:field xpath="@appointmentsmemberid" />
    </xs:keyref>

    <xs:keyref name="AppointmentsRelationsAreaReference" refer="AppointmentsAreasId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="AppointmentsRelations/AppointmentsRelation" />
      <xs:field xpath="@appointmentsareaid" />
    </xs:keyref>

    <xs:keyref name="AttachmentsCampaignReference" refer="CampaignId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Attachments/Attachment" />
      <xs:field xpath="Campaign" />
    </xs:keyref>

    <xs:keyref name="CallbackRulesRuleSetReference" refer="CallbackRulesetId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>      
      <xs:selector xpath="CallbackRules/CallbackRule" />
      <xs:field xpath="CallbackRuleset" />
    </xs:keyref>

    <xs:keyref name="AddressBookReference" refer="AddressBookId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="AddressBookEntries/AddressBookEntry" />
      <xs:field xpath="AddressBook" />
    </xs:keyref>

    <xs:keyref name="AgentAddressBookReference" refer="AddressBookId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Agents/Agent" />
      <xs:field xpath="AddressBook" />
    </xs:keyref>

    <xs:keyref name="TeamAddressBookReference" refer="AddressBookId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Teams/Team" />
      <xs:field xpath="AddressBook" />
    </xs:keyref>

    <xs:keyref name="QueueAddressBookReference" refer="AddressBookId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Queues/Queue" />
      <xs:field xpath="AddressBook" />
    </xs:keyref>

    <xs:keyref name="QualificationAddressBookReference" refer="AddressBookId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Qualifications/Qualification" />
      <xs:field xpath="AddressBook" />
    </xs:keyref>

    <xs:keyref name="SettingAddressBookReference" refer="AddressBookId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Settings/Setting" />
      <xs:field xpath="AddressBook" />
    </xs:keyref>



    <xs:keyref name="CampaignsOwnerUserReference" refer="AllAgentsIds">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Campaigns/Campaign|Hidden/Campaigns/Campaign" />
      <xs:field xpath="OwnerUser" />
    </xs:keyref>

    <xs:keyref name="CampaignsQualificationReference" refer="QualificationId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Campaigns/Campaign" />
      <xs:field xpath="Qualification" />
    </xs:keyref>

    <xs:keyref name="CampaignsAppointmentsContextReference" refer="AppointmentsContextsId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>      
      <xs:selector xpath="Campaigns/Campaign|Hidden/Campaigns/Campaign" />
      <xs:field xpath="AppointmentsContext" />
    </xs:keyref>

    <xs:keyref name="CampaignsNumberFormatReference" refer="NumberFormatId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Neutral+++++++++++++++++++++++++</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Campaigns/Campaign|Hidden/Campaigns/Campaign" />
      <xs:field xpath="NumberFormat" />
    </xs:keyref>

    <xs:keyref name="CampaignsSecurityContextReference" refer="SecurityContextId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>      
      <xs:selector xpath="Campaigns/Campaign" />
      <xs:field xpath="SecurityContext" />
    </xs:keyref>

    <xs:keyref name="ActivitiesQueueReference" refer="QueueId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>      
      <xs:selector xpath="InboundActivities/InboundActivity|OutboundActivities/OutboundActivity" />
      <xs:field xpath="Queue" />
    </xs:keyref>

    <xs:keyref name="ActivitiesOwnerUserReference" refer="AllAgentsIds">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="InboundActivities/InboundActivity|OutboundActivities/OutboundActivity|Hidden/InboundActivities/InboundActivity|Hidden/OutboundActivities/OutboundActivity" />
      <xs:field xpath="OwnerUser" />
    </xs:keyref>

    <xs:keyref name="ActivitiesCampaignReference" refer="CampaignId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="InboundActivities/InboundActivity|OutboundActivities/OutboundActivity" />
      <xs:field xpath="Campaign" />
    </xs:keyref>

    <xs:keyref name="ActivitiesScriptReference" refer="PreprocessorId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="InboundActivities/InboundActivity|OutboundActivities/OutboundActivity|Hidden/InboundActivities/InboundActivity|Hidden/OutboundActivities/OutboundActivity" />
      <xs:field xpath="Script" />
    </xs:keyref>
    
    <xs:keyref name="ActivitiesWorkflowReference" refer="WorkflowId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="OutboundActivities/OutboundActivity|Hidden/OutboundActivities/OutboundActivity|InboundActivities/OutboundActivity|Hidden/OutboundActivities/InboundActivity" />
      <xs:field xpath="Workflow" />
    </xs:keyref>


    <xs:keyref name="ActivitiesPreprocessorReference" refer="PreprocessorId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="InboundActivities/InboundActivity|OutboundActivities/OutboundActivity|Hidden/InboundActivities/InboundActivity|Hidden/OutboundActivities/OutboundActivity" />
      <xs:field xpath="Preprocessor" />
    </xs:keyref>

    <xs:keyref name="ActivitiesPlanningReference" refer="PlanningId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>      
      <xs:selector xpath="InboundActivities/InboundActivity|OutboundActivities/OutboundActivity|Hidden/InboundActivities/InboundActivity|Hidden/OutboundActivities/OutboundActivity" />
      <xs:field xpath="Planning" />
    </xs:keyref>

    <xs:keyref name="ActivitiesSecurityContextReference" refer="SecurityContextId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="InboundActivities/InboundActivity|OutboundActivities/OutboundActivity" />
      <xs:field xpath="SecurityContext" />
    </xs:keyref>

    <xs:keyref name="ActivitiesPrepprocessorReference" refer="PreprocessorId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="InboundActivities/InboundActivity|OutboundActivities/OutboundActivity|Hidden/InboundActivities/InboundActivity|Hidden/OutboundActivities/OutboundActivity" />
      <xs:field xpath="Postprocessor" />
    </xs:keyref>

    <xs:keyref name="ActivitiesMusicPromptReference" refer="PromptId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="InboundActivities/InboundActivity|OutboundActivities/OutboundActivity|Hidden/InboundActivities/InboundActivity|Hidden/OutboundActivities/OutboundActivity" />
      <xs:field xpath="MusicPrompt" />
    </xs:keyref>

    <xs:keyref name="ActivitiesHoldPromptReference" refer="PromptId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="InboundActivities/InboundActivity|OutboundActivities/OutboundActivity|Hidden/InboundActivities/InboundActivity|Hidden/OutboundActivities/OutboundActivity" />
      <xs:field xpath="HoldPrompt" />
    </xs:keyref>

    <xs:keyref name="ActivitiesWaitMusicProcessorReference" refer="PreprocessorId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="InboundActivities/InboundActivity|OutboundActivities/OutboundActivity|Hidden/InboundActivities/InboundActivity|Hidden/OutboundActivities/OutboundActivity" />
      <xs:field xpath="WaitMusicProcessor" />
    </xs:keyref>

    <xs:keyref name="OutboundActivitiesAmdSettingsReference" refer="AmdSettingsId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="OutboundActivities/OutboundActivity|Hidden/OutboundActivities/OutboundActivity" />
      <xs:field xpath="AmdSettings" />
    </xs:keyref>

    <xs:keyref name="OutboundActivitiesLocationReference" refer="LocationId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>defaultlocation+++++++++++++++++</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="OutboundActivities/OutboundActivity|Hidden/OutboundActivities/OutboundActivity" />
      <xs:field xpath="Location" />
    </xs:keyref>

    <xs:keyref name="OutboundActivitiesCarrierReference" refer="CarrierId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>defaultcarrier++++++++++++++++++</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="OutboundActivities/OutboundActivity|Hidden/OutboundActivities/OutboundActivity" />
      <xs:field xpath="Carrier" />
    </xs:keyref>

    <xs:keyref name="NumberingRuleCarrierReference" refer="CarrierId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>defaultcarrier++++++++++++++++++</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="NumberingRules/NumberingRule" />
      <xs:field xpath="Carrier" />
    </xs:keyref>

    <xs:keyref name="NumberingRuleCarrierSelectionReference" refer="CarrierId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>defaultcarrier++++++++++++++++++</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="NumberingRules/NumberingRule" />
      <xs:field xpath="CarrierSelection" />
    </xs:keyref>



    <xs:keyref name="OutboundActivityTimeSpanActionsOutboundActivityReference" refer="OutboundId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="OutboundActivityTimeSpanActions/OutboundActivityTimeSpanAction" />
      <xs:field xpath="@outboundactivityid" />
    </xs:keyref>

    <xs:keyref name="OutboundActivityTimeSpanActionsPlanningTimeSpanReference" refer="PlanningTimeSpanId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="OutboundActivityTimeSpanActions/OutboundActivityTimeSpanAction" />
      <xs:field xpath="@planningtimespanid" />
    </xs:keyref>

    <xs:keyref name="OutboundActivityTimeSpanActionsActivityReference" refer="OutboundId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="OutboundActivityTimeSpanActions/OutboundActivityTimeSpanAction" />
      <xs:field xpath="ActivityId" />
    </xs:keyref>

    <xs:keyref name="OutboundActivityTimeSpanActionsPlanningReference" refer="PlanningId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="OutboundActivityTimeSpanActions/OutboundActivityTimeSpanAction" />
      <xs:field xpath="PlanningId" />
    </xs:keyref>

    <xs:keyref name="OutboundActivityTimeSpanActionsClosedReasonReference" refer="PlanningTimeSpanId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="OutboundActivityTimeSpanActions/OutboundActivityTimeSpanAction" />
      <xs:field xpath="ClosedReasonId" />
    </xs:keyref>

    <xs:keyref name="OutboundActivitySpecialDayActionsOutboundActivityReference" refer="OutboundId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="OutboundActivitySpecialDayActions/OutboundActivitySpecialDayAction" />
      <xs:field xpath="@outboundactivityid" />
    </xs:keyref>

    <xs:keyref name="OutboundActivitySpecialDayActionsSpecialDayReference" refer="SpecialDayId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="OutboundActivitySpecialDayActions/OutboundActivitySpecialDayAction" />
      <xs:field xpath="@specialdayid" />
    </xs:keyref>
    
    
    <xs:keyref name="OutboundActivitiesCallbackRulesReference" refer="CallbackRulesetId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>defaultcbrules++++++++++++++++++</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="OutboundActivities/OutboundActivity|Hidden/OutboundActivities/OutboundActivity" />
      <xs:field xpath="CallbackRules" />
    </xs:keyref>

    <xs:keyref name="OutboundActivitiesAmdPromptReference" refer="PromptId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="OutboundActivities/OutboundActivity|Hidden/OutboundActivities/OutboundActivity" />
      <xs:field xpath="AmdPrompt" />
    </xs:keyref>

    <xs:keyref name="PredefinedTextsCampaignReference" refer="CampaignId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="PredefinedTexts/PredefinedText" />
      <xs:field xpath="Campaign" />
    </xs:keyref>

    <xs:keyref name="PromptsRelatedToReference" refer="PromptId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Prompts/Prompt/RelatedPrompts/Prompt" />
      <xs:field xpath="RelatedTo" />
    </xs:keyref>

    <xs:keyref name="PromptsLanguageReference" refer="LanguageId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Prompts/Prompt" />
      <xs:field xpath="Language" />
    </xs:keyref>

    <xs:keyref name="PromptsRelatedPromptsLanguageReference3" refer="LanguageId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Prompts/Prompt/RelatedPrompts/Prompt" />
      <xs:field xpath="Language" />
    </xs:keyref>

    <xs:keyref name="QualificationParentIdReference" refer="QualificationId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Qualifications/Qualification" />
      <xs:field xpath="ParentId" />
    </xs:keyref>

    <xs:keyref name="InboundActivityWorkflowReference" refer="WorkflowId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="InboundActivities/InboundActivity" />
      <xs:field xpath="Workflow" />
    </xs:keyref>
    
    <xs:keyref name="OutboundActivityWorkflowReference" refer="WorkflowId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="OutboundActivities/OutboundActivity" />
      <xs:field xpath="Workflow" />
    </xs:keyref>


    <xs:keyref name="QualificationWorkflowReference" refer="WorkflowId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Qualifications/Qualification" />
      <xs:field xpath="Workflow" />
    </xs:keyref>

    <xs:keyref name="QualificationParentIdAttributeReference" refer="QualificationId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Qualifications/Qualification" />
      <xs:field xpath="@parentid" />
    </xs:keyref>

    <xs:keyref name="QualificationReference2" refer="ActivityId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Qualifications/Qualification" />
      <xs:field xpath="NewActivity" />
    </xs:keyref>

    <xs:keyref name="QueueWorkflowReference" refer="WorkflowId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Queues/Queue|Hidden/Queues/Queue" />
      <xs:field xpath="Workflow" />
    </xs:keyref>


    <xs:keyref name="SettingsWorkflowReference" refer="WorkflowId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Settings/Setting|Hidden/Settings/Setting" />
      <xs:field xpath="Workflow" />
    </xs:keyref>


    <xs:keyref name="CampaignWorkflowReference" refer="WorkflowId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Campaigns/Campaign|Hidden/Campaigns/Campaign" />
      <xs:field xpath="Workflow" />
    </xs:keyref>


    <xs:keyref name="QueueOwnerUserReference" refer="AllAgentsIds">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Queues/Queue|Hidden/Queues/Queue" />
      <xs:field xpath="OwnerUser" />
    </xs:keyref>

    <xs:keyref name="QueueOverflowReroutePromptReference" refer="PromptId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Queues/Queue|Hidden/Queues/Queue" />
      <xs:field xpath="OverflowReroutePrompt" />
    </xs:keyref>

    <xs:keyref name="QueueSecurityContextReference" refer="SecurityContextId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Queues/Queue" />
      <xs:field xpath="SecurityContext" />
    </xs:keyref>

    <xs:keyref name="SecurityContextOwnerUserReference" refer="AllAgentsIds">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="SecurityContexts/SecurityContext" />
      <xs:field xpath="OwnerUser" />
    </xs:keyref>

    <xs:keyref name="SettingsScriptReference" refer="PreprocessorId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Settings/Setting" />
      <xs:field xpath="Script" />
    </xs:keyref>

    <xs:keyref name="SpecialDaysPlanningReference" refer="PlanningId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="SpecialDays/SpecialDay" />
      <xs:field xpath="PlanningId" />
    </xs:keyref>

    <xs:keyref name="SpecialDaysPlanningToApplyReference" refer="PlanningId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="SpecialDays/SpecialDay" />
      <xs:field xpath="PlanningTopApply" />
    </xs:keyref>

    <xs:keyref name="TeamsSecurityContextReference" refer="SecurityContextId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Teams/Team" />
      <xs:field xpath="SecurityContext" />
    </xs:keyref>

    <xs:keyref name="TeamsPauseGroupReference" refer="PauseGroupId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Teams/Team" />
      <xs:field xpath="PauseGroup" />
    </xs:keyref>


    <xs:keyref name="TeamsOwnerUserReference" refer="AllAgentsIds">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Teams/Team|Hidden/Teams/Team" />
      <xs:field xpath="OwnerUser" />
    </xs:keyref>

    <xs:keyref name="OwnerReference" refer="CampaignId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Queues/Queue|InboundActivities/InboundActivity|OutboundActivities/OutboundActivity|Teams/Team" />
      <xs:field xpath="@owner" />
    </xs:keyref>

    <xs:keyref name="PredefinedTextsLanguageReference" refer="LanguageId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="PredefinedTexts/PredefinedText" />
      <xs:field xpath="Language" />
    </xs:keyref>

    <xs:keyref name="AttachmentsLanguageReference" refer="LanguageId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Attachments/Attachment" />
      <xs:field xpath="Language" />
    </xs:keyref>

    
    <xs:keyref name="DynamicParameterDefinitionTemplateReference" refer="DynamicParameterTemplateDefinitionId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="DynamicParameterDefinitions/DynamicParameterDefinition" />
      <xs:field xpath="Template" />
    </xs:keyref>



    <xs:keyref name="InactiveOwnerReference" refer="AllCampaignsIds">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Hidden/Queues/Queue|Hidden/InboundActivities/InboundActivity|Hidden/OutboundActivities/OutboundActivity|Hidden/Teams/Team" />
      <xs:field xpath="@owner" />
    </xs:keyref>

    <xs:keyref name="InactiveCampaignsQualificationReference" refer="AllQualificationsIds">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Hidden/Campaigns/Campaign" />
      <xs:field xpath="Qualification" />
    </xs:keyref>

    <xs:keyref name="InactiveActivitiesCampaignReference" refer="AllCampaignsIds">
      <xs:selector xpath="Hidden/InboundActivities/InboundActivity|Hidden/OutboundActivities/OutboundActivity" />
      <xs:field xpath="Campaign" />
    </xs:keyref>

    <xs:keyref name="InactiveActivitieQueueReference2" refer="AllQueuesIds">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Hidden/InboundActivities/InboundActivity|Hidden/OutboundActivities/OutboundActivity" />
      <xs:field xpath="Queue" />
    </xs:keyref>

    <xs:keyref name="InactiveAppointmentsAreasContextReference" refer="AllAppointmentsContextsId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Hidden/AppointmentsAreas/AppointmentsArea" />
      <xs:field xpath="Context" />
    </xs:keyref>

    <xs:keyref name="InactiveAppointmentsMembersContextReference" refer="AllAppointmentsContextsId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Hidden/AppointmentsMembers/AppointmentsMember" />
      <xs:field xpath="Context" />
    </xs:keyref>

    <xs:keyref name="InactiveAppointmentsAreasContextAttributeReference" refer="AllAppointmentsContextsId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Hidden/AppointmentsAreas/AppointmentsArea" />
      <xs:field xpath="@context" />
    </xs:keyref>

    <xs:keyref name="InactiveAppointmentsMembersContextAttributeReference" refer="AllAppointmentsContextsId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Delete</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Hidden/AppointmentsMembers/AppointmentsMember" />
      <xs:field xpath="@context" />
    </xs:keyref>

    <xs:keyref name="InactiveTeamsPauseGroupReference" refer="AllPauseGroupId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Hidden/Teams/Team" />
      <xs:field xpath="PauseGroup" />
    </xs:keyref>


    <xs:keyref name="InactiveCampaignsSecurityContextReference" refer="AllSecurityContextId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Hidden/Campaigns/Campaign" />
      <xs:field xpath="SecurityContext" />
    </xs:keyref>

    <xs:keyref name="InactiveActivitiesSecurityContextReference" refer="AllSecurityContextId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Hidden/InboundActivities/InboundActivity|Hidden/OutboundActivities/OutboundActivity" />
      <xs:field xpath="SecurityContext" />
    </xs:keyref>

    <xs:keyref name="InactiveQueueSecurityContextReference" refer="AllSecurityContextId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Hidden/Queues/Queue" />
      <xs:field xpath="SecurityContext" />
    </xs:keyref>

    <xs:keyref name="InactiveTeamsSecurityContextReference" refer="AllSecurityContextId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Hidden/Teams/Team" />
      <xs:field xpath="SecurityContext" />
    </xs:keyref>

    <xs:keyref name="InactivePredefinedTextsLanguageReference" refer="AllLanguageId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Hidden/PredefinedTexts/PredefinedText" />
      <xs:field xpath="Language" />
    </xs:keyref>

    <xs:keyref name="InactiveAttachmentsLanguageReference" refer="AllLanguageId">
      <xs:annotation>
        <xs:appinfo>
          <OnDeleteReference>Clean</OnDeleteReference>
        </xs:appinfo>
      </xs:annotation>
      <xs:selector xpath="Hidden/Attachments/Attachment" />
      <xs:field xpath="Language" />
    </xs:keyref>


  </xs:element>

</xs:schema>
