# WSP.UCC-5.ColumnsContentTypes.ps1

function CreateColumnsAndContentTypes 
{
    $web = Get-PnPWeb
    $relativeURL = $web.ServerRelativeUrl

    try 
	{
		# NOTE: Subsites are deprecated - UCC sites deploy to site collection root only
        Info "Site Columns / Content types..."

        # PluginFlowSetting
        # Fields
        AddPnPFieldFromXml '<Field ID="{daa2876b-5cd9-4e62-9d65-995366eaebb6}" Type="Choice" Name="wsp_ucc_pfs_operator" DisplayName="Operator" Format="Dropdown" Group="AnywhereNow">
		<Default>Equals</Default>
		<CHOICES>
				<CHOICE>Equals</CHOICE>
				<CHOICE>Not equals</CHOICE>
				<CHOICE>Is empty</CHOICE>
				<CHOICE>Is not empty</CHOICE>
				<CHOICE>Begins with</CHOICE>
				<CHOICE>Does not begin with</CHOICE>
				<CHOICE>Ends with</CHOICE>
				<CHOICE>Does not end with</CHOICE>
				<CHOICE>Contains</CHOICE>
				<CHOICE>Does not contains</CHOICE>
				<CHOICE>Matches regular expression</CHOICE>
				<CHOICE>Is greater than</CHOICE>
					<CHOICE>Is greater than or equal to</CHOICE>
					<CHOICE>Is less than</CHOICE>
					<CHOICE>Is less than or equal to</CHOICE>
			</CHOICES>
			</Field>' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{b7b68cc3-1848-43c6-b8a3-40ca087973e4}" Type="Text" Name="wsp_ucc_pfs_value" DisplayName="Value" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{85561a02-85d6-4487-8742-ae2e0b213192}" Type="Number" Name="wsp_ucc_pfs_order" DisplayName="Order" Decimals="2" Indexed="TRUE" Required="TRUE" EnforceUniqueValues="TRUE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{332fdc5c-bb0f-4bea-87b4-51da3cfecf2c}" Type="Choice" Name="wsp_ucc_pfs_condition" DisplayName="Condition" Format="Dropdown" Group="AnywhereNow">
			<Default></Default>
			<CHOICES>
					<CHOICE>AND</CHOICE>
					<CHOICE>OR</CHOICE>
			</CHOICES>
			</Field>' -IgnoreDuplicateException   
            AddPnPFieldFromXml '<Field ID="{d15b768e-4dd9-486f-a005-c5c1703e740a}" Type="Choice" Name="wsp_ucc_pfs_flag" DisplayName="Flag" Format="Dropdown" Group="AnywhereNow">
			<Default></Default>
			<CHOICES>
					<CHOICE>Priority</CHOICE>
					<CHOICE>Recording</CHOICE>
			</CHOICES>
			</Field>' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{9d8dcbd3-aeca-4393-ae0a-3525d058e00c}" Type="Text" Name="wsp_ucc_pfs_flagvalue" DisplayName="FlagValue" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{ae9cd367-2e39-4fd4-8e71-ccde91c91bb2}" Type="Choice" Name="wsp_ucc_pfs_action" DisplayName="Action" Format="Dropdown" Group="AnywhereNow">
			<Default></Default>
			<CHOICES>
					<CHOICE>Callback</CHOICE>
					<CHOICE>Disconnect</CHOICE>
					<CHOICE>Forward</CHOICE>
					<CHOICE>Message</CHOICE>
					<CHOICE>PreferredHunt</CHOICE>
					<CHOICE>Prompt</CHOICE>
					<CHOICE>Question</CHOICE>
					<CHOICE>Skill</CHOICE>
					<CHOICE>Voicemail</CHOICE>
			</CHOICES>
			</Field>' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{da1c83b1-4b60-4138-8fb0-089e18b0e80b}" Type="Lookup" Name="wsp_ucc_pfs_skill" DisplayName="Skill" Group="AnywhereNow" Required="FALSE" List="{$listId}" ShowField="Title" Mult="FALSE" Sortable="TRUE" />' "Skills" -IgnoreDuplicateException 
            AddPnPFieldFromXml '<Field ID="{a9caa243-e667-4ef2-96b5-32a3ff4b66ce}" Type="Lookup" Name="wsp_ucc_pfs_prompt" DisplayName="Prompt" Group="AnywhereNow" Required="FALSE" List="{$listId}" ShowField="PromptId" Mult="FALSE" Sortable="TRUE" />' "PromptsConfig" -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{6bd3f08d-63f1-4d55-8d10-f73c6351ad29}" Type="Lookup" Name="wsp_ucc_pfs_parentquestion" DisplayName="ParentQuestion" Group="AnywhereNow" Required="FALSE" List="{$listId}" ShowField="Title" Mult="FALSE" Sortable="TRUE" />' "IVRQuestions" -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{2563955b-7f38-4ee5-80ed-096e071eb588}" Type="Lookup" Name="wsp_ucc_pfs_pluginattribute" DisplayName="PluginAttribute" Group="AnywhereNow" Required="FALSE" List="{$listId}" ShowField="wsp_ucc_pa_systemname" Mult="FALSE" Sortable="TRUE" />' "PluginAttributes" -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{92a29e36-c871-474e-a289-f029ae914748}" Type="Text" Name="wsp_ucc_pfs_message" DisplayName="Message" Group="AnywhereNow" />' -IgnoreDuplicateException
            # CT
            $ctName = "PluginFlowSetting"                                                              
            AddPnPContentType $ctName "0x010011def573882c41f785fdc23355d0150a"
			AddPnPFieldsToContentType $ctName @("wsp_ucc_pfs_operator", "wsp_ucc_pfs_value", "!wsp_ucc_pfs_order" ,"wsp_ucc_pfs_condition", "wsp_ucc_pfs_flag", "wsp_ucc_pfs_flagvalue", "wsp_ucc_pfs_action", "wsp_ucc_pfs_skill", "wsp_ucc_pfs_prompt", "wsp_ucc_pfs_parentquestion", "wsp_ucc_pfs_pluginattribute", "wsp_ucc_pfs_message")
           
            # PluginSetting
            # Fields
            AddPnPFieldFromXml '<Field ID="{aab95295-989c-46b6-8098-1ecabdb1c9b7}" Type="Note" Name="wsp_ucc_ps_value" DisplayName="Value" RichText="FALSE" NumLines="6" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{3882b5c9-9905-439b-b319-3e362fab6eec}" Type="Text" Name="wsp_ucc_ps_scope" DisplayName="Scope" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{eb36fed5-8869-4e8d-9d99-7efd04a87007}" Type="Lookup" Name="wsp_ucc_ps_prompt" DisplayName="Prompt" Group="AnywhereNow" Required="FALSE" List="{$listId}" ShowField="PromptId" Mult="FALSE" Sortable="TRUE" />' "PromptsConfig" -IgnoreDuplicateException
            # CT
			$ctName = "PluginSetting"                                                              
            AddPnPContentType $ctName "0x01002dbcd83c90244bdbadfac0127cb9408e"
			AddPnPFieldsToContentType $ctName @("wsp_ucc_ps_value", "wsp_ucc_ps_scope", "wsp_ucc_ps_prompt")

            # PluginAttribute
            # Fields
            AddPnPFieldFromXml '<Field ID="{29a6c473-b31b-48ee-bbb8-fd438fe161b1}" Type="Text" Name="wsp_ucc_pa_systemname" DisplayName="System Name" Indexed="TRUE" Required="TRUE" EnforceUniqueValues="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{b035620a-4c53-4957-8d17-a2e00dbac8f0}" Type="Boolean" Name="wsp_ucc_pa_show" DisplayName="Show On Extension Window" Group="AnywhereNow"><Default>1</Default></Field>' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{efe3966a-5b51-4512-a2ac-55f4c71d8e46}" Type="Boolean" Name="wsp_ucc_pa_show_toast" DisplayName="Show on Toast" Group="AnywhereNow"><Default>0</Default></Field>' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{74a89f13-0ace-4da6-8771-2711534b7ec3}" Type="Number" Name="wsp_ucc_pa_order" DisplayName="Order" Decimals="0" Indexed="TRUE" Required="TRUE" EnforceUniqueValues="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{a2d7ff19-28f7-41b1-a22a-83f126344937}" Type="MultiChoice" Name="wsp_ucc_pa_fieldtype" DisplayName="Field Type" Required="FALSE" FillInChoice="TRUE" Group="AnywhereNow">
			<CHOICES>
					<CHOICE>Id</CHOICE>
					<CHOICE>Name</CHOICE>
					<CHOICE>PhoneNumber</CHOICE>
					<CHOICE>Prompt</CHOICE>
					<CHOICE>Search</CHOICE>
					<CHOICE>SipAddress</CHOICE>
			</CHOICES>
			</Field>' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{753fe971-12e8-46e2-b1ab-2fc2274345ef}" Type="Text" Name="wsp_ucc_pa_hyperlink" DisplayName="Hyperlink" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{11ab712c-7684-40b0-bf89-1bac15604111}" Type="Boolean" Name="wsp_ucc_pa_open" DisplayName="Open Automatically" Group="AnywhereNow"><Default>0</Default></Field>' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{b6277a1a-5c77-4e16-b468-873dad5c0c02}" Type="Choice" Name="wsp_ucc_pa_category" DisplayName="Category" Required="FALSE" Format="Dropdown" FillInChoice="TRUE" Group="AnywhereNow"><Default>Contact</Default>
			<CHOICES>
			<CHOICE>Account</CHOICE>
			<CHOICE>AccountSearch</CHOICE>
			<CHOICE>Case</CHOICE>
			<CHOICE>CaseSearch</CHOICE>
			<CHOICE>Contact</CHOICE>
			<CHOICE>ContactSearch</CHOICE>
			<CHOICE>Lead</CHOICE>
			<CHOICE>LeadSearch</CHOICE>
			</CHOICES></Field>' -IgnoreDuplicateException
			# CT
			$ctName = "PluginAttribute"                                                              
            AddPnPContentType $ctName "0x01004ed93bb4f6644e7e8d3f50002f81703a"
			AddPnPFieldsToContentType $ctName @("!wsp_ucc_pa_systemname", "wsp_ucc_pa_show", "wsp_ucc_pa_show_toast", "!wsp_ucc_pa_order", "wsp_ucc_pa_fieldtype", "wsp_ucc_pa_hyperlink", "wsp_ucc_pa_open", "wsp_ucc_pa_category")
            
			# Agent
            # Fields
            AddPnPFieldFromXml '<Field ID="{e80a037c-873e-4c8b-9fd3-1f9dc2bcde46}" Type="Number" Name="wsp_ucc_Order" DisplayName="Order" Required="TRUE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{10fc42e8-d4dd-4b31-b965-8fc111028eb4}" Type="Boolean" Name="wsp_ucc_Formal" DisplayName="Formal" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{9ea63c85-0f8f-477c-81ec-af721c27fd43}" Type="Text" Name="wsp_ucc_Agent" DisplayName="Agent" Required="TRUE" Indexed="TRUE" EnforceUniqueValues="TRUE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{b309ac2b-dc25-4941-b92e-8fd506516df2}" Type="Boolean" Name="CustomHoursEnable" DisplayName="Custom Hours Enable" Group="AnywhereNow"><Default>0</Default></Field>' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{7df0d6d8-e0d4-43a8-b6ef-0947f0be51fc}" Type="Note" Name="CustomHours" DisplayName="Custom Hours" Required="FALSE" NumLines="1" RichText="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{60d04056-98ed-444c-a1f6-b997336c57ed}" Type="Text" Name="wsp_ucc_agent_aci" DisplayName="Alternative Caller Id" Required="TRUE" Indexed="TRUE" EnforceUniqueValues="TRUE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{a3b7c8d9-1234-5678-9abc-def012345678}" Type="Text" Name="wsp_ucc_agent_teamsupn" DisplayName="Teams UPN" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{b4c8d9e0-2345-6789-abcd-ef0123456789}" Type="Text" Name="wsp_ucc_agent_teamsphone" DisplayName="TeamsAssignedPhoneNumber" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
			# CT
			$ctName = "Agent"
            AddPnPContentType $ctName "0x0100e08f80a6b6474ba7aff16e2031230bd0" "Add Agent item to the Agents list"
			AddPnPFieldsToContentType $ctName @("!wsp_ucc_Order", "wsp_ucc_Formal", "!wsp_ucc_Agent", "CustomHoursEnable", "CustomHours", "wsp_ucc_agent_aci", "wsp_ucc_agent_teamsupn", "wsp_ucc_agent_teamsphone")

            # Businesshours
            # Fields
            AddPnPFieldFromXml '<Field ID="{A226C0FC-1137-40A9-8E68-C9F96DBC3F49}" Type="Text" Name="wsp_ucc_Start" DisplayName="Start" Required="TRUE" Group="AnywhereNow"></Field>' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{CC007D51-F131-479F-82EC-BFA75CA34F47}" Type="Text" Name="wsp_ucc_End" DisplayName="End" Required="TRUE" Group="AnywhereNow"></Field>' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{dd5093f7-1a6b-4ad5-bba1-07df568616b4}" Type="Choice" Name="wsp_ucc_day" DisplayName="Day" Required="TRUE" Group="AnywhereNow">
			<CHOICES>
			  <CHOICE>Monday</CHOICE>
			  <CHOICE>Tuesday</CHOICE>
			  <CHOICE>Wednesday</CHOICE>
			  <CHOICE>Thursday</CHOICE>
			  <CHOICE>Friday</CHOICE>
			  <CHOICE>Saturday</CHOICE>
			  <CHOICE>Sunday</CHOICE>
			</CHOICES>
			</Field>' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{2ce7109d-be6f-4d78-9529-8d33d564db91}" Type="Boolean" Name="wsp_ucc_AllDay"  DisplayName="AllDay" Required="FALSE" Group="AnywhereNow"><Default>0</Default></Field>' -IgnoreDuplicateException
			# CT
			$ctName = "Businesshours"                                                                                                                
            AddPnPContentType $ctName "0x01003b82a54eea1f4e13bdee011132db4142" "Contenttype for storing businesshours in a list"
            AddPnPFieldsToContentType $ctName @("!wsp_ucc_Start", "!wsp_ucc_End", "!wsp_ucc_day", "wsp_ucc_AllDay")
			
            # CallClassification
            # Fields
            AddPnPFieldFromXml '<Field ID="{71867c28-42ad-40b4-888d-e545f35a0875}" Type="Number" Name="wsp_ucc_cc_level" DisplayName="Level" Required="FALSE" Group="AnywhereNow"><Default>0</Default></Field>' -IgnoreDuplicateException
			# CT
			$ctName = "CallClassification"
            AddPnPContentType $ctName "0x01009810bd6fd8724b05b7dfa240a0346a16" "Add a CallClassification item to the CallClassifications list"
			AddPnPFieldsToContentType $ctName @("!wsp_ucc_cc_level")

            # CallSummary
            # Fields
            AddPnPFieldFromXml '<Field ID="{c81bf71c-f59b-48e1-98cf-01e55ce47752}" Type="DateTime" Name="wsp_ucc_StartTime" DisplayName="StartTime" Required="FALSE" Format="DateTime" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{a8d2da16-4331-4374-b780-120d8767a86a}" Type="DateTime" Name="wsp_ucc_InQueueTime" DisplayName="InQueueTime" Required="FALSE" Format="DateTime" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{ed8c476b-fedf-46b7-b584-ffa23cda761e}" Type="DateTime" Name="wsp_ucc_AcceptedTime" DisplayName="AcceptedTime" Required="FALSE" Format="DateTime" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{36366e17-63a8-4a68-bcc5-2973c16ad62a}" Type="DateTime" Name="wsp_ucc_EndTime" DisplayName="EndTime" Required="FALSE" Format="DateTime" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{23891C8B-DEC7-41EC-AFA0-FF1FD97C6204}" Type="Boolean" Name="wsp_ucc_Accepted"  DisplayName="Accepted"  Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{3a7f4ba2-0d57-46f6-83d4-c17bc954e8e9}" Type="Number" Name="wsp_ucc_QueueTime" DisplayName="QueueTime" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{93152876-0d50-4073-b8d9-d0e7c8e2fe2d}" Type="Text" Name="wsp_ucc_SkillChosen" DisplayName="SkillChosen" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{7caacd12-4492-4c45-b6af-665adcac6834}" Type="Text" Name="wsp_ucc_InitialAgent" DisplayName="LastAgent" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{4a587315-6e94-46b8-9730-96dfd91b49a3}" Type="Text" Name="wsp_ucc_Customer" DisplayName="Customer" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{03156558-9652-453b-82e8-7abcb77cd053}" Type="Number" Name="QualityMonitor" DisplayName="QualityMonitor" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
			# CT
			$ctName = "CallSummary"
            AddPnPContentType $ctName "0x0100d962a5d46ad241f9bc618afc5280cdaf" "Contenttype for storing CallSummary in a CallSummary list"
			AddPnPFieldsToContentType $ctName @("wsp_ucc_StartTime", "wsp_ucc_InQueueTime", "wsp_ucc_AcceptedTime", "wsp_ucc_EndTime", "wsp_ucc_Accepted", "wsp_ucc_QueueTime", "wsp_ucc_SkillChosen", "wsp_ucc_InitialAgent", "wsp_ucc_Customer", "QualityMonitor")

            # ModalityEndpoint, SystemEndpoint, MainEndpoint, DefaultRoutingEndpoint
			# Fields
            AddPnPFieldFromXml '<Field ID="{f5b1f543-d915-440d-ba6f-e968aa21e285}" Type="Text" Name="wsp_ucc_modality" DisplayName="Modality" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{78961a98-cb90-4880-ab22-4b1c8836e18b}" Type="Lookup" Name="wsp_ucc_skill" DisplayName="Skill" Group="AnywhereNow" Required="FALSE" EnforceUniqueValues="FALSE" List="{$listId}" ShowField="Title" Mult="FALSE" Sortable="TRUE" />' "Skills" -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{5337246f-1f51-41ce-98d1-ab81f1d5b471}" Type="Lookup" Name="wsp_ucc_endpoints_ParentQuestion" DisplayName="ParentQuestion" Group="AnywhereNow" Required="FALSE" EnforceUniqueValues="FALSE" List="{$listId}" ShowField="Title" Mult="FALSE" Sortable="TRUE" />' "IVRQuestions" -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{b912083b-09f8-4269-8f9b-61160c4d8a0e}" Type="Boolean" Name="wsp_ucc_Priority" DisplayName="Priority" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{79ad6503-dcb7-452b-86d9-9942f6c077dc}" Type="Boolean" Name="wsp_ucc_endpoints_enablerouting" DisplayName="EnableRouting" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{312804f4-4a97-40fe-9025-7856b75b22d1}" Type="Text" Name="wsp_ucc_endpoints_type" DisplayName="Type" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{C3D4E5F6-A7B8-9012-CDEF-123456789012}" Type="Boolean" Name="wsp_ucc_endpoints_hide" DisplayName="Hide" Required="FALSE" Group="AnywhereNow"><Default>1</Default></Field>' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{D4E5F6A7-B8C9-0123-DEF0-234567890123}" Type="Boolean" Name="wsp_ucc_endpoints_agentcallerid" DisplayName="ShowAgentCallerId" Required="FALSE" Description="Valid for MS Connect Model calls made via the agent application" Group="AnywhereNow"><Default>1</Default></Field>' -IgnoreDuplicateException
			# CT
            $ctName = "ModalityEndpoint"
            AddPnPContentType $ctName "0x0100ecf4300da77a4171a49134a3ca3ae4a7" "Add a ModalityEndpoint item to the Endpoints list"
			AddPnPFieldsToContentType $ctName @("!wsp_ucc_modality", "wsp_ucc_skill", "wsp_ucc_endpoints_ParentQuestion", "wsp_ucc_Priority", "wsp_ucc_endpoints_enablerouting", "wsp_ucc_endpoints_type", "wsp_ucc_endpoints_hide", "wsp_ucc_endpoints_agentcallerid")
            $ctName = "SystemEndpoint"
            AddPnPContentType $ctName "0x010092195a9dd14d4b4cb3c2536417d416ec" "Add a SystemEndpoint item to the Endpoints list"
            AddPnPFieldsToContentType $ctName @("wsp_ucc_endpoints_type")
            $ctName = "MainEndpoint"
            AddPnPContentType $ctName "0x0100c10abfa06cbb436cad0313ff9e01a086" "Add a MainEndpoint item to the Endpoints list"
			AddPnPFieldsToContentType $ctName @("wsp_ucc_endpoints_enablerouting", "wsp_ucc_endpoints_type", "wsp_ucc_endpoints_hide", "wsp_ucc_endpoints_agentcallerid")
            $ctName = "DefaultRoutingEndpoint"
            AddPnPContentType $ctName "0x0100b8e2df1ab06f4478a6aa26ada1ea53e5" "Add a DefaultRoutingEndpoint item to the Endpoints list"
			AddPnPFieldsToContentType $ctName @("wsp_ucc_endpoints_type")
            
			# HolidayItem
            # Fields
            AddPnPFieldFromXml '<Field ID="{9708982b-42a1-4950-a4ad-f4efb06cbb76}" Type="DateTime" Name="wsp_ucc_holidays_startdatetime" DisplayName="Start datetime" Format="DateTime" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{4bf7812f-6d24-44a9-8491-3ba43ab1ed5c}" Type="DateTime" Name="wsp_ucc_holidays_enddatetime" DisplayName="End datetime" Format="DateTime" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{d32795a4-8d66-4fcc-8234-8ea2559f6104}" Type="Lookup" Name="wsp_ucc_holidays_ivrquestion" DisplayName="IVRQuestion" Group="AnywhereNow" Required="FALSE" EnforceUniqueValues="FALSE" List="{$listId}" ShowField="Title" Mult="FALSE" Sortable="TRUE" />' "IVRQuestions" -IgnoreDuplicateException
			# CT
			$ctName = "HolidayItem"
            AddPnPContentType $ctName "0x01008136d823b17740edbce3de4c5d632617" "Add a Holiday item to the Holidays list"
			AddPnPFieldsToContentType $ctName @("!wsp_ucc_holidays_startdatetime", "!wsp_ucc_holidays_enddatetime", "wsp_ucc_holidays_ivrquestion")

            # IDRQuestion
            # Fields
            AddPnPFieldFromXml '<Field ID="{533dd47d-20a9-4b0a-8c6e-6d19dd666db3}" Type="Lookup" Name="wsp_ucc_idr_parent" DisplayName="Parent" Group="Anywhere365" Required="FALSE" EnforceUniqueValues="FALSE" List="{$listId}" ShowField="Title" Mult="FALSE" Sortable="TRUE" />' "IDRQuestions" -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{2f58085f-2591-4d5b-9563-eb25a459ae2a}" Type="Text" Name="wsp_ucc_idr_question" DisplayName="Question" Required="FALSE" Group="Anywhere365" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{1e7843aa-5875-448e-9f82-87ea61e3d811}" Type="Number" Name="wsp_ucc_idr_choice" DisplayName="Choice" Required="FALSE" Group="Anywhere365" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{799d1600-f51c-44e0-a193-9b157a1672d5}" Type="Text" Name="wsp_ucc_idr_answer" DisplayName="Answer" Required="FALSE" Group="Anywhere365" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{c707f04b-da29-42e5-9404-5f481ed2f54a}" Type="Lookup" Name="wsp_ucc_idr_skill" DisplayName="Skill" Group="Anywhere365" Required="FALSE" EnforceUniqueValues="FALSE" List="{$listId}" ShowField="Title" Mult="FALSE" Sortable="TRUE" />' "Skills" -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{3e27382c-908a-4192-b773-36d35d5aa716}" Name="wsp_ucc_idr_queue" Type="Choice" DisplayName="Queue" Required="FALSE" Group="Anywhere365">
			<CHOICES>
			  <CHOICE>Question Queue</CHOICE>
			  <CHOICE>Waiting Queue</CHOICE>
			</CHOICES>
			</Field>' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{b519c55c-89be-4e07-86ff-b3e8fdb1936f}" Type="Choice" Name="wsp_ucc_idr_workflow" DisplayName="Workflow" Required="FALSE" Group="Anywhere365">
			<CHOICES>
			  <CHOICE>WelcomeFlow</CHOICE>
			  <CHOICE>QueuePleaseHold</CHOICE>
			</CHOICES>
			</Field>' -IgnoreDuplicateException
			# CT
			$ctName = "IDRQuestion"
            AddPnPContentType $ctName "0x0100110c5c4757cd43bc8d0524c1aff36d9c" "Add a IDRQuestion item to the IDRQuestions list"
			AddPnPFieldsToContentType $ctName @("wsp_ucc_idr_parent", "wsp_ucc_idr_question", "wsp_ucc_idr_choice", "wsp_ucc_idr_answer", "wsp_ucc_idr_skill", "wsp_ucc_idr_queue", "wsp_ucc_idr_workflow")
            $ctName = "IDRSystemItem"
            AddPnPContentType $ctName "0x0100e9de583898dc4363866a02c1765e6b26" "Add a IDRSystemItem item to the IDRQuestions list"
			AddPnPFieldsToContentType $ctName @("wsp_ucc_idr_question")


            # IVRQuestionItem, IVRHolidayQuestionItem, IVRSystemItem, IVRCustomSystemItem, IVRCallbackItem
            # Fields
            AddPnPFieldFromXml '<Field ID="{3f453122-d317-4d34-a856-8798f37d6363}" Type="Choice" Name="wsp_ucc_ivr_action" DisplayName="Action" Required="FALSE" Group="AnywhereNow">
			<CHOICES>
			  <CHOICE></CHOICE>
			  <CHOICE>Callback</CHOICE>
			  <CHOICE>Disconnect</CHOICE>
			  <CHOICE>Previous</CHOICE>
			  <CHOICE>Prompt</CHOICE>
			  <CHOICE>Skill</CHOICE>
			  <CHOICE>Voicemail</CHOICE>
			</CHOICES>
			</Field>' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{a87d72f6-aaf2-4c60-ac61-917b63c730e7}" Type="Lookup" Name="wsp_ucc_ivr_Parent" DisplayName="Parent" Group="AnywhereNow" Required="FALSE" EnforceUniqueValues="FALSE" List="{$listId}" ShowField="Title" Mult="FALSE" Sortable="TRUE" />' "IVRQuestions" -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{dedcf9f8-7146-4ddc-980f-e50ad7aa7964}" Type="Text" Name="wsp_ucc_Question" DisplayName="Question" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{b49649d1-9f45-4c88-a0aa-a7946dbe4cd8}" Type="Lookup" Name="wsp_ucc_ivr_AudioQuestion" DisplayName="AudioQuestion" Group="AnywhereNow" Required="FALSE" EnforceUniqueValues="FALSE" List="{$listId}" ShowField="Title" Mult="FALSE" Sortable="TRUE" />' "AudioFiles" -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{bc890e23-74c8-4b7a-a818-331d792265e9}" Type="Choice" Name="wsp_ucc_ivr_choice" DisplayName="Choice" Required="FALSE" Group="AnywhereNow">
			<CHOICES>
			  <CHOICE></CHOICE>
			  <CHOICE>0</CHOICE>
			  <CHOICE>1</CHOICE>
			  <CHOICE>2</CHOICE>
			  <CHOICE>3</CHOICE>
			  <CHOICE>4</CHOICE>
			  <CHOICE>5</CHOICE>
			  <CHOICE>6</CHOICE>
			  <CHOICE>7</CHOICE>
			  <CHOICE>8</CHOICE>
			  <CHOICE>9</CHOICE>
			  <CHOICE>*</CHOICE>
			  <CHOICE>#</CHOICE>
			</CHOICES>
			</Field>' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{b64e685f-6d51-4574-8f62-a19d6cced8cc}" Type="Number" Name="wsp_ucc_ivr_choicetimeout" DisplayName="Choice Timeout" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{9b3a11bd-ee8c-47b7-b8b3-e7fd6ff47a2b}" Type="Text" Name="wsp_ucc_Answer" DisplayName="Answer" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{e8e450fb-318d-4a51-9fa5-15c1909e3368}" Type="Lookup" Name="wsp_ucc_ivr_AudioAnswer" DisplayName="AudioAnswer" Group="AnywhereNow" Required="FALSE" EnforceUniqueValues="FALSE" List="{$listId}" ShowField="Title" Mult="FALSE" Sortable="TRUE" />' "AudioFiles" -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{aa6a7e91-2971-4663-bf2e-18fc9373ed62}" Type="Lookup" Name="wsp_ucc_ivr_Skill" DisplayName="Skill" Group="AnywhereNow" Required="FALSE" EnforceUniqueValues="FALSE" List="{$listId}" ShowField="Title" Mult="FALSE" Sortable="TRUE" />' "Skills" -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{1f9b5fb8-8c25-459d-8242-e939cbe1fb89}" Type="Lookup" Name="wsp_ucc_ivr_name" DisplayName="Name" Group="AnywhereNow" Required="FALSE" EnforceUniqueValues="FALSE" List="{$listId}" ShowField="PromptId" Mult="FALSE" Sortable="TRUE" />' "PromptsConfig" -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{736144d6-8644-4741-bbf5-7973a6472f88}" Type="Note" Name="wsp_ucc_ivr_description" DisplayName="Description" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{c0bc02a5-108f-472a-af77-c76ba78d4514}" Type="Number" Name="wsp_ucc_ivr_order" DisplayName="Order" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{d6aa7328-5af7-4736-93bc-5f9766012829}" Type="Choice" Name="wsp_ucc_ivr_queue"  DisplayName="Queue" Required="FALSE" Group="AnywhereNow">
			<CHOICES>
			  <CHOICE>1 - Entering Queue</CHOICE>
			  <CHOICE>2 - Question Queue</CHOICE>
			  <CHOICE>3 - Callback Queue</CHOICE>
			  <CHOICE>4 - Waiting Queue</CHOICE>
			</CHOICES>
			</Field>' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{47e1ef45-19d9-4918-b8ad-0d8ad0b31f42}" Type="Choice" Name="wsp_ucc_ivr_Workflow" DisplayName="Workflow" Required="FALSE" Group="AnywhereNow">
			<CHOICES>
			  <CHOICE>WelcomeFlow</CHOICE>
			  <CHOICE>QueuePleaseHold</CHOICE>
			  <CHOICE>QueueOverflow</CHOICE>
			  <CHOICE>NotWithinBusinessHours</CHOICE>
			  <CHOICE>QueueBusy</CHOICE>
			  <CHOICE>WelcomeTemporarilyClosed</CHOICE>
			  <CHOICE>Voicemail</CHOICE>
			  <CHOICE>PromptFlow</CHOICE>
			  <CHOICE>Callback</CHOICE>
			  <CHOICE>Holiday</CHOICE>
			</CHOICES>
			</Field>' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{6edb7025-a96d-42e6-9f38-4cc364818fa2}" Type="Text" Name="wsp_ucc_ivr_phrase" DisplayName="Speech Phrase" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
			AddPnPFieldFromXml '<Field ID="{f3179c7d-11c4-4594-a4cc-73fd893bb5d1}" Type="Boolean" Name="wsp_ucc_ivr_enableskilldependenc" DisplayName="Enable Skill Dependency" Required="FALSE" Group="AnywhereNow"><Default>0</Default></Field>' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{b34183a7-225d-41c3-b243-ff9f957eb055}" Type="Note" Name="wsp_ucc_ivr_skilldependencies" DisplayName="Skill Dependencies" Required="FALSE" NumLines="1" RichText="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
			# CT
			$ctName = "IVRQuestionItem"
            AddPnPContentType $ctName "0x0100ce5ce9e97fe341ad831fd767f21deafe" "Add a IVRQuestion item to the IVRQuestions list"
			AddPnPFieldsToContentType $ctName @("wsp_ucc_ivr_action", "wsp_ucc_ivr_Parent", "wsp_ucc_Question", "wsp_ucc_ivr_AudioQuestion", "wsp_ucc_ivr_choice", "wsp_ucc_ivr_choicetimeout", "wsp_ucc_Answer", 
			"wsp_ucc_ivr_AudioAnswer", "wsp_ucc_ivr_Skill", "wsp_ucc_ivr_name", "wsp_ucc_ivr_description", "wsp_ucc_ivr_order", "wsp_ucc_ivr_queue", "wsp_ucc_ivr_phrase", "wsp_ucc_ivr_Workflow")
            $ctName = "IVRHolidayQuestionItem"
            AddPnPContentType $ctName "0x010088bb6df099ea443394741878314a8d55"
			AddPnPFieldsToContentType $ctName @("wsp_ucc_ivr_action", "wsp_ucc_ivr_Parent", "wsp_ucc_Question", "wsp_ucc_ivr_AudioQuestion", "wsp_ucc_ivr_choice", "wsp_ucc_ivr_choicetimeout", "wsp_ucc_Answer", 
			"wsp_ucc_ivr_AudioAnswer", "wsp_ucc_ivr_Skill", "wsp_ucc_ivr_name", "wsp_ucc_ivr_description", "wsp_ucc_ivr_order", "wsp_ucc_ivr_queue", "wsp_ucc_ivr_Workflow")
            $ctName = "IVRSystemItem"
            AddPnPContentType $ctName "0x01000bf1d70e18f64da98f2e63209d98dd13"
			AddPnPFieldsToContentType $ctName @("wsp_ucc_Question", "wsp_ucc_ivr_AudioQuestion")
            $ctName = "IVRCustomSystemItem"
            AddPnPContentType $ctName "0x0100bed3855612694483bbad98703a11cc47"
			AddPnPFieldsToContentType $ctName @("wsp_ucc_ivr_action", "wsp_ucc_Question", "wsp_ucc_ivr_AudioQuestion", "wsp_ucc_ivr_choice", "wsp_ucc_ivr_choicetimeout", "wsp_ucc_Answer", 
			"wsp_ucc_ivr_AudioAnswer", "wsp_ucc_ivr_Skill", "wsp_ucc_ivr_name", "wsp_ucc_ivr_enableskilldependenc", "wsp_ucc_ivr_skilldependencies")
            $ctName = "IVRCallbackItem"
            AddPnPContentType $ctName "0x010070c809f405344d9eb874fd06f35d8be8"
			AddPnPFieldsToContentType $ctName @("wsp_ucc_Question", "wsp_ucc_ivr_AudioQuestion", "wsp_ucc_ivr_order", "wsp_ucc_ivr_queue", "wsp_ucc_ivr_Workflow")

            # OutboundDialerCall, AutonomousDialerItem
            # Fields
            AddPnPFieldFromXml '<Field ID="{9b23e7d6-6433-4f8d-8222-79cb0006f2b6}" Type="Boolean" Name="wsp_ucc_odc_processed" DisplayName="Processed" Required="FALSE" Group="AnywhereNow"><Default>0</Default></Field>' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{e2340b3d-80ab-411a-8e53-05e1d2ebcb18}" Type="Lookup" Name="wsp_ucc_odc_skill" DisplayName="Skill" Group="AnywhereNow" Required="FALSE" EnforceUniqueValues="FALSE" List="{$listId}" ShowField="Title" Mult="FALSE" Sortable="TRUE" />' "Skills" -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{08eae4cd-d416-4329-a359-d686858bb3bd}" Type="Number" Name="wsp_ucc_odc_order" DisplayName="Order" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{e9791c0f-14a6-4e32-b46d-39661216a725}" Type="Boolean" Name="wsp_ucc_odc_prio" DisplayName="Prio" Required="FALSE" Group="AnywhereNow"><Default>0</Default></Field>' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{c24b7019-15c1-4640-8642-16c547b6a8ec}" Type="Choice" Name="wsp_ucc_odc_day" DisplayName="Day" Required="FALSE" Group="AnywhereNow">
			<CHOICES>
			  <CHOICE>Monday</CHOICE>
			  <CHOICE>Tuesday</CHOICE>
			  <CHOICE>Wednesday</CHOICE>
			  <CHOICE>Thursday</CHOICE>
			  <CHOICE>Friday</CHOICE>
			  <CHOICE>Saturday</CHOICE>
			  <CHOICE>Sunday</CHOICE>
			</CHOICES>
			</Field>' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{112a8caa-4f36-476d-84f0-2ecd472aae8d}" Type="DateTime" Name="wsp_ucc_odc_datestart" DisplayName="Date start" Format="DateOnly" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{4823f6f7-b1be-4155-b1e4-a54ec8eac20b}" Type="Text" Name="wsp_ucc_odc_timestart" DisplayName="Time start" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{b78c1ab3-1e7f-4ec7-a8f0-377af9192a1f}" Type="Text" Name="wsp_ucc_odc_timeend" DisplayName="Time end" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{07e011db-e606-4a05-9fae-8eeb9ded6a3f}" Type="DateTime" Name="wsp_ucc_odc_dateend" DisplayName="Date end" Format="DateOnly" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{a9c09226-e824-42f0-9ce6-3ab1d360ee8d}" Type="Number" Name="wsp_ucc_odc_retries" DisplayName="Retries" Required="FALSE" Group="AnywhereNow"><Default>0</Default></Field>' -IgnoreDuplicateException
			AddPnPFieldFromXml '<Field ID="{3bc40797-0f1d-4719-8076-70bebc47f578}" Type="Text" Name="wsp_ucc_odc_prewelcomemessage" DisplayName="Pre-Welcome Message" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{ff462569-a9b2-43d4-8d5b-b1a30695ded8}" Type="Lookup" Name="wsp_ucc_odc_prewelcomeaudiomessage" DisplayName="Pre-Welcome Audio Message" Group="AnywhereNow" Required="FALSE" EnforceUniqueValues="FALSE" List="{$listId}" ShowField="Title" Mult="FALSE" Sortable="TRUE" />' "AudioFiles" -IgnoreDuplicateException
			# CT
			$ctName = "OutboundDialerCall"
            AddPnPContentType $ctName "0x0100cad41f0665004f3a8ae37ae69ba532c2" "Add a OutboundDialerCall item to the OutboundDialerCalls list"
            AddPnPFieldsToContentType $ctName @("wsp_ucc_odc_processed", "!wsp_ucc_odc_skill", "wsp_ucc_odc_order", "wsp_ucc_odc_prio", "wsp_ucc_odc_day", "wsp_ucc_odc_datestart", "wsp_ucc_odc_timestart", "wsp_ucc_odc_timeend", "wsp_ucc_odc_dateend", "wsp_ucc_odc_retries")
            $ctName = "AutonomousDialerItem"
            AddPnPContentType $ctName "0x0100ef8655606cae4e4e986b0c792a21a3c9" "Add a AutonomousDialer item to the AutonomousDialer list"
            AddPnPFieldsToContentType $ctName @("wsp_ucc_odc_processed", "wsp_ucc_odc_order", "wsp_ucc_odc_prio", "wsp_ucc_odc_prewelcomemessage", "wsp_ucc_odc_prewelcomeaudiomessage", "wsp_ucc_odc_day", "wsp_ucc_odc_datestart", "wsp_ucc_odc_timestart", "wsp_ucc_odc_timeend", "wsp_ucc_odc_dateend", "wsp_ucc_odc_retries")

            # PlaylistItem
            # Fields
            AddPnPFieldFromXml '<Field ID="{2760309f-331d-4048-992f-00a312953bfc}" Type="Lookup" Name="wsp_ucc_pl_audiofile" DisplayName="Audio File" Group="AnywhereNow" Required="FALSE" EnforceUniqueValues="FALSE" List="{$listId}" ShowField="Title" Mult="FALSE" Sortable="TRUE" />' "AudioFiles" -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{f382695b-6831-43fa-a0b5-403c449d1865}" Type="Number" Name="wsp_ucc_pl_order" DisplayName="Order" Min="0" Required="TRUE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{59046988-efd3-4339-920a-120e13ba29c9}" Type="Boolean" Name="wsp_ucc_pl_active" DisplayName="Active" Required="FALSE" Group="AnywhereNow"><Default>1</Default></Field>' -IgnoreDuplicateException
			# CT
			$ctName = "PlaylistItem"
            AddPnPContentType $ctName "0x010058eb51b7fe254708981aa1bafb4c687c" "Add a PlaylistItem item to the Playlists list"
            AddPnPFieldsToContentType $ctName @("!wsp_ucc_pl_audiofile", "!wsp_ucc_pl_order", "wsp_ucc_pl_active")
	
            # PromptConfig
            # Fields
            AddPnPFieldFromXml '<Field ID="{8c9f0f39-1a0a-45c5-915b-6ab43d0971dc}" Type="Text" Name="PromptId" DisplayName="PromptId" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{e521863d-91c4-4853-9bda-b2ffc7825065}" Type="Text" Name="Welcome" DisplayName="Welcome" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{8d4e5a0c-a9f3-4edb-83e4-13d4a15dbe51}" Type="Lookup" Name="wsp_ucc_pc_audiofile" DisplayName="AudioFile" Group="AnywhereNow" Required="FALSE" EnforceUniqueValues="FALSE" List="{$listId}" ShowField="Title" Mult="FALSE" Sortable="TRUE" />' "AudioFiles" -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{9e1fc0f8-b873-4bec-be5b-cf111bb134cf}" Type="Lookup" Name="Happy" DisplayName="Happy" Group="AnywhereNow" Required="FALSE" EnforceUniqueValues="FALSE" List="{$listId}" ShowField="Title" Mult="FALSE" Sortable="TRUE" />' "IVRQuestions" -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{22794B59-A910-484A-AB16-BF17AF164D0D}" Type="Lookup" Name="Sad" DisplayName="Sad" Group="AnywhereNow" Required="FALSE" EnforceUniqueValues="FALSE" List="{$listId}" ShowField="Title" Mult="FALSE" Sortable="TRUE" />' "IVRQuestions" -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{2bb1611c-03c9-4aa3-995d-b5d8ada912d3}" Type="Choice" Name="SuccesAction" DisplayName="SuccesAction" Required="FALSE" Group="AnywhereNow">
			<CHOICES>
			  <CHOICE>None</CHOICE>
			  <CHOICE>Speak</CHOICE>
			  <CHOICE>CRM</CHOICE>
			  <CHOICE>Hunt</CHOICE>
			  <CHOICE>PreferredHunt</CHOICE>
			</CHOICES>
			</Field>' -IgnoreDuplicateException
			# CT
			$ctName = "PromptConfig"
            AddPnPContentType $ctName "0x01002dcb4fc30ef4400dad0698aae3f35e7e" "Contenttype for storing PromptConfig in a PromptsConfig list"
			AddPnPFieldsToContentType $ctName @("!PromptId", "Welcome", "wsp_ucc_pc_audiofile", "Happy", "Sad", "SuccesAction")
      
            # QualityMonitorConfig
            # Fields
            AddPnPFieldFromXml '<Field ID="{6570721a-d14f-4879-bef8-26827c032d65}" Type="Text" Name="GoodBye" DisplayName="GoodBye" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{55b5fee3-d3d9-4193-91f2-98755422669f}" Type="Number" Name="ValueStart" DisplayName="ValueStart" Min="0" Max="9" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{824019d8-ea23-44b8-8001-2cd318f590a4}" Type="Number" Name="ValueEnd" DisplayName="ValueEnd" Min="0" Max="9" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{16738eb5-cd08-4bb1-987d-1b2f5347d39e}" Type="Lookup" Name="WelcomeAudio" DisplayName="WelcomeAudio" Group="AnywhereNow" Required="FALSE" EnforceUniqueValues="FALSE" List="{$listId}" ShowField="Title" Mult="FALSE" Sortable="TRUE" />' "AudioFiles" -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{b1bbe1e0-2cc0-4b60-8f32-34244772250b}" Type="Lookup" Name="GoodByeAudio" DisplayName="GoodByeAudio" Group="AnywhereNow" Required="FALSE" EnforceUniqueValues="FALSE" List="{$listId}" ShowField="Title" Mult="FALSE" Sortable="TRUE" />' "AudioFiles" -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{a093296c-65ee-4576-b943-bd5d730fe1df}" Type="Choice" Name="wsp_ucc_qmc_modality" DisplayName="Modality" Required="FALSE" Group="AnywhereNow">
			<CHOICES>
			  <CHOICE>Audio</CHOICE>
			  <CHOICE>Chat</CHOICE>
			</CHOICES>
			</Field>' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{f82a641c-6818-44df-9d4c-e3f2450bfb94}" Type="Number" Name="wsp_ucc_qmc_order" DisplayName="Order" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
			# CT
			$ctName = "QualityMonitorConfig"
            AddPnPContentType $ctName "0x01001503df3026654a18bbecd3b81826a641" "Contenttype for storing QualityMonitorConfig in a QualityMonitorConfig list"
			AddPnPFieldsToContentType $ctName @("Welcome", "GoodBye", "ValueStart", "ValueEnd", "WelcomeAudio", "GoodByeAudio", "!wsp_ucc_qmc_modality", "!wsp_ucc_qmc_order")

            # ReasonCode
            # Fields
            AddPnPFieldFromXml '<Field ID="{8def4869-a7cd-4207-bb82-7e6aa76848c3}" Type="Number" Name="wsp_ucc_rc_code"  DisplayName="Code" Required="FALSE" EnforceUniqueValues="TRUE" Indexed="TRUE" Min="1" Max="99" Decimals="0" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{702cbad1-5f90-477a-b809-fefad23f2ffe}" Type="Choice" Name="wsp_ucc_rc_presencestate" DisplayName="PresenceState" Required="FALSE" Format="Dropdown" FillInChoice="FALSE" Group="AnywhereNow">
			<Default>Away</Default>
			<CHOICES>
			  <CHOICE>Away</CHOICE>
			  <CHOICE>Busy</CHOICE>
			</CHOICES>
			</Field>' -IgnoreDuplicateException
			# CT
			$ctName = "ReasonCode"
            AddPnPContentType $ctName "0x010002248b3eba534747b90beedd0ef8784c" "Add a Reason Code item to the Reason Codes list"
            AddPnPFieldsToContentType $ctName @("!wsp_ucc_rc_code", "!wsp_ucc_rc_presencestate")
			
            # UCCRouting, InboundRouting
            # Fields
            AddPnPFieldFromXml '<Field ID="{bec423fe-0be2-4483-954c-b88dae98409b}" Type="Boolean" Name="wsp_ucc_routing_exactmatch" DisplayName="ExactMatch" Required="TRUE" Group="AnywhereNow">
			<Default>1</Default>
			</Field>' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{7a08767a-c7a6-4299-a5c1-51796a76388b}" Type="Text" Name="wsp_ucc_routing_match_from" DisplayName="Match From" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{0c5f5217-ec19-44c2-b1e0-d5ff0c99a9dd}" Type="Choice" Name="wsp_ucc_routing_action" DisplayName="Action" Required="FALSE" Group="AnywhereNow" >
			<CHOICES>
			  <CHOICE>Callback</CHOICE>
			  <CHOICE>Disconnect</CHOICE>
			  <CHOICE>Forward</CHOICE>
			  <CHOICE>Prompt</CHOICE>
			  <CHOICE>Question</CHOICE>
			  <CHOICE>Skill</CHOICE>
			  <CHOICE>Voicemail</CHOICE>
			</CHOICES>
			</Field>' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{7fd8a20e-0516-4458-bc88-c320e2a58c22}" Type="Lookup" Name="wsp_ucc_routing_skill" DisplayName="Skill" Group="AnywhereNow" Required="FALSE" EnforceUniqueValues="FALSE" List="{$listId}" ShowField="Title" Mult="FALSE" Sortable="TRUE" />' "Skills" -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{23858258-6c48-443c-a569-48856d610dc3}" Type="Lookup" Name="wsp_ucc_routing_parentquestion" DisplayName="ParentQuestion" Group="AnywhereNow" Required="FALSE" EnforceUniqueValues="FALSE" List="{$listId}" ShowField="Title" Mult="FALSE" Sortable="TRUE" />' "IVRQuestions" -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{586bec63-a578-4383-a9fa-71464b0a7f98}" Type="Lookup" Name="wsp_ucc_routing_name" DisplayName="Name" Group="AnywhereNow" Required="FALSE" EnforceUniqueValues="FALSE" List="{$listId}" ShowField="PromptId" Mult="FALSE" Sortable="TRUE" />' "PromptsConfig" -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{7fa9474a-133e-4687-a53e-7d986672c61b}" Type="Text" Name="wsp_ucc_routing_matchendpoint" DisplayName="MatchEndpoint" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{b7c665bc-917d-4900-8ea7-97a3bba833fd}" Type="Number" Name="wsp_ucc_routing_order" DisplayName="Order" Required="TRUE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{a8e90799-17c0-47b4-9bac-013d08eadf2b}" Type="Boolean" Name="wsp_ucc_routing_active" DisplayName="Active" Required="FALSE" Group="AnywhereNow"><Default>1</Default></Field>' -IgnoreDuplicateException
			AddPnPFieldFromXml '<Field ID="{0fab5d88-6e60-4947-8c39-9f50273b052c}" Type="Text" Name="wsp_ucc_routing_match_to" DisplayName="Match To" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
			# CT
			$ctName = "UCCRouting"
            AddPnPContentType $ctName "0x0100a9c88ce0264e43e987da092333b4307a" "Add a UCCRouting item to the Routing list"
			AddPnPFieldsToContentType $ctName @("!wsp_ucc_routing_exactmatch", "!wsp_ucc_routing_match_from", "!wsp_ucc_routing_action", "wsp_ucc_routing_skill", "wsp_ucc_routing_parentquestion", "wsp_ucc_routing_name", "!wsp_ucc_routing_matchendpoint", "wsp_ucc_routing_order", "wsp_ucc_routing_active")
            $ctName = "InboundRouting"
            AddPnPContentType $ctName "0x010038f813f3f98443ee92841ad149cc28cb" "Add a InboundRouting item to the Routing list"
			AddPnPFieldsToContentType $ctName @("!wsp_ucc_routing_match_from", "!wsp_ucc_routing_match_to", "!wsp_ucc_routing_action", "wsp_ucc_routing_skill", "wsp_ucc_routing_parentquestion", "wsp_ucc_routing_name", "wsp_ucc_routing_order", "wsp_ucc_routing_active")

            # Setting
            # Fields
            AddPnPFieldFromXml '<Field ID="{da6d6503-92a3-4c6f-9d15-f26d599af06f}" Type="Text" Name="wsp_ucc_Key" DisplayName="Key" Required="TRUE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{0d0a1ff5-0236-4172-95f3-2f15b8a81ee9}" Type="Note" Name="wsp_ucc_Value" DisplayName="Value" Required="TRUE" Group="AnywhereNow" NumLines="6" RichText="FALSE" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{ec712152-660d-4a4a-bc47-46da2b4b23cd}" Type="Note" Name="wsp_ucc_Description" DisplayName="Description" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{d1ac5666-b2bc-47a5-8ec8-3be619816a92}" Type="Choice" Name="wsp_ucc_scope" DisplayName="Scope" Required="FALSE" Group="AnywhereNow">
			<CHOICES>
			  <CHOICE>User</CHOICE>
			  <CHOICE>Config</CHOICE>
			  <CHOICE>Flow</CHOICE>
			  <CHOICE>CDR</CHOICE>
			  <CHOICE>Chat</CHOICE>
			  <CHOICE>Email</CHOICE>
			  <CHOICE>Recording</CHOICE>
			  <CHOICE>Voicemail</CHOICE>
			  <CHOICE>CRM</CHOICE>
			  <CHOICE>Prompt</CHOICE>
			  <CHOICE>Quality Monitor</CHOICE>
			  <CHOICE>Playlist</CHOICE>
			</CHOICES>
			<Default>User</Default>
			</Field>' -IgnoreDuplicateException
			# CT
			$ctName = "Setting"
            AddPnPContentType $ctName "0x0100675e2e92b51b4403b2bfb21cac95b2d8" "Contenttype for storing Setting in a Setting list"
			AddPnPFieldsToContentType $ctName @("!wsp_ucc_Key", "!wsp_ucc_Value", "wsp_ucc_Description", "wsp_ucc_scope")

            # SettingsList
            # Fields
            AddPnPFieldFromXml '<Field ID="{00631C69-6986-482C-93A7-1D24047A39D2}" Type="Text" Name="wsp_ucc_URL" DisplayName="URL" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{B85CFB77-C22B-4EC0-BFB7-400A56516F02}" Type="Choice" Name="wsp_ucc_HeaderTitle" DisplayName="HeaderTitle" Required="FALSE" Group="AnywhereNow">
			<CHOICES>
			  <CHOICE>User settings</CHOICE>
			  <CHOICE>Global settings</CHOICE>
			  <CHOICE>Functional settings</CHOICE>
			  <CHOICE>Business Intelligence</CHOICE>
			  <CHOICE>Portal</CHOICE>
			</CHOICES>
			</Field>' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{621af020-f748-46fe-ac0a-caae2d0a3678}" Type="Choice" Name="wsp_ucc_sort" DisplayName="Sort" Required="FALSE" Group="AnywhereNow">
			<CHOICES>
			  <CHOICE>01</CHOICE>
			  <CHOICE>02</CHOICE>
			  <CHOICE>03</CHOICE>
			  <CHOICE>04</CHOICE>
			  <CHOICE>05</CHOICE>
			  <CHOICE>06</CHOICE>
			  <CHOICE>07</CHOICE>
			  <CHOICE>08</CHOICE>
			  <CHOICE>09</CHOICE>
			  <CHOICE>10</CHOICE>
			  <CHOICE>11</CHOICE>
			  <CHOICE>12</CHOICE>
			  <CHOICE>13</CHOICE>
			  <CHOICE>14</CHOICE>
			  <CHOICE>15</CHOICE>
			  <CHOICE>16</CHOICE>
			  <CHOICE>17</CHOICE>
			  <CHOICE>18</CHOICE>
			  <CHOICE>19</CHOICE>
			  <CHOICE>20</CHOICE>
			  <CHOICE>21</CHOICE>
			  <CHOICE>22</CHOICE>
			  <CHOICE>23</CHOICE>
			  <CHOICE>24</CHOICE>
			  <CHOICE>25</CHOICE>
			</CHOICES>
			</Field>' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{a6ead34c-b6eb-4060-9684-628f30c0f6f9}" Type="Boolean" Name="wsp_ucc_visible" DisplayName="Visible" Required="FALSE" Group="AnywhereNow"><Default>1</Default></Field>' -IgnoreDuplicateException
            # CT
			$ctName = "SettingsList"
            AddPnPContentType $ctName "0x010088d3ca68b11b4c11bd6c3a07cc246063" "Contenttype for storing Settings in a SettingsList list"
			AddPnPFieldsToContentType $ctName @("wsp_ucc_URL", "wsp_ucc_HeaderTitle", "wsp_ucc_sort", "wsp_ucc_visible")

            # SettingValue
            # Fields
            AddPnPFieldFromXml '<Field ID="{4b030907-8624-4576-ae8e-a59276a240b5}" Type="Choice" Name="wsp_ucc_sv_type" DisplayName="Type" Required="TRUE" Group="AnywhereNow">
			<CHOICES>
			  <CHOICE>Dropdown</CHOICE>
			  <CHOICE>Boolean</CHOICE>
			  <CHOICE>RegEx</CHOICE>
			  <CHOICE>Playlist</CHOICE>
			</CHOICES>
			</Field>' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{4631b4eb-7a7a-48b2-a3f9-1db247b01d9b}" Type="Note" Name="wsp_ucc_sv_value" DisplayName="Value" Required="FALSE" NumLines="1" RichText="FALSE" UnlimitedLengthInDocumentLibrary="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{b58eba37-8c65-498f-88ba-48c307e32e77}" Type="Text" Name="wsp_ucc_sv_default" DisplayName="Default" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{69f7b854-8510-49c4-a1b3-e899cb21025e}" Type="Note" Name="wsp_ucc_sv_description" DisplayName="Description" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{a0d6b023-a5c6-4f27-ae45-b31a0c230022}" Type="Choice" Name="wsp_ucc_sv_scope" DisplayName="Scope" Required="FALSE" Group="AnywhereNow">
			<CHOICES>
			  <CHOICE>User</CHOICE>
			  <CHOICE>Config</CHOICE>
			  <CHOICE>Flow</CHOICE>
			  <CHOICE>CDR</CHOICE>
			  <CHOICE>Chat</CHOICE>
			  <CHOICE>Email</CHOICE>
			  <CHOICE>Recording</CHOICE>
			  <CHOICE>Voicemail</CHOICE>
			  <CHOICE>CRM</CHOICE>
			  <CHOICE>Prompt</CHOICE>
			  <CHOICE>Quality Monitor</CHOICE>
			  <CHOICE>Playlist</CHOICE>
			</CHOICES>
			</Field>' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{d1b47176-a46a-4be4-9771-85ebe03ce923}" Type="Text" Name="wsp_ucc_sv_settinggroup" DisplayName="SettingGroup" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{35935156-6fbe-4fc4-b959-f34184e71222}" Type="Boolean" Name="wsp_ucc_sv_readonly" DisplayName="ReadOnly" Required="FALSE" Group="AnywhereNow">
			<Default>0</Default>
			</Field>' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{22a372b4-fdff-467b-aa47-d1530e97e7b7}" Type="Boolean" Name="wsp_ucc_sv_active" DisplayName="Active" Required="FALSE" Group="AnywhereNow">
			<Default>1</Default>
			</Field>' -IgnoreDuplicateException
			# CT
			$ctName = "SettingValue"
            AddPnPContentType $ctName "0x0100c0ed1b9fa9e14941adf005356016a52e" "Add a SettingValue item to the SettingValues list"
			AddPnPFieldsToContentType $ctName @("!wsp_ucc_sv_type", "wsp_ucc_sv_default", "wsp_ucc_sv_description", "wsp_ucc_sv_scope", "wsp_ucc_sv_settinggroup", "wsp_ucc_sv_readonly", "wsp_ucc_sv_active", "wsp_ucc_sv_value")

            # Skill, CountDownSkill, AvailabilitySkill, ChatSkill, ForwardSkill, ChatForwardSkill, CountdownAvailabilitySkill
            # Fields
            AddPnPFieldFromXml '<Field ID="{697E5014-57D3-4842-8D5A-E6AA9454BD30}" Type="Boolean" Name="wsp_ucc_ShowOnWallboard" DisplayName="ShowOnWallboard" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{10a5cbd6-e942-4c3c-b0e9-adbd7a4e4115}" Type="Number" Name="StartCountDownSeconds" DisplayName="StartCountDownSeconds" Min="0" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
			AddPnPFieldFromXml '<Field ID="{50800ef2-3c02-4d73-b43e-269b152f4e8a}" Type="Number" Name="EndCountDownSeconds" DisplayName="EndCountDownSeconds" Min="0" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
			AddPnPFieldFromXml '<Field ID="{2962bf49-1747-4c4b-abd1-a68d55c3aabc}" Type="Lookup" Name="wsp_ucc_skills_escapeskill" DisplayName="EscapeSkill" Group="AnywhereNow" Required="FALSE" EnforceUniqueValues="FALSE" List="{$listId}" ShowField="Title" Mult="FALSE" Sortable="TRUE" />' "Skills" -IgnoreDuplicateException
		    AddPnPFieldFromXml  '<Field ID="{6002f3cc-c0af-41ec-977b-5285d57998d3}" Type="Choice" Name="Availability" DisplayName="Availability" Required="FALSE" Group="AnywhereNow">
			<Default>Available</Default>
			<CHOICES>
			  <CHOICE>Available</CHOICE>
			  <CHOICE>Busy</CHOICE>
			  <CHOICE>Away</CHOICE>
			  <CHOICE>Offline</CHOICE>
			</CHOICES>
			</Field>' -IgnoreDuplicateException
			AddPnPFieldFromXml '<Field ID="{FB9A2903-321C-4D6A-AA81-96A93D1642B5}" Type="Text" Name="wsp_ucc_ForwardToSip" DisplayName="ForwardToSip" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{49346D8F-7099-4776-9D29-5B1E908F605A}" Type="Boolean" Name="ForwardWithDTMF" DisplayName="ForwardWithDTMF" Required="FALSE" Group="AnywhereNow">
			<Default>1</Default>
			</Field>' -IgnoreDuplicateException
			# PathFinder fields
            AddPnPFieldFromXml '<Field ID="{A1B2C3D4-E5F6-7890-ABCD-EF1234567890}" Type="Boolean" Name="wsp_ucc_pathfinderenabled" DisplayName="PathFinderEnabled" Required="FALSE" Group="AnywhereNow"><Default>1</Default></Field>' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{B2C3D4E5-F6A7-8901-BCDE-F12345678901}" Type="Note" Name="wsp_ucc_pathfinderdescription" DisplayName="PathfinderDescription" Required="FALSE" NumLines="6" RichText="FALSE" Description="For each Skill, enter a clear Description (an A.I. Prompt) which explains when the Skill should be used" Group="AnywhereNow" />' -IgnoreDuplicateException
			# CT
			$ctName = "Skill"
            AddPnPContentType $ctName "0x0100eaa9773c27c34c839546ffa73807bf37" "Add a Skill item to the Skill list"
			AddPnPFieldsToContentType $ctName @("wsp_ucc_ShowOnWallboard", "wsp_ucc_pathfinderenabled", "wsp_ucc_pathfinderdescription")
            $ctName = "CountDownSkill"
            AddPnPContentType $ctName "0x01003343ffba61094f7ab40092305f0ed699" "Add a CountDown Skill item to the Skill list"
			AddPnPFieldsToContentType $ctName @("wsp_ucc_ShowOnWallboard", "!StartCountDownSeconds", "!EndCountDownSeconds", "wsp_ucc_skills_escapeskill")
            $ctName = "AvailabilitySkill"
            AddPnPContentType $ctName "0x01007755ebc65e59614ea6031b7cd27bcb81" "Add a Availbility Skill item to the Skill list"
			AddPnPFieldsToContentType $ctName @("wsp_ucc_ShowOnWallboard", "!Availability", "!wsp_ucc_skills_escapeskill")
            $ctName = "ChatSkill"
            AddPnPContentType $ctName "0x0100ea6b62e0be14412a809964b346565f45" "Add a Chat Skill item to the Skill list"
			AddPnPFieldsToContentType $ctName @("wsp_ucc_ShowOnWallboard")
            $ctName = "ForwardSkill"
            AddPnPContentType $ctName "0x0100a5b746647f034c3e8fea942dee4c09c5" "Add a Forward Skill item to the Skill list"
			AddPnPFieldsToContentType $ctName @("!wsp_ucc_ForwardToSip", "ForwardWithDTMF")
            $ctName = "ChatForwardSkill"
            AddPnPContentType $ctName "0x010017c7b8112b4c40628aa21c88b6f9406f" "Add a Chat Forward Skill item to the Skill list"
			AddPnPFieldsToContentType $ctName @("!wsp_ucc_ForwardToSip", "wsp_ucc_ShowOnWallboard")
            $ctName = "CountdownAvailabilitySkill"
            AddPnPContentType $ctName "0x0100c35cf7e695e54c3385add4b9223c8481" "Add a Countdown Availability Skill item to the Skill list"
			AddPnPFieldsToContentType $ctName @("wsp_ucc_ShowOnWallboard", "!Availability", "!StartCountDownSeconds", "!EndCountDownSeconds", "!wsp_ucc_skills_escapeskill")

            # SkillsPerAgent
            # Fields
            AddPnPFieldFromXml '<Field ID="{62d6413b-1997-4c6f-92ec-9a4ccff15ecb}" Type="Lookup" Name="wsp_ucc_spa_skill" DisplayName="Skill" Group="AnywhereNow" Required="TRUE" EnforceUniqueValues="FALSE" List="{$listId}" ShowField="Title" Mult="FALSE" Sortable="TRUE" />' "Skills" -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{317F21BC-3A00-4574-98BA-447949AA95E4}" Type="Number" Name="wsp_ucc_Score" DisplayName="Score" Min="0" Max="100" Required="TRUE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{745FFA4C-7B3A-4198-8B97-40129C21CF30}" Type="Lookup" Name="wsp_ucc_spa_Agent" DisplayName="Agent" Group="AnywhereNow" Required="TRUE" EnforceUniqueValues="FALSE" List="{$listId}" ShowField="wsp_ucc_Agent" Mult="FALSE" Sortable="TRUE" />' "Agents" -IgnoreDuplicateException
			# CT
			$ctName = "SkillsPerAgent"
            AddPnPContentType $ctName "0x01003ccb5eaf5f424624891e78760d424e38" "Contenttype for storing SkillsPerAgent in a SkillsPerAgent list"
			AddPnPFieldsToContentType $ctName @("!wsp_ucc_spa_skill", "!wsp_ucc_Score", "!wsp_ucc_spa_Agent")

            # Supervisor
            # Fields
            AddPnPFieldFromXml '<Field ID="{1223c3fb-222d-4f14-9459-34c95bf9e251}" Type="Text" Name="wsp_ucc_Supervisor" DisplayName="Supervisor" Required="TRUE" Group="AnywhereNow" />' -IgnoreDuplicateException
			# CT
			$ctName = "Supervisor"
            AddPnPContentType $ctName "0x010074e29e8eef3a41ca9b8aa8dc816f0541" "Add a Supervisor item to the Supervisors list"
			AddPnPFieldsToContentType $ctName @("!wsp_ucc_Supervisor")

            # VoicemailAgent
            # Fields
            AddPnPFieldFromXml '<Field ID="{a32ade13-3a77-4fbc-82f7-5fd8aa8e65fd}" Type="Text" Name="wsp_ucc_voicemailagents_uri" DisplayName="Uri" Required="FALSE" Group="AnywhereNow" />' -IgnoreDuplicateException
            AddPnPFieldFromXml '<Field ID="{c22a07fd-fe53-41cb-a263-92e119ce02fd}" Type="Number" Name="wsp_ucc_voicemailagents_priority" DisplayName="Priority" Required="FALSE" Min="0" Group="AnywhereNow" />' -IgnoreDuplicateException
			# CT
			$ctName = "VoicemailAgent"
            AddPnPContentType $ctName "0x010034f6da069e5a4ec6b7918c5e00a2545b" "Add a VoicemailAgent item to the VoicemailAgents list"
			AddPnPFieldsToContentType $ctName @("!wsp_ucc_voicemailagents_uri", "!wsp_ucc_voicemailagents_priority")
    }
    catch 
	{
		Error "Exception Message: $($_.Exception.Message)"
		UpdateStatus $siteItem["ID"] "Error creating Site Columns & Content Types"
		exit
    }
}
