Migrate configuration data for records

This article includes procedures for migrating configuration data for records. You must migrate the data in the order of:

  1. skill-based routing rulesets
  2. capacity profiles
  3. queues
  4. intake rules
  5. workstreams

The procedures include tables with entity information and corresponding sample schemas for each configuration.

Migrate configuration using a solution

You can use solutions to move certain configuration items between environments. If a configuration in your unified routing setup has the following items, they can be moved using a solution.

  1. Add the components to a solution and export
    1. Agent Script (msdyn_productivityagentscripts)
    2. Agent Script Step (msdyn_productivityagentscriptsteps)
    3. Application Tab Template (msdyn_applicationtabtemplates)
    4. Notification Field (msdyn_notificationfields)
    5. Notification Template (msdyn_notificationtemplates)
    6. Macro (processes)
    7. Session Templates (msdyn_sessiontemplates)
    8. Template Parameter (msdyn_templateparameters)
  2. Import the solution into the target environment

Migrate configuration for skill-based routing rulesets

If skill-based routing rulesets are used in your unified routing setup, perform the steps to migrate the corresponding configuration.

For sample schema to get all the required records, see Sample schema for skill-based routing configuration.

  1. Use the Configuration Migration tool to create the schema and export data from the source organization for skill-based routing configuration.

    • Entity display name: When you create the schema, select the entities in the sequence that's mentioned in the table.
    • Attribute display name: We recommend that you select the attributes defined in the following table. You don't need to select the out-of-the-box system-defined attributes like Created By, Created On, Modified By, Modified On, and Owner. You can select custom attributes if necessary.

    Important

    You must manually create bookableresourcecharacteristictype (Global option set value) in the target organization, if necessary.

    Entity display name (Logical name) Attribute display name (Logical name) Use FetchXML to filter records
    Characteristic (characteristic)
    • Characteristic Type (characteristictype)
    • Characteristic (characteristicid)
    • Description (description)
    • Name (name)
    Rating Model (ratingmodel)
    • Max Rating Value (maxratingvalue)
    • Min Rating Value (minratingvalue)
    • Name (name)
    • Rating Model (ratingmodelid)
    Rating Value (ratingvalue)
    • Name (name)
    • Rating Model (ratingmodel)
    • Rating Value (ratingvalueid)
    • Value (value)
  2. Generate the schema and save it.

  3. Export the data and generate the compressed (zip) file.

  4. Use the Configuration Migration tool, and select the option to import data into the target organization using the compressed file.

Migrate configuration for capacity profiles

If you have configured capacity profiles in your unified routing setup, perform the steps to migrate the corresponding configuration.

For sample schema to get all the required records, see Sample schema for capacity profiles.

  1. Use the Configuration Migration tool to create the schema and export data in source organization for capacity profiles configuration.

    • Entity display name: When you create the schema, select the entities in the same sequence as mentioned in the table.
    • Attribute display name: We recommend that you select the attributes defined in the following table. You don't need to select the out-of-the-box system defined attributes like Created By, Created On, Modified By, Modified On, and Owner. You can select custom attributes, if necessary.
    • Use FetchXML to filter records: For each entity, use the appropriate FetchXML query that's mentioned in the following table to get single, multiple, or all records based on your requirement. For single or multiple records, you need to use source organization to get the correct name in uiname and GUID in value. If required, you can use the ADVANCED FIND menu item to construct the appropriate FetchXML query.
    • Configure import settings:
      • For the Decision contract entity, ensure that you select the Do not update existing records checkbox.

      • For every entity, including the Decision contract entity, ensure that you select the primary key field of the entity to be used as a field to compare on update. An example for Account is as follows.

        Example of an entity to compare on update.

    Note

    The sample query listed in the following table gets single or multiple records. The query has considered the entity as incident and task. Based on your requirements, ensure that you update the entity logical name in the FetchXML query.

    The following table summarizes the entities and corresponding FetchXML samples.

    Entity display name (Logical name) Attribute display name (Logical name) Use FetchXML to filter records
    Capacity Profile (msdyn_capacityprofile)
    • Block Assignment (msdyn_blockassignment)
    • Capacity Profile (msdyn_capacityprofileid)
    • Default Max Units (msdyn_defaultmaxunits)
    • Name (msdyn_name)
    • Reset Duration(msdyn_resetduration)
    • Unique Name (msdyn_uniquename)
    Sample 1: For all capacity profile records
    <fetch>
    <entity name="msdyn_capacityprofile">
    <filter type="and">
    <condition attribute="ismanaged" operator="eq" value="0" />
    </filter>
    </entity>
    </fetch>

    Sample 2: For a single capacity profile record
    <fetch>
    <entity name="msdyn_capacityprofile">
    <filter type="and">
    <condition attribute="msdyn_capacityprofileid" operator="eq" uiname="Demo Capacity Profile 1" uitype="msdyn_capacityprofile" value="{F57CFE3C-14BD-D53E-F423-A1E7F9749DFB}" />
    </filter>
    </entity>
    </fetch>

    Sample 3: For multiple capacity profile records
    <fetch>
    <entity name="msdyn_capacityprofile">
    <filter type="and">
    <condition attribute="msdyn_capacityprofileid" operator="in">
    <value uiname="Demo Capacity Profile 1" uitype="msdyn_capacityprofile">{F57CFE3C-14BD-D53E-F423-A1E7F9749DFB}</value>
    <value uiname="Demo Capacity Profile 2" uitype="msdyn_capacityprofile">{D0B8ABFB-4A9F-0B1F-6FF4-8003E29A623C}</value>
    </condition>
    </filter>
    </entity>
    </fetch>
  2. Generate the schema and save it.

  3. Export the data and generate the compressed (zip) file.

  4. Use the Configuration Migration tool, and select the option to import data into the target organization.

Migrate configuration for record queues

Use the Configuration Migration tool to create the schema and export data from the source organization for the record queues configuration.

  • Entity display name: When you create the schema, select the entities in the same sequence as mentioned in the table.
  • Attribute display name: We recommend that you select the attributes defined in the following table. You don't need to select the out-of-the-box system defined attributes like Created By, Created On, Modified By, Modified On, and Owner. You can select custom attributes, if necessary.
  • Use FetchXML to filter records: For each entity, use the appropriate FetchXML query that's mentioned in the following table to get single, multiple, or all records based on your requirement. For single or multiple records, you need to use source organization to get the correct name in uiname and GUID in value. If required, you can use the ADVANCED FIND menu item to construct the appropriate FetchXML query.
  • Configure import settings:
    • For the Decision contract entity, ensure that you select the Do not update existing records checkbox.

    • For every entity, including the Decision contract entity, ensure that you select the primary key field of the entity to be used as a field to compare on update. An example for Account is as follows.

      Example of an entity to compare on update.

Note

The sample query listed in the following table gets single or multiple records. The query has considered the entity as incident and task. Based on your requirements, ensure that you update the entity logical name in the FetchXML query.

If you're using the out-of-the-box assignment methods for queues, such as highest capacity and round robin, skip the following entities:

  • Decision rule set
  • Assignment configuration
  • Assignment configuration step

The assignment rulesets must be available in the system before the Configuration Migration tool imports the selection criteria. Hence, you need to perform the following steps in the specified order to migrate configuration for record queues:

Important

  • For every import of queue records, you must either create new queue records or update existing queue records. You must not mix the actions in the same data import.
  • When all records in the data.xml of queue entity are for creation, ensure that the following line is present in the schema.xml: <field displayname="Queue type" name="msdyn_queuetype" type="optionsetvalue" customfield="true"/> and correspondingly data will also have the field for msdyn_queuetype.
  • When all records in the data.xml of queue entity are for update, ensure that you remove the following line in the schema.xml: <field displayname="Queue type" name="msdyn_queuetype" type="optionsetvalue" customfield="true"/> and correspondingly data will also not have that field for msdyn_queuetype.
  • When the queue that you want to migrate has an overflow condition set, then you must export and import the decision ruleset first. The migration sequence should look as follows:
    • Decision contract
    • Decision ruleset
    • Queue
    • Assignment Configuration
    • Assignment Configuration Step without selection criteria
    • Operating Hour
    • Overflow Action
  • You can't migrate the Calendar item associated with the Operating Hour entity. You'll need to set it correctly after you import the Operating Hour entity into the target environment.

Step 1: Export and import rulesets without selection criteria

The following table summarizes the entities and corresponding FetchXML samples.

S. No. Entity display name (Logical name) Attribute display name (Logical name) Use FetchXML to filter records
1. Queue (queue)
  • Assignment Input Contract Id (msdyn_assignmentinputcontractid)
  • Assignment Strategy (msdyn_assignmentstrategy)
  • Description (description)
  • Is Default Queue (msdyn_isdefaultqueue)
  • Is Omnichannel queue (msdyn_isomnichannelqueue)
  • Name (name)
  • Priority (msdyn_priority)
  • Queue (queueid)
  • Queue type (msdyn_queuetype)
  • Type (queueviewtype)
  • Operating Hours (msdyn_operatinghourid)
  • Prequeue Overflow Ruleset (msdyn_prequeueoverflowrulesetid)
Sample 1: All queues for records

Sample 2: Single queue for records

Sample 3: Multiple queues for records
2. Decision contract (msdyn_decisioncontract)
  • Contract definition (msdyn_contractdefinition)
  • Decision contract (msdyn_decisioncontractid)
  • Name (msdyn_name)
  • Unique name (msdyn_uniquename)
Sample 1: Decision contract for all record queues

Sample 2: Decision contract for a single record queue

Sample 3: Decision contract for multiple record queues
3. Decision ruleset without selection criteria (msdyn_decisionruleset)
  • AI builder model (msdyn_aibmodelid)
  • Authoring mode (msdyn_authoringmode)
  • Decision rule set (msdyn_decisionrulesetid)
  • Description (msdyn_description)
  • Input contract (msdyn_inputcontractid)
  • Is input collection (msdyn_isinputcollection)
  • ML model type (msdyn_mlmodeltype)
  • Name (msdyn_name)
  • Output contract (msdyn_outputcontractid)
  • Rule set definition (msdyn_rulesetdefinition)
  • Rule set type (msdyn_rulesettype)
  • Unique name (msdyn_uniquename)
  • FetchXML for ruleset (msdyn_fetchxml)
Sample 1: Decision ruleset for all record queues without selection criteria defined

Sample 2: Decision ruleset for a single record queue without selection criteria defined

Sample 3: Decision ruleset for multiple record queues without selection criteria defined
4. Assignment Configuration (msdyn_assignmentconfiguration)
  • Assignment Configuration (msdyn_assignmentconfigurationid)
  • Description (msdyn_description)
  • Is Active Configuration (msdyn_isactiveconfiguration)
  • Name (msdyn_name)
  • Queue (msdyn_queueid)
  • Unique Name (msdyn_uniquename)
Sample 1: Assignment configuration for all record queues

Sample 2: Assignment configuration for a single record queue

Sample 3: Assignment configuration for multiple record queues
5. Assignment Configuration Step without selection criteria (msdyn_assignmentconfigurationstep)
  • Assignment Configuration (msdyn_assignmentconfigurationid)
  • Assignment Configuration Step (msdyn_assignmentconfigurationstepid)
  • Is default ruleset (msdyn_isdefaultruleset)
  • Name (msdyn_name)
  • Rule Set (msdyn_rulesetid)
  • Step Order (msdyn_steporder)
  • Step Type (msdyn_type)
  • Unique Name (msdyn_uniquename)
Sample 1: Assignment configuration step for all record queues without selection criteria defined

Sample 2: Assignment configuration step for a single record queue without selection criteria defined

Sample 3: Assignment configuration step for multiple record queues without selection criteria defined
6. Operating Hour (msdyn_operatinghour)
  • Description (msdyn_description)
  • Name (msdyn_name)
  • Operating Hour (msdyn_operatinghourid)
  • Status (statecode)
  • Status Reason (statuscode)
Sample 1: Operating Hours for all record queues

Sample 2: Operating Hours for a single record queue

Sample 3: Operating Hours for multiple record queues
7. Overflow Action Config(msdyn_overflowactionconfig)
  • Name (msdyn_name)
  • Overflow Action Config (msdyn_overflowactionconfigid)
  • Overflow Action Data (msdyn_overflowactiondata)
  • Overflow Action Type(msdyn_overflowactiontype)
  • Status (statecode)
  • Status Reason (statuscode)
Sample 1: Overflow Action Config filtered to specific records

Perform the following steps to export and import the rulesets:

  1. Generate the schema and save it.

  2. Export the data and generate the compressed (zip) file.

  3. Extract the zip file, open the data.xml file present in the extracted folder, and do the following:

    • In the source and target organizations, run the following OData API call and note the GUID of msdyn_decisioncontractid.

      https://<OrgURL>/api/data/v9.1/msdyn_decisioncontracts?$select=msdyn_decisioncontractid&$filter=msdyn_uniquename eq 'msdyn_assignmentoutput'

      In data.xml file, replace all the occurrences of the msdyn_decisioncontractid GUID in the source organization with the msdyn_decisioncontractid GUID of the target organization.

    • In the source and target organizations, run the following OData API call and note the GUID of msdyn_decisioncontractid.

      https://<OrgURL>/api/data/v9.1/msdyn_decisioncontracts?$select=msdyn_decisioncontractid&$filter=msdyn_uniquename eq 'msdyn_selectionruleoutput'

      In data.xml file, replace all occurrences of the msdyn_decisioncontractid GUID in the source organization with the msdyn_decisioncontractid GUID of the target organization.

    • In the source and target organizations, run the following OData API call and note the GUID of msdyn_decisioncontractid. https://<OrgURL>/api/data/v9.1/msdyn_decisioncontracts?$select=msdyn_decisioncontractid&$filter=msdyn_uniquename eq 'msdyn_queueoverflowrulesetinput'

      In data.xml file, replace all the occurrences of the msdyn_decisioncontractid GUID in the source organization with the msdyn_decisioncontractid GUID of the target organization.

    • In the source and target organizations, run the following OData API call and note the GUID of msdyn_decisioncontractid.

    https://<OrgURL>/api/data/v9.1/msdyn_decisioncontracts?$select=msdyn_decisioncontractid&$filter=msdyn_uniquename eq 'msdyn_queueoverflowrulesetoutput'

    In data.xml file, replace all occurrences of the msdyn_decisioncontractid GUID in the source organization with the msdyn_decisioncontractid GUID of the target organization.

  4. Package the extracted content again.

  5. Use the Configuration Migration tool, select the option to import data, and then select the compressed file.

Note

Set the Calendar Item associated with the Operating Hour entity correctly after you import the Operating Hour entity into the target environment.

For sample schema to get all the required records, see Sample schema for record queues step 1.

Step 2: Export and import rulesets with selection criteria defined

The following table summarizes the entities and corresponding FetchXML samples.

S. No. Entity display name (Logical name) Attribute display name (Logical name) Use FetchXML to filter records
1. Decision ruleset with selection criteria (msdyn_decisionruleset)
  • AI builder model (msdyn_aibmodelid)
  • Authoring mode (msdyn_authoringmode)
  • Decision rule set (msdyn_decisionrulesetid)
  • Description (msdyn_description)
  • Input contract (msdyn_inputcontractid)
  • Is input collection (msdyn_isinputcollection)
  • ML model type (msdyn_mlmodeltype)
  • Name (msdyn_name)
  • Output contract (msdyn_outputcontractid)
  • Rule set definition (msdyn_rulesetdefinition)
  • Rule set type (msdyn_rulesettype)
  • Unique name (msdyn_uniquename)
Sample 1: Decision ruleset for all record queues with selection criteria defined

Sample 2: Decision ruleset for a single record queue with selection criteria defined

Sample 3: Decision ruleset for multiple record queues with selection criteria defined
2. Assignment Configuration Step with selection criteria (msdyn_assignmentconfigurationstep)
  • Assignment Configuration (msdyn_assignmentconfigurationid)
  • Assignment Configuration Step (msdyn_assignmentconfigurationstepid)
  • Is default ruleset (msdyn_isdefaultruleset)
  • Name (msdyn_name)
  • Rule Set (msdyn_rulesetid)
  • Step Order (msdyn_steporder)
  • Step Type (msdyn_type)
  • Unique Name (msdyn_uniquename)
Sample 1: Assignment configuration step for all record queues with selection criteria defined

Sample 2: Assignment configuration step for a single record queue with selection criteria defined

Sample 3: Assignment configuration step for multiple record queues with selection criteria defined

Perform the following steps to export and import the rulesets:

  1. Generate the schema and save it.

  2. Export the data and generate the compressed (zip) file.

  3. Extract the zip file, open the data.xml file present in the extracted folder, and do the following:

    • In the source and target organizations, run the following OData API call and note the GUID of msdyn_decisioncontractid.

      https://<OrgURL>/api/data/v9.1/msdyn_decisioncontracts?$select=msdyn_decisioncontractid&$filter=msdyn_uniquename eq 'msdyn_assignmentoutput'

      In data.xml file, replace all the occurrences of the msdyn_decisioncontractid GUID in the source organization with the msdyn_decisioncontractid GUID of the target organization.

    • In the source and target organizations, run the following OData API call and note the GUID of msdyn_decisioncontractid.

      https://<OrgURL>/api/data/v9.1/msdyn_decisioncontracts?$select=msdyn_decisioncontractid&$filter=msdyn_uniquename eq 'msdyn_selectionruleoutput'

      In data.xml file, replace all occurrences of the msdyn_decisioncontractid GUID in the source organization with the msdyn_decisioncontractid GUID of the target organization.

  4. Package the extracted content again.

  5. Use the Configuration Migration tool, select the option to import data, and then select the compressed file.

For sample schema to get all the required records, see Sample schema for record queues step 2.

FetchXML for queues

Sample 1: All queues for records

<fetch> 
   <entity name="queue">
    <filter type="and">
      <condition attribute="msdyn_queuetype" operator="eq" value="192350001" />
      <condition attribute="msdyn_isomnichannelqueue" operator="eq" value="1" />
      <condition attribute="queueid" operator="ne" uiname="Default entity queue" uitype="queue" value="{5A4B76B0-DAB5-4717-9743-9490F2F822C6}" />
    </filter>
  </entity>
</fetch>

Sample 2: Single queue for records

<fetch> 
   <entity name="queue"> 
    <filter type="and"> 
      <condition attribute="queueid" operator="eq" uiname="Test Record Queue 1" uitype="queue" value="{A5ED5CAA-3A54-EC11-8F8F-000D3A1CBB9E}" /> 
    </filter> 
   </entity> 
</fetch>

Sample 3: Multiple queues for records

<fetch> 
   <entity name="queue"> 
    <filter type="and"> 
     <condition attribute="queueid" operator="in"> 
      <value uiname="Test Record Queue 1" uitype="queue">{A5ED5CAA-3A54-EC11-8F8F-000D3A1CBB9E}</value> 
      <value uiname="Test Record Queue 2" uitype="queue">{B2862B31-3B54-EC11-8F8F-000D3A1CBB9E}</value> 
     </condition> 
    </filter> 
   </entity> 
</fetch> 

FetchXML for decision contract entity

Sample 1: Decision contract for all record queues

<fetch distinct="true">
	<entity name="msdyn_decisioncontract">
		<filter type="or">
			<filter type="and">
				<condition attribute="msdyn_queuetype" entityname="aw" operator="eq" value="192350001" />
				<condition attribute="msdyn_isomnichannelqueue" entityname="aw" operator="eq" value="1" />
				<condition attribute="queueid" entityname="aw" operator="ne" uiname="Default entity queue" uitype="queue" value="{5A4B76B0-DAB5-4717-9743-9490F2F822C6}" />
			</filter>
			<filter type="and">
				<condition attribute="msdyn_isomnichannelqueue" entityname="be" operator="eq" value="1" />
				<condition attribute="msdyn_queuetype" entityname="be" operator="eq" value="192350001" />
				<condition attribute="queueid" entityname="be" operator="ne" uiname="Default entity queue" uitype="queue" value="{5A4B76B0-DAB5-4717-9743-9490F2F822C6}" />
			</filter>
			<filter type="and">
				<condition attribute="msdyn_isomnichannelqueue" entityname="bm" operator="eq" value="1" />
				<condition attribute="msdyn_queuetype" entityname="bm" operator="eq" value="192350001" />
				<condition attribute="queueid" entityname="bm" operator="ne" uiname="Default entity queue" uitype="queue" value="{5A4B76B0-DAB5-4717-9743-9490F2F822C6}" />
			</filter>
		</filter>
		<link-entity name="queue" from="msdyn_assignmentinputcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="aw"></link-entity>
		<link-entity name="msdyn_decisionruleset" from="msdyn_inputcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="bb">
			<link-entity name="msdyn_assignmentconfigurationstep" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="outer" alias="bc">
				<link-entity name="msdyn_assignmentconfiguration" from="msdyn_assignmentconfigurationid" to="msdyn_assignmentconfigurationid" link-type="outer" alias="bd">
					<link-entity name="queue" from="queueid" to="msdyn_queueid" link-type="outer" alias="be"></link-entity>
				</link-entity>
			</link-entity>
		</link-entity>
		<link-entity name="msdyn_decisionruleset" from="msdyn_outputcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="bj">
			<link-entity name="msdyn_assignmentconfigurationstep" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="outer" alias="bk">
				<link-entity name="msdyn_assignmentconfiguration" from="msdyn_assignmentconfigurationid" to="msdyn_assignmentconfigurationid" link-type="outer" alias="bl">
					<link-entity name="queue" from="queueid" to="msdyn_queueid" link-type="outer" alias="bm"></link-entity>
				</link-entity>
			</link-entity>
		</link-entity>
	</entity>
</fetch>  

Sample 2: Decision contract for a single record queue

<fetch distinct="true">
	<entity name="msdyn_decisioncontract">
		<filter type="or">
			<filter type="and">
				<condition attribute="queueid" entityname="aw" operator="eq" uiname="Test Record Queue 1" uitype="queue" value="{A5ED5CAA-3A54-EC11-8F8F-000D3A1CBB9E}" />
			</filter>
			<filter type="and">
				<condition attribute="queueid" entityname="be" operator="eq" uiname="Test Record Queue 1" uitype="queue" value="{A5ED5CAA-3A54-EC11-8F8F-000D3A1CBB9E}" />
			</filter>
			<filter type="and">
				<condition attribute="queueid" entityname="bm" operator="eq" uiname="Test Record Queue 1" uitype="queue" value="{A5ED5CAA-3A54-EC11-8F8F-000D3A1CBB9E}" />
			</filter>
		</filter>
		<link-entity name="queue" from="msdyn_assignmentinputcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="aw"></link-entity>
		<link-entity name="msdyn_decisionruleset" from="msdyn_inputcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="bb">
			<link-entity name="msdyn_assignmentconfigurationstep" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="outer" alias="bc">
				<link-entity name="msdyn_assignmentconfiguration" from="msdyn_assignmentconfigurationid" to="msdyn_assignmentconfigurationid" link-type="outer" alias="bd">
					<link-entity name="queue" from="queueid" to="msdyn_queueid" link-type="outer" alias="be"></link-entity>
				</link-entity>
			</link-entity>
		</link-entity>
		<link-entity name="msdyn_decisionruleset" from="msdyn_outputcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="bj">
			<link-entity name="msdyn_assignmentconfigurationstep" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="outer" alias="bk">
				<link-entity name="msdyn_assignmentconfiguration" from="msdyn_assignmentconfigurationid" to="msdyn_assignmentconfigurationid" link-type="outer" alias="bl">
					<link-entity name="queue" from="queueid" to="msdyn_queueid" link-type="outer" alias="bm"></link-entity>
				</link-entity>
			</link-entity>
		</link-entity>
	</entity>
</fetch> 

Sample 3: Decision contract for multiple record queues

<fetch distinct="true">
	<entity name="msdyn_decisioncontract">
		<filter type="or">
			<filter type="and">
				<condition attribute="queueid" entityname="aw" operator="in">
					<value uiname="Test Record Queue 1" uitype="queue">{A5ED5CAA-3A54-EC11-8F8F-000D3A1CBB9E}</value>
					<value uiname="Test Record Queue 2" uitype="queue">{B2862B31-3B54-EC11-8F8F-000D3A1CBB9E}</value>
				</condition>
			</filter>
			<filter type="and">
				<condition attribute="queueid" entityname="be" operator="in">
					<value uiname="Test Record Queue 1" uitype="queue">{A5ED5CAA-3A54-EC11-8F8F-000D3A1CBB9E}</value>
					<value uiname="Test Record Queue 2" uitype="queue">{B2862B31-3B54-EC11-8F8F-000D3A1CBB9E}</value>
				</condition>
			</filter>
			<filter type="and">
				<condition attribute="queueid" entityname="bm" operator="in">
					<value uiname="Test Record Queue 1" uitype="queue">{A5ED5CAA-3A54-EC11-8F8F-000D3A1CBB9E}</value>
					<value uiname="Test Record Queue 2" uitype="queue">{B2862B31-3B54-EC11-8F8F-000D3A1CBB9E}</value>
				</condition>
			</filter>
		</filter>
		<link-entity name="queue" from="msdyn_assignmentinputcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="aw"></link-entity>
		<link-entity name="msdyn_decisionruleset" from="msdyn_inputcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="bb">
			<link-entity name="msdyn_assignmentconfigurationstep" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="outer" alias="bc">
				<link-entity name="msdyn_assignmentconfiguration" from="msdyn_assignmentconfigurationid" to="msdyn_assignmentconfigurationid" link-type="outer" alias="bd">
					<link-entity name="queue" from="queueid" to="msdyn_queueid" link-type="outer" alias="be"></link-entity>
				</link-entity>
			</link-entity>
		</link-entity>
		<link-entity name="msdyn_decisionruleset" from="msdyn_outputcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="bj">
			<link-entity name="msdyn_assignmentconfigurationstep" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="outer" alias="bk">
				<link-entity name="msdyn_assignmentconfiguration" from="msdyn_assignmentconfigurationid" to="msdyn_assignmentconfigurationid" link-type="outer" alias="bl">
					<link-entity name="queue" from="queueid" to="msdyn_queueid" link-type="outer" alias="bm"></link-entity>
				</link-entity>
			</link-entity>
		</link-entity>
	</entity>
</fetch> 

FetchXML for decision ruleset entity for queues

Sample 1: Decision ruleset for all record queues without selection criteria

		<fetch distinct="true">
			<entity name="msdyn_decisionruleset">
				<link-entity name="msdyn_assignmentconfigurationstep" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="inner" alias="am">
					<filter>
						<condition attribute="msdyn_type" operator="ne" value="192350001" />
					</filter>
					<link-entity name="msdyn_assignmentconfiguration" from="msdyn_assignmentconfigurationid" to="msdyn_assignmentconfigurationid" link-type="inner" alias="an">
						<link-entity name="queue" from="queueid" to="msdyn_queueid" link-type="inner" alias="ao">
							<filter type="and">
								<condition attribute="msdyn_queuetype" operator="eq" value="192350001" />
								<condition attribute="msdyn_isomnichannelqueue" operator="eq" value="1" />
								<condition attribute="queueid" operator="ne" uiname="Default entity queue" uitype="queue" value="{5A4B76B0-DAB5-4717-9743-9490F2F822C6}" />
							</filter>
						</link-entity>
					</link-entity>
				</link-entity>
			</entity>
		</fetch>

Sample 2: Decision ruleset for a single record queue without selection criteria

		<fetch distinct="true">
			<entity name="msdyn_decisionruleset">
				<link-entity name="msdyn_assignmentconfigurationstep" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="inner" alias="am">
					<filter>
						<condition attribute="msdyn_type" operator="ne" value="192350001" />
					</filter>
					<link-entity name="msdyn_assignmentconfiguration" from="msdyn_assignmentconfigurationid" to="msdyn_assignmentconfigurationid" link-type="inner" alias="an">
						<link-entity name="queue" from="queueid" to="msdyn_queueid" link-type="inner" alias="ao">
							<filter type="and">
								<condition attribute="queueid" operator="eq" uiname="Test Record Queue 1" uitype="queue" value="{A5ED5CAA-3A54-EC11-8F8F-000D3A1CBB9E}" />
							</filter>
						</link-entity>
					</link-entity>
				</link-entity>
			</entity>
		</fetch>

Sample 3: Decision ruleset for multiple record queues without selection criteria

		<fetch distinct="true">
			<entity name="msdyn_decisionruleset">
				<link-entity name="msdyn_assignmentconfigurationstep" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="inner" alias="am">
					<filter>
						<condition attribute="msdyn_type" operator="ne" value="192350001" />
					</filter>
					<link-entity name="msdyn_assignmentconfiguration" from="msdyn_assignmentconfigurationid" to="msdyn_assignmentconfigurationid" link-type="inner" alias="an">
						<link-entity name="queue" from="queueid" to="msdyn_queueid" link-type="inner" alias="ao">
							<filter type="and">
								<condition attribute="queueid" operator="in">
									<value uiname="Test Record Queue 1" uitype="queue">{A5ED5CAA-3A54-EC11-8F8F-000D3A1CBB9E}</value>
									<value uiname="Test Record Queue 2" uitype="queue">{B2862B31-3B54-EC11-8F8F-000D3A1CBB9E}</value>
								</condition>
							</filter>
						</link-entity>
					</link-entity>
				</link-entity>
			</entity>
		</fetch>

FetchXML for assignment configuration entity

Sample 1: Assignment configuration for all record queues

<fetch>
	<entity name="msdyn_assignmentconfiguration">
		<link-entity name="queue" from="queueid" to="msdyn_queueid" link-type="inner" alias="bi">
			<filter type="and">
				<condition attribute="msdyn_queuetype" operator="eq" value="192350001" />
				<condition attribute="msdyn_isomnichannelqueue" operator="eq" value="1" />
				<condition attribute="queueid" operator="ne" uiname="Default entity queue" uitype="queue" value="{5A4B76B0-DAB5-4717-9743-9490F2F822C6}" />
			</filter>
		</link-entity>
	</entity>
</fetch> 

Sample 2: Assignment configuration for a single record queue

<fetch>
	<entity name="msdyn_assignmentconfiguration">
		<link-entity name="queue" from="queueid" to="msdyn_queueid" link-type="inner" alias="bi">
			<filter type="and">
				<condition attribute="queueid" operator="eq" uiname="Test Record Queue 1" uitype="queue" value="{A5ED5CAA-3A54-EC11-8F8F-000D3A1CBB9E}" />
			</filter>
		</link-entity>
	</entity>
</fetch> 

Sample 3: Assignment configuration for multiple record queues

<fetch>
	<entity name="msdyn_assignmentconfiguration">
		<link-entity name="queue" from="queueid" to="msdyn_queueid" link-type="inner" alias="bi">
			<filter type="and">
				<condition attribute="queueid" operator="in">
					<value uiname="Test Record Queue 1" uitype="queue">{A5ED5CAA-3A54-EC11-8F8F-000D3A1CBB9E}</value>
					<value uiname="Test Record Queue 2" uitype="queue">{B2862B31-3B54-EC11-8F8F-000D3A1CBB9E}</value>
				</condition>
			</filter>
		</link-entity>
	</entity>
</fetch> 

FetchXML for assignment configuration step entity

Sample 1: Assignment configuration step for all record queues without selection criteria

		<fetch>
			<entity name="msdyn_assignmentconfigurationstep">
				<filter>
						<condition attribute="msdyn_type" operator="ne" value="192350001" />
				</filter>
				<link-entity name="msdyn_assignmentconfiguration" from="msdyn_assignmentconfigurationid" to="msdyn_assignmentconfigurationid" link-type="inner" alias="bq">
					<link-entity name="queue" from="queueid" to="msdyn_queueid" link-type="inner" alias="br">
						<filter type="and">
							<condition attribute="msdyn_queuetype" operator="eq" value="192350001" />
							<condition attribute="msdyn_isomnichannelqueue" operator="eq" value="1" />
							<condition attribute="queueid" operator="ne" uiname="Default entity queue" uitype="queue" value="{5A4B76B0-DAB5-4717-9743-9490F2F822C6}" />
						</filter>
					</link-entity>
				</link-entity>
			</entity>
		</fetch>

Sample 2: Assignment configuration step for a single record queue without selection criteria

		<fetch>
			<entity name="msdyn_assignmentconfigurationstep">
				<filter>
						<condition attribute="msdyn_type" operator="ne" value="192350001" />
				</filter>
				<link-entity name="msdyn_assignmentconfiguration" from="msdyn_assignmentconfigurationid" to="msdyn_assignmentconfigurationid" link-type="inner" alias="bq">
					<link-entity name="queue" from="queueid" to="msdyn_queueid" link-type="inner" alias="br">
						<filter type="and">
							<condition attribute="queueid" operator="eq" uiname="Test Record Queue 1" uitype="queue" value="{A5ED5CAA-3A54-EC11-8F8F-000D3A1CBB9E}" />
						</filter>
					</link-entity>
				</link-entity>
			</entity>
		</fetch>

Sample 3: Assignment configuration step for multiple record queues without selection criteria

		<fetch>
			<entity name="msdyn_assignmentconfigurationstep">
				<filter>
						<condition attribute="msdyn_type" operator="ne" value="192350001" />
				</filter>
				<link-entity name="msdyn_assignmentconfiguration" from="msdyn_assignmentconfigurationid" to="msdyn_assignmentconfigurationid" link-type="inner" alias="bq">
					<link-entity name="queue" from="queueid" to="msdyn_queueid" link-type="inner" alias="br">
						<filter type="and">
							<condition attribute="queueid" operator="in">
								<value uiname="Test Record Queue 1" uitype="queue">{A5ED5CAA-3A54-EC11-8F8F-000D3A1CBB9E}</value>
								<value uiname="Test Record Queue 2" uitype="queue">{B2862B31-3B54-EC11-8F8F-000D3A1CBB9E}</value>
							</condition>
						</filter>
					</link-entity>
				</link-entity>
			</entity> 

FetchXML for decision ruleset entity for queues

Sample 1: Decision ruleset for all record queues with selection criteria

		<fetch distinct="true">
			<entity name="msdyn_decisionruleset">
				<link-entity name="msdyn_assignmentconfigurationstep" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="inner" alias="am">
					<filter>
						<condition attribute="msdyn_type" operator="eq" value="192350001" />
					</filter>
					<link-entity name="msdyn_assignmentconfiguration" from="msdyn_assignmentconfigurationid" to="msdyn_assignmentconfigurationid" link-type="inner" alias="an">
						<link-entity name="queue" from="queueid" to="msdyn_queueid" link-type="inner" alias="ao">
							<filter type="and">
								<condition attribute="msdyn_queuetype" operator="eq" value="192350001" />
								<condition attribute="msdyn_isomnichannelqueue" operator="eq" value="1" />
								<condition attribute="queueid" operator="ne" uiname="Default entity queue" uitype="queue" value="{5A4B76B0-DAB5-4717-9743-9490F2F822C6}" />
							</filter>
						</link-entity>
					</link-entity>
				</link-entity>
			</entity>
		</fetch>

Sample 2: Decision ruleset for a single record queue with selection criteria

		<fetch distinct="true">
			<entity name="msdyn_decisionruleset">
				<link-entity name="msdyn_assignmentconfigurationstep" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="inner" alias="am">
					<filter>
						<condition attribute="msdyn_type" operator="eq" value="192350001" />
					</filter>
					<link-entity name="msdyn_assignmentconfiguration" from="msdyn_assignmentconfigurationid" to="msdyn_assignmentconfigurationid" link-type="inner" alias="an">
						<link-entity name="queue" from="queueid" to="msdyn_queueid" link-type="inner" alias="ao">
							<filter type="and">
								<condition attribute="queueid" operator="eq" uiname="Test Record Queue 1" uitype="queue" value="{A5ED5CAA-3A54-EC11-8F8F-000D3A1CBB9E}" />
							</filter>
						</link-entity>
					</link-entity>
				</link-entity>
			</entity>
		</fetch>

Sample 3: Decision ruleset for multiple record queues with selection criteria

		<fetch distinct="true">
			<entity name="msdyn_decisionruleset">
				<link-entity name="msdyn_assignmentconfigurationstep" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="inner" alias="am">
					<filter>
						<condition attribute="msdyn_type" operator="eq" value="192350001" />
					</filter>
					<link-entity name="msdyn_assignmentconfiguration" from="msdyn_assignmentconfigurationid" to="msdyn_assignmentconfigurationid" link-type="inner" alias="an">
						<link-entity name="queue" from="queueid" to="msdyn_queueid" link-type="inner" alias="ao">
							<filter type="and">
								<condition attribute="queueid" operator="in">
									<value uiname="Test Record Queue 1" uitype="queue">{A5ED5CAA-3A54-EC11-8F8F-000D3A1CBB9E}</value>
									<value uiname="Test Record Queue 2" uitype="queue">{B2862B31-3B54-EC11-8F8F-000D3A1CBB9E}</value>
								</condition>
							</filter>
						</link-entity>
					</link-entity>
				</link-entity>
			</entity>
		</fetch>

FetchXML for assignment configuration step entity

Sample 1: Assignment configuration step for all record queues with selection criteria

		<fetch>
			<entity name="msdyn_assignmentconfigurationstep">
				<filter>
						<condition attribute="msdyn_type" operator="eq" value="192350001" />
				</filter>
				<link-entity name="msdyn_assignmentconfiguration" from="msdyn_assignmentconfigurationid" to="msdyn_assignmentconfigurationid" link-type="inner" alias="bq">
					<link-entity name="queue" from="queueid" to="msdyn_queueid" link-type="inner" alias="br">
						<filter type="and">
							<condition attribute="msdyn_queuetype" operator="eq" value="192350001" />
							<condition attribute="msdyn_isomnichannelqueue" operator="eq" value="1" />
							<condition attribute="queueid" operator="ne" uiname="Default entity queue" uitype="queue" value="{5A4B76B0-DAB5-4717-9743-9490F2F822C6}" />
						</filter>
					</link-entity>
				</link-entity>
			</entity>
		</fetch>

Sample 2: Assignment configuration step for a single record queue with selection criteria

		<fetch>
			<entity name="msdyn_assignmentconfigurationstep">
				<filter>
						<condition attribute="msdyn_type" operator="eq" value="192350001" />
				</filter>
				<link-entity name="msdyn_assignmentconfiguration" from="msdyn_assignmentconfigurationid" to="msdyn_assignmentconfigurationid" link-type="inner" alias="bq">
					<link-entity name="queue" from="queueid" to="msdyn_queueid" link-type="inner" alias="br">
						<filter type="and">
							<condition attribute="queueid" operator="eq" uiname="Test Record Queue 1" uitype="queue" value="{A5ED5CAA-3A54-EC11-8F8F-000D3A1CBB9E}" />
						</filter>
					</link-entity>
				</link-entity>
			</entity>
		</fetch>

Sample 3: Assignment configuration step for multiple record queues with selection criteria

		<fetch>
			<entity name="msdyn_assignmentconfigurationstep">
				<filter>
						<condition attribute="msdyn_type" operator="eq" value="192350001" />
				</filter>
				<link-entity name="msdyn_assignmentconfiguration" from="msdyn_assignmentconfigurationid" to="msdyn_assignmentconfigurationid" link-type="inner" alias="bq">
					<link-entity name="queue" from="queueid" to="msdyn_queueid" link-type="inner" alias="br">
						<filter type="and">
							<condition attribute="queueid" operator="in">
								<value uiname="Test Record Queue 1" uitype="queue">{A5ED5CAA-3A54-EC11-8F8F-000D3A1CBB9E}</value>
								<value uiname="Test Record Queue 2" uitype="queue">{B2862B31-3B54-EC11-8F8F-000D3A1CBB9E}</value>
							</condition>
						</filter>
					</link-entity>
				</link-entity>
			</entity>
		</fetch>

FetchXML for operating hour configuration step entity

Sample 1: Operating Hour configuration step for all record queues

XMLCopy
        <fetch>
            <entity name="msdyn_operatinghour">
                <link-entity name="queue" from="msdyn_operatinghourid" to="msdyn_operatinghourid" link-type="inner" alias="aa">
                <filter type="and">
                    <condition attribute="msdyn_queuetype" operator="eq" value="192350001"/>
                    <condition attribute="msdyn_isomnichannelqueue" operator="eq" value="1"/>
                    <condition attribute="queueid" operator="ne" uiname="Default entity queue" uitype="queue" value="{5A4B76B0-DAB5-4717-9743-9490F2F822C6}"/>
               </filter>
             </link-entity>
           </entity>
        </fetch>

Sample 2: Operating Hour configuration step for a single record queue

XMLCopy
        <fetch>
            <entity name="msdyn_operatinghour">
                <link-entity name="queue" from="msdyn_operatinghourid" to="msdyn_operatinghourid" link-type="inner" alias="ab">
                <filter type="and">
                    <condition attribute="queueid" operator="in">
                        <value uiname="Test Record Queue 1" uitype="queue">{A5ED5CAA-3A54-EC11-8F8F-000D3A1CBB9E}</value> 
                    </condition>
                </filter>
                </link-entity>
            </entity>
        </fetch>

Sample 3: Operating Hour configuration step for multiple record queues

XMLCopy
        <fetch>
            <entity name="msdyn_operatinghour">
                <link-entity name="queue" from="msdyn_operatinghourid" to="msdyn_operatinghourid" link-type="inner" alias="ab">
                <filter type="and">
                    <condition attribute="queueid" operator="in">
                        <value uiname="Test Record Queue 1" uitype="queue">{A5ED5CAA-3A54-EC11-8F8F-000D3A1CBB9E}</value> 
                        <value uiname="Test Record Queue 2" uitype="queue">{B2862B31-3B54-EC11-8F8F-000D3A1CBB9E}</value> 
                    </condition>
                </filter>
                </link-entity>
            </entity>
        </fetch>

FetchXML for overflow action configuration step entity

Sample 1: Overflow Action Config configuration step filter for a specific record

XMLCopy
<fetch>
  <entity name="msdyn_overflowactionconfig">
    <filter type="and">
      <condition attribute="msdyn_overflowactionconfigid" operator="eq" uiname="QueueTransfer_caae99a1-dcc4-ed11-83ff-00224805c003 " uitype="msdyn_overflowactionconfig" value="{6D49F66F-68F3-ED11-8848-00224805C003}"/>
    </filter>
  </entity>
</fetch>

Migrate configuration for intake rules for record routing

Prerequisites

Before you migrate intake rules, check for the following:

  • If the target organization doesn't have the record type that you want to import, then remove the msdyn_rulesetdefinition attribute of the msdyn_decisionruleset entity from the data.xml before you import.
  • If the target organization has the record type with the same GUID, then remove the msdyn_rulesetdefinition attribute of the msdyn_decisionruleset entity from the data.xml before you import.
  • If the target organization has the record type with a different GUID, then delete the record type in the target organization before you import.

Migrate configuration of intake rules

  1. Use the Configuration Migration tool to create the schema and export data from the source organization for a record routing configuration.

    • Entity display name: When you create the schema, select the entities in the same sequence as mentioned in the table.
    • Attribute display name: We recommend that you select the attributes defined in the following table. You don't need to select the out-of-the-box system defined attributes like Created By, Created On, Modified By, Modified On, and Owner. You can select custom attributes, if necessary.
    • Use FetchXML to filter records: For each entity, use the appropriate FetchXML query that's mentioned in the following table to get single, multiple, or all records based on your requirement. For single or multiple records, you need to use source organization to get the correct name in uiname and GUID in value. If required, you can use the ADVANCED FIND menu item to construct the appropriate FetchXML query.
    • Configure import settings:
      • For the Decision contract entity, ensure that you select the Do not update existing records checkbox.

      • For every entity, including the Decision contract entity, ensure that you select the primary key field of the entity to be used as a field to compare on update. An example for Account is as follows.

        Example of an entity to compare on update.

    Note

    The sample query listed in the following table gets single or multiple records. The query has considered the entity as incident and task. Based on your requirements, ensure that you update the entity logical name in the FetchXML query.

    The following table summarizes the entities and corresponding FetchXML samples.

    S.No. Entity display name (Logical name) Attribute display name (Logical name) Use FetchXML to filter records
    1. Master Entity Routing Configuration (msdyn_masterentityroutingconfiguration)
    • Entity (msdyn_entitylogicalname)
    • Master Entity Routing Configuration (msdyn_masterentityroutingconfigurationid)
    • Name (msdyn_name)
    • Rule set (msdyn_rulesetid)
    • Unique Name (msdyn_uniquename)
    Sample 1: Master entity routing configuration for a routed records

    Sample 2: Master entity routing configuration for the incident entity

    Sample 3: Master entity routing configuration for the incident and task entities
    2. Decision contract (msdyn_decisioncontract)
    • Contract definition (msdyn_contractdefinition)
    • Decision contract (msdyn_decisioncontractid)
    • Name (msdyn_name)
    • Unique name (msdyn_uniquename)
    Sample 1: Decision contract for all routed records

    Sample 2: Decision contract for the incident entity

    Sample 3: Decision contract for the incident and task entities
    3. Decision ruleset (msdyn_decisionruleset)
    • AI builder model (msdyn_aibmodelid)
    • Authoring mode (msdyn_authoringmode)
    • Decision rule set (msdyn_decisionrulesetid)
    • Description (msdyn_description)
    • Input contract (msdyn_inputcontractid)
    • Is input collection (msdyn_isinputcollection)
    • ML model type (msdyn_mlmodeltype)
    • Name (msdyn_name)
    • Output contract (msdyn_outputcontractid)
    • Rule set definition (msdyn_rulesetdefinition)
    • Rule set type (msdyn_rulesettype)
    • Unique name (msdyn_uniquename)
    Sample 1: Decision ruleset for all routed records

    Sample 2: Decision ruleset for the incident entity

    Sample 3: Decision ruleset for the incident and task entities

  2. Generate the schema and save it.

  3. Export the data and generate the compressed (zip) file.

  4. Extract the zip file, open the data.xml file present in the extracted folder, and perform the following operations:

    • In the source and target organizations, run the following OData API call and note the msdyn_decisioncontractid:

      https://<OrgURL>/api/data/v9.1/msdyn_decisioncontracts?$select=msdyn_decisioncontractid&$filter=msdyn_uniquename eq 'msdyn_baseoutputcontractmasterentityroutingconfiguration'

      In data.xml file, replace all occurrences of the msdyn_decisioncontractid GUID in the source organization with the msdyn_decisioncontractid GUID of the target organization.

    • In the source and target organizations, run the following OData API call and note the msdyn_decisioncontractid:

      https://<OrgURL>/api/data/v9.1/msdyn_decisioncontracts?$select=msdyn_decisioncontractid&$filter=msdyn_uniquename eq 'msdyn_baseoutputcontractmasterentityroutingconfigurationunifiedrouting'

      If there's no output when you run the call, skip to step 5. If there's an output, then in the data.xml file, replace all occurrences of the msdyn_decisioncontractid GUID in the source organization with the msdyn_decisioncontractid GUID of the target organization.

  5. Package the extracted content again.

  6. Use the Configuration Migration tool, select the option to import data, and then select the compressed file.

For sample schema to get all the required records, see Sample schema for intake rules for record routing.

FetchXML for decision contract entity for intake rules

Sample 1: Decision contract for all routed records

<fetch distinct="true">
	<entity name="msdyn_decisioncontract">
		<filter type="or">
			<filter type="and">
				<condition attribute="msdyn_entitylogicalname" entityname="bp" operator="not-null" />
			</filter>
			<filter type="and">
				<condition attribute="msdyn_entitylogicalname" entityname="bt" operator="not-null" />
			</filter>
		</filter>
		<link-entity name="msdyn_decisionruleset" from="msdyn_inputcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="bo">
			<link-entity name="msdyn_masterentityroutingconfiguration" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" linktype="outer" alias="bp" /></link-entity>
		<link-entity name="msdyn_decisionruleset" from="msdyn_outputcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="bs">
			<link-entity name="msdyn_masterentityroutingconfiguration" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" linktype="outer" alias="bt" /></link-entity>
	</entity>
</fetch>

Sample 2: Decision contract for the incident entity

<fetch distinct="true">
	<entity name="msdyn_decisioncontract">
		<filter type="or">
			<filter type="and">
				<condition attribute="msdyn_entitylogicalname" entityname="bp" operator="eq" value="incident" />
			</filter>
			<filter type="and">
				<condition attribute="msdyn_entitylogicalname" entityname="bt" operator="eq" value="incident" />
			</filter>
		</filter>
		<link-entity name="msdyn_decisionruleset" from="msdyn_inputcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="bo">
			<link-entity name="msdyn_masterentityroutingconfiguration" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="outer" alias="bp" /></link-entity>
		<link-entity name="msdyn_decisionruleset" from="msdyn_outputcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="bs">
			<link-entity name="msdyn_masterentityroutingconfiguration" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="outer" alias="bt" /></link-entity>
	</entity>
</fetch>

Sample 3: Decision Contract for the incident and task entities

<fetch distinct="true">
	<entity name="msdyn_decisioncontract">
		<filter type="or">
			<filter type="and">
				<condition attribute="msdyn_entitylogicalname" entityname="bp" operator="eq" value="incident" />
			</filter>
			<filter type="and">
				<condition attribute="msdyn_entitylogicalname" entityname="bt" operator="eq" value="incident" />
			</filter>
			<filter type="and">
				<condition attribute="msdyn_entitylogicalname" entityname="bp" operator="eq" value="task" />
			</filter>
			<filter type="and">
				<condition attribute="msdyn_entitylogicalname" entityname="bt" operator="eq" value="task" />
			</filter>
		</filter>
		<link-entity name="msdyn_decisionruleset" from="msdyn_inputcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="bo">
			<link-entity name="msdyn_masterentityroutingconfiguration" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="outer" alias="bp" /></link-entity>
		<link-entity name="msdyn_decisionruleset" from="msdyn_outputcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="bs">
			<link-entity name="msdyn_masterentityroutingconfiguration" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="outer" alias="bt" /></link-entity>
	</entity>
</fetch> 

FetchXML for decision ruleset entity for intake rules

Sample 1: Decision ruleset for all routed records

<fetch distinct="true">
	<entity name="msdyn_decisionruleset">
		<link-entity name="msdyn_masterentityroutingconfiguration" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="inner" alias="cp">
			<filter type="and">
				<condition attribute="msdyn_entitylogicalname" operator="not-null" />
			</filter>
		</link-entity>
	</entity>
</fetch> 

Sample 2: Decision ruleset for the incident entity

<fetch distinct="true">
	<entity name="msdyn_decisionruleset">
		<link-entity name="msdyn_masterentityroutingconfiguration" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="inner" alias="cp">
			<filter type="and">
				<condition attribute="msdyn_entitylogicalname" operator="eq" value="incident" />
			</filter>
		</link-entity>
	</entity>
</fetch> 

Sample 3: Decision ruleset for the incident and task entities

<fetch distinct="true">
	<entity name="msdyn_decisionruleset">
		<link-entity name="msdyn_masterentityroutingconfiguration" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="inner" alias="cp">
			<filter type="and">
				<filter type="or">
					<condition attribute="msdyn_entitylogicalname" operator="eq" value="incident" />
					<condition attribute="msdyn_entitylogicalname" operator="eq" value="task" />
				</filter>
			</filter>
		</link-entity>
	</entity>
</fetch> 

FetchXML for entity routing configuration for intake rules

Sample 1: Master entity routing configuration for a routed records

<fetch>
	<entity name="msdyn_masterentityroutingconfiguration">
		<filter type="and">
			<condition attribute="msdyn_entitylogicalname" operator="not-null" />
		</filter>
	</entity>
</fetch> 

Sample 2: Master entity routing configuration for the incident entity

<fetch>
	<entity name="msdyn_masterentityroutingconfiguration">
		<filter type="and">
			<condition attribute="msdyn_entitylogicalname" operator="eq" value="incident" />
		</filter>
	</entity>
</fetch> 

Sample 3: Master entity routing configuration for the incident and task entities

<fetch>
	<entity name="msdyn_masterentityroutingconfiguration">
		<filter type="and">
			<filter type="or">
				<condition attribute="msdyn_entitylogicalname" operator="eq" value="incident" />
				<condition attribute="msdyn_entitylogicalname" operator="eq" value="task" />
			</filter>
		</filter>
	</entity>
</fetch>

Migrate configuration for record workstreams

  1. Use the Configuration Migration tool to create the schema and export data from the source organization for record workstreams.

    • Entity display name: When you create the schema, select the entities in the same sequence as mentioned in the table.
    • Attribute display name: We recommend that you select the attributes defined in the following table. You don't need to select the out-of-the-box system defined attributes like Created By, Created On, Modified By, Modified On, and Owner. You can select custom attributes, if necessary.
    • Use FetchXML to filter records: For each entity, use the appropriate FetchXML query that's mentioned in the following table to get single, multiple, or all records based on your requirement. For single or multiple records, you need to use source organization to get the correct name in uiname and GUID in value. If required, you can use the ADVANCED FIND menu item to construct the appropriate FetchXML query.
    • Configure import settings:
      • For the Decision contract entity, ensure that you select the Do not update existing records checkbox.

      • For every entity, including the Decision contract entity, ensure that you select the primary key field of the entity to be used as a field to compare on update. An example for Account is as follows.

        Example of an entity to compare on update.

    Note

    The sample query listed in the following table gets single or multiple records. The query has considered the entity as incident and task. Based on your requirements, ensure that you update the entity logical name in the FetchXML query.

    Make sure that the workstreams that are referred in the intake rules exist in the target organization or are present as part of the current migration.

    The following table summarizes the entities and corresponding FetchXML samples.

    S.No. Entity display name (Logical name) Attribute display name (Logical name) Use FetchXML to filter records
    1. Workstream (msdyn_liveworkstream)
    • Allow Automated Messages (msdyn_enableautomatedmessages)
    • Allowed Presences (msdyn_allowedpresences)
    • Assign WorkItem After Decline or Timeout (msdyn_assignworkitemafterdecline)
    • Auto-close after inactivity (msdyn_autocloseafterinactivity)
    • Block capacity for wrap-up state (msdyn_blockcapacityforwrapup)
    • Bot queue (msdyn_bot_queue)
    • Bot rule (msdyn_bot_rule)
    • Bot user (msdyn_bot_user)
    • Capacity (msdyn_capacityrequired)
    • Capacity format (msdyn_capacityformat)
    • Channel (msdyn_streamsource)
    • Contract ID (msdyn_routingcontractid)
    • Default (msdyn_sessiontemplate_default)
    • Default Queue (msdyn_defaultqueue)
    • Direction (msdyn_direction)
    • Enable selecting from push-based work streams (msdyn_enableselectingfrompushbasedworkstreams)
    • Entity (msdyn_masterentityroutingconfigurationid)
    • FallBack Language (msdyn_fallbacklanguage)
    • Follow-up after waiting (msdyn_followupafterwaiting)
    • Handling Time Threshold (msdyn_handlingtimethreshold)
    • Incoming authenticated (msdyn_notificationtemplate_incoming_auth)
    • Is Default (msdyn_isdefault)
    • Keep same agent for entire conversation (msdyn_enableagentaffinity)
    • Matching Logic (msdyn_matchinglogic)
    • Max Concurrency (msdyn_maxconcurrentconnection)
    • Mode (msdyn_mode)
    • Name (msdyn_name)
    • Notification (msdyn_notification)
    • Outbound queue (msdyn_outboundqueueid)
    • Record Identification Rule (msdyn_recordidentificationrule)
    • Record Identification Validation Rule (msdyn_recordidentificationvalidationrule)
    • Screen pop timeout (msdyn_screenpoptimeout)
    • Screen pop timeout (msdyn_screenpoptimeout_optionSet)
    • Skill Attachment Rules Count (msdyn_skillattachmentrulescount)
    • Skill Attachment Rules Count (Last Updated On) (msdyn_skillattachmentrulescount_date)
    • Skill Attachment Rules Count (State) (msdyn_skillattachmentrulescount_state)
    • Waiting Time Threshold (msdyn_waitingtimethreshold)
    • Work Distribution Mode (msdyn_workdistributionmode)
    • Work Stream (msdyn_liveworkstreamid)
    Sample 1: All record workstreams

    Sample 2: Single record workstream

    Sample 3: Multiple record workstreams
    2. Decision contract (msdyn_decisioncontract)
    • Contract definition (msdyn_contractdefinition)
    • Decision contract (msdyn_decisioncontractid)
    • Name (msdyn_name)
    • Unique name (msdyn_uniquename)
    Sample 1: Decision contract for all record workstreams

    Sample 2: Decision contract for a single record workstream of type = incident

    Sample 3: Decision contract for multiple record workstreams of type = incident and type = task

    3. Decision rule set (msdyn_decisionruleset)
    • AI builder model (msdyn_aibmodelid)
    • Authoring mode (msdyn_authoringmode)
    • Decision rule set (msdyn_decisionrulesetid)
    • Description (msdyn_description)
    • Input contract (msdyn_inputcontractid)
    • Is input collection (msdyn_isinputcollection)
    • ML model type (msdyn_mlmodeltype)
    • Name (msdyn_name)
    • Output contract (msdyn_outputcontractid)
    • Rule set definition (msdyn_rulesetdefinition)
    • Rule set type (msdyn_rulesettype)
    • Unique name (msdyn_uniquename)
    Sample 1: Decision ruleset for all record workstreams

    Sample 2: Decision ruleset for a single record workstream of type = incident

    Sample 3: Decision ruleset for multiple record workstreams type = incident and type = task

    4. Routing configuration (msdyn_routingconfiguration)
    • Is active configuration (msdyn_isactiveconfiguration)
    • Name (msdyn_name)
    • Routing configuration (msdyn_routingconfigurationid)
    • Unique name (msdyn_uniquename)
    • Workstream (msdyn_liveworkstreamid)
    Sample 1: Routing configuration for all record workstreams

    Sample 2: Routing configuration for a single record workstream

    Sample 3: Routing configuration for multiple record workstreams

    5. Routing configuration step (msdyn_routingconfigurationstep)
    • Name (msdyn_name)
    • Routing configuration (msdyn_routingconfigurationid)
    • Routing configuration step (msdyn_routingconfigurationstepid)
    • Rule set (msdyn_rulesetid)
    • Step order (msdyn_steporder)
    • Step type (msdyn_type)
    • Unique name (msdyn_uniquename)
    Sample 1: Routing configuration step for all record workstreams

    Sample 2: Routing configuration step for a single record workstream

    Sample 3: Routing configuration step for multiple record workstreams

    6. Workstream capacity profile (msdyn_liveworkstreamcapacityprofile)
    • Capacity Profile (msdyn_capacityprofile_id)
    • Name (msdyn_name)
    • Workstream (msdyn_workstream_id)
    • Workstream Capacity profile (msdyn_liveworkstreamcapacityprofileid)
    Sample 1: Workstream capacity profile for all record workstreams

    Sample 2: Workstream capacity profile for a single record workstream

    Sample 3: Workstream capacity profile for multiple record workstreams

  2. Generate the schema and save it.

  3. Export the data and generate the compressed (zip) file.

  4. Extract the zip file, open the data.xml file present in the extracted folder, and perform the following operations:

    • In the source and target organizations, run the following OData API call and note the msdyn_decisioncontractid.

      https://<OrgURL>/api/data/v9.1/msdyn_decisioncontracts?$select=msdyn_decisioncontractid&$filter=msdyn_uniquename eq 'msdyn_baseoutputcontractmasterentityroutingconfiguration'

      In data.xml file, replace all occurrences of the msdyn_decisioncontractid GUID in the source organization with the msdyn_decisioncontractid GUID of the target organization.

    • In the source and target organizations, run the following OData API call and note the msdyn_decisioncontractid.

      https://<OrgURL>/api/data/v9.1/msdyn_decisioncontracts?$select=msdyn_decisioncontractid&$filter=msdyn_uniquename eq 'msdyn_baseoutputcontractmasterentityroutingconfigurationunifiedrouting'

      In data.xml file, replace all occurrences of the msdyn_decisioncontractid GUID in the source organization with the msdyn_decisioncontractid GUID of the target organization.

    • In the source and target organizations, run the following OData API call and note the msdyn_decisioncontractid.

      https://<OrgURL>/api/data/v9.1/msdyn_decisioncontracts?$select=msdyn_decisioncontractid&$filter=msdyn_uniquename eq 'msdyn_demandqueueidentificationoutput'

      In data.xml file, replace all occurrences of the msdyn_decisioncontractid GUID in the source organization with the msdyn_decisioncontractid GUID of the target organization.

  5. Package the extracted content again.

  6. Use the Configuration Migration tool, select the option to import data, and select the compressed file.

  7. After the import completes successfully, run the import again to ensure references are updated correctly that might have been overridden by the "on create" processes.

For sample schema to get all the required records, see Sample schema for unified routing record workstream.

FetchXML for workstream entity

Sample 1: All record workstreams

<fetch distinct="true">
	<entity name="msdyn_liveworkstream">
		<filter type="and">
			<condition attribute="msdyn_mode" operator="eq" value="717210001" />
			<condition attribute="msdyn_streamsource" operator="eq" value="192350000" />
		</filter>
	</entity>
</fetch> 

Sample 2: Single record workstream

<fetch>
	<entity name="msdyn_liveworkstream">
		<filter type="and">
			<condition attribute="msdyn_liveworkstreamid" operator="eq" uiname="Test Record Workstream Case 1" uitype="msdyn_liveworkstream" value="{759255C7-7AC8-98E0-7E3E-59A7F0312EFC}" />
		</filter>
	</entity>
</fetch> 

Sample 3: Multiple record workstreams

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
	<entity name="msdyn_liveworkstream">
		<filter type="and">
			<condition attribute="msdyn_liveworkstreamid" operator="in">
				<value uiname="Test Record Workstream Case 1" uitype="msdyn_liveworkstream">{759255C7-7AC8-98E0-7E3E-59A7F0312EFC}</value>
				<value uiname="Test Record Workstream Task 1" uitype="msdyn_liveworkstream">{E6246229-33AC-5A9E-2FFE-51668AD44215}</value>
			</condition>
		</filter>
	</entity>
</fetch> 

FetchXML for decision contract entity

Sample 1: Decision contract for all record workstreams

<fetch distinct="true">
	<entity name="msdyn_decisioncontract">
		<filter type="or">
			<filter type="and">
				<condition attribute="msdyn_mode" entityname="an" operator="eq" value="717210001" />
				<condition attribute="msdyn_streamsource" entityname="an" operator="eq" value="192350000" />
			</filter>
			<filter type="and">
				<condition attribute="msdyn_mode" entityname="bd" operator="eq" value="717210001" />
				<condition attribute="msdyn_streamsource" entityname="bd" operator="eq" value="192350000" />
			</filter>
			<filter type="and">
				<condition attribute="msdyn_entitylogicalname" entityname="bp" operator="not-null" />
			</filter>
			<filter type="and">
				<condition attribute="msdyn_entitylogicalname" entityname="bt" operator="not-null" />
			</filter>
		</filter>
		<link-entity name="msdyn_liveworkstream" from="msdyn_routingcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="an"></link-entity>
		<link-entity name="msdyn_decisionruleset" from="msdyn_outputcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="ba">
			<link-entity name="msdyn_routingconfigurationstep" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="outer" alias="bb">
				<link-entity name="msdyn_routingconfiguration" from="msdyn_routingconfigurationid" to="msdyn_routingconfigurationid" link-type="outer" alias="bc">
					<link-entity name="msdyn_liveworkstream" from="msdyn_liveworkstreamid" to="msdyn_liveworkstreamid" link-type="outer" alias="bd"></link-entity>
				</link-entity>
			</link-entity>
		</link-entity>
		<link-entity name="msdyn_decisionruleset" from="msdyn_inputcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="bo">
			<link-entity name="msdyn_masterentityroutingconfiguration" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="outer" alias="bp" /></link-entity>
		<link-entity name="msdyn_decisionruleset" from="msdyn_outputcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="bs">
			<link-entity name="msdyn_masterentityroutingconfiguration" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="outer" alias="bt" /></link-entity>
	</entity>
</fetch> 

Sample 2: Decision contract for a single record workstream of type = incident

<fetch distinct="true">
	<entity name="msdyn_decisioncontract">
		<filter type="or">
			<filter type="and">
				<condition attribute="msdyn_liveworkstreamid" entityname="an" operator="eq" uiname="Test Record Workstream Case 1" uitype="msdyn_liveworkstream" value="{759255C7-7AC8-98E0-7E3E-59A7F0312EFC}" />
			</filter>
			<filter type="and">
				<condition attribute="msdyn_liveworkstreamid" entityname="bd" operator="eq" uiname="Test Record Workstream Case 1" uitype="msdyn_liveworkstream" value="{759255C7-7AC8-98E0-7E3E-59A7F0312EFC}" />
			</filter>
			<filter type="and">
				<condition attribute="msdyn_entitylogicalname" entityname="bp" operator="eq" value="incident" />
			</filter>
			<filter type="and">
				<condition attribute="msdyn_entitylogicalname" entityname="bt" operator="eq" value="incident" />
			</filter>
		</filter>
		<link-entity name="msdyn_liveworkstream" from="msdyn_routingcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="an"></link-entity>
		<link-entity name="msdyn_decisionruleset" from="msdyn_outputcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="ba">
			<link-entity name="msdyn_routingconfigurationstep" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="outer" alias="bb">
				<link-entity name="msdyn_routingconfiguration" from="msdyn_routingconfigurationid" to="msdyn_routingconfigurationid" link-type="outer" alias="bc">
					<link-entity name="msdyn_liveworkstream" from="msdyn_liveworkstreamid" to="msdyn_liveworkstreamid" link-type="outer" alias="bd"></link-entity>
				</link-entity>
			</link-entity>
		</link-entity>
		<link-entity name="msdyn_decisionruleset" from="msdyn_inputcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="bo">
			<link-entity name="msdyn_masterentityroutingconfiguration" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="outer" alias="bp" /></link-entity>
		<link-entity name="msdyn_decisionruleset" from="msdyn_outputcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="bs">
			<link-entity name="msdyn_masterentityroutingconfiguration" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="outer" alias="bt" /></link-entity>
	</entity>
</fetch>

Sample 3: Decision contract for multiple record workstreams of type = incident and type = task

<fetch distinct="true">
	<entity name="msdyn_decisioncontract">
		<filter type="or">
			<filter type="and">
				<condition attribute="msdyn_liveworkstreamid" entityname="an" operator="in">
					<value uiname="Test Record Workstream Case 1" uitype="msdyn_liveworkstream">{759255C7-7AC8-98E0-7E3E-59A7F0312EFC}</value>
					<value uiname="Test Record Workstream Task 1" uitype="msdyn_liveworkstream">{E6246229-33AC-5A9E-2FFE-51668AD44215}</value>
				</condition>
			</filter>
			<filter type="and">
				<condition attribute="msdyn_liveworkstreamid" entityname="bd" operator="in">
					<value uiname="Test Record Workstream Case 1" uitype="msdyn_liveworkstream">{759255C7-7AC8-98E0-7E3E-59A7F0312EFC}</value>
					<value uiname="Test Record Workstream Task 1" uitype="msdyn_liveworkstream">{E6246229-33AC-5A9E-2FFE-51668AD44215}</value>
				</condition>
			</filter>
			<filter type="and">
				<condition attribute="msdyn_entitylogicalname" entityname="bp" operator="eq" value="incident" />
			</filter>
			<filter type="and">
				<condition attribute="msdyn_entitylogicalname" entityname="bt" operator="eq" value="incident" />
			</filter>
			<filter type="and">
				<condition attribute="msdyn_entitylogicalname" entityname="bp" operator="eq" value="task" />
			</filter>
			<filter type="and">
				<condition attribute="msdyn_entitylogicalname" entityname="bt" operator="eq" value="task" />
			</filter>
		</filter>
		<link-entity name="msdyn_liveworkstream" from="msdyn_routingcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="an"></link-entity>
		<link-entity name="msdyn_decisionruleset" from="msdyn_outputcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="ba">
			<link-entity name="msdyn_routingconfigurationstep" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="outer" alias="bb">
				<link-entity name="msdyn_routingconfiguration" from="msdyn_routingconfigurationid" to="msdyn_routingconfigurationid" link-type="outer" alias="bc">
					<link-entity name="msdyn_liveworkstream" from="msdyn_liveworkstreamid" to="msdyn_liveworkstreamid" link-type="outer" alias="bd"></link-entity>
				</link-entity>
			</link-entity>
		</link-entity>
		<link-entity name="msdyn_decisionruleset" from="msdyn_inputcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="bo">
			<link-entity name="msdyn_masterentityroutingconfiguration" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="outer" alias="bp" /></link-entity>
		<link-entity name="msdyn_decisionruleset" from="msdyn_outputcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="bs">
			<link-entity name="msdyn_masterentityroutingconfiguration" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="outer" alias="bt" /></link-entity>
	</entity>
</fetch> 

FetchXML for decision ruleset entity

Sample 1: Decision ruleset for all record workstreams

<fetch distinct="true">
	<entity name="msdyn_decisionruleset">
		<filter type="or">
			<filter type="and">
				<condition attribute="msdyn_mode" entityname="af" operator="eq" value="717210001" />
				<condition attribute="msdyn_streamsource" entityname="af" operator="eq" value="192350000" />
			</filter>
			<filter type="and">
				<condition attribute="msdyn_entitylogicalname" entityname="dc" operator="not-null" />
			</filter>
		</filter>
		<link-entity name="msdyn_routingconfigurationstep" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="outer" alias="ad">
			<link-entity name="msdyn_routingconfiguration" from="msdyn_routingconfigurationid" to="msdyn_routingconfigurationid" link-type="outer" alias="ae">
				<link-entity name="msdyn_liveworkstream" from="msdyn_liveworkstreamid" to="msdyn_liveworkstreamid" link-type="outer" alias="af"></link-entity>
			</link-entity>
		</link-entity>
		<link-entity name="msdyn_masterentityroutingconfiguration" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="outer" alias="dc"></link-entity>
	</entity>
</fetch> 

Sample 2: Decision ruleset for a single record workstream of type = incident

<fetch distinct="true">
	<entity name="msdyn_decisionruleset">
		<filter type="or">
			<filter type="and">
				<condition attribute="msdyn_liveworkstreamid" entityname="af" operator="eq" uiname="Test Record Workstream Case 1" uitype="msdyn_liveworkstream" value="{759255C7-7AC8-98E0-7E3E-59A7F0312EFC}" />
			</filter>
			<filter type="and">
				<condition attribute="msdyn_entitylogicalname" entityname="dc" operator="eq" value="incident" />
			</filter>
		</filter>
		<link-entity name="msdyn_routingconfigurationstep" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="outer" alias="ad">
			<link-entity name="msdyn_routingconfiguration" from="msdyn_routingconfigurationid" to="msdyn_routingconfigurationid" link-type="outer" alias="ae">
				<link-entity name="msdyn_liveworkstream" from="msdyn_liveworkstreamid" to="msdyn_liveworkstreamid" link-type="outer" alias="af"></link-entity>
			</link-entity>
		</link-entity>
		<link-entity name="msdyn_masterentityroutingconfiguration" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="outer" alias="dc"></link-entity>
	</entity>
</fetch>

Sample 3: Decision ruleset for multiple record workstreams type = incident and type = task

<fetch distinct="true">
	<entity name="msdyn_decisionruleset">
		<filter type="or">
			<filter type="and">
				<condition attribute="msdyn_liveworkstreamid" entityname="af" operator="in">
					<value uiname="Test Record Workstream Case 1" uitype="msdyn_liveworkstream">{759255C7-7AC8-98E0-7E3E-59A7F0312EFC}</value>
					<value uiname="Test Record Workstream Task 1" uitype="msdyn_liveworkstream">{E6246229-33AC-5A9E-2FFE-51668AD44215}</value>
				</condition>
			</filter>
			<filter type="and">
				<filter type="or">
					<condition attribute="msdyn_entitylogicalname" entityname="dc" operator="eq" value="incident" />
					<condition attribute="msdyn_entitylogicalname" entityname="dc" operator="eq" value="task" />
				</filter>
			</filter>
		</filter>
		<link-entity name="msdyn_routingconfigurationstep" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="outer" alias="ad">
			<link-entity name="msdyn_routingconfiguration" from="msdyn_routingconfigurationid" to="msdyn_routingconfigurationid" link-type="outer" alias="ae">
				<link-entity name="msdyn_liveworkstream" from="msdyn_liveworkstreamid" to="msdyn_liveworkstreamid" link-type="outer" alias="af"></link-entity>
			</link-entity>
		</link-entity>
		<link-entity name="msdyn_masterentityroutingconfiguration" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="outer" alias="dc"></link-entity>
	</entity>
</fetch> 

FetchXML for routing configuration entity

Sample 1: Routing configuration for all record workstreams

<fetch>
	<entity name="msdyn_routingconfiguration">
		<link-entity name="msdyn_liveworkstream" from="msdyn_liveworkstreamid" to="msdyn_liveworkstreamid" link-type="inner" alias="ah">
			<filter type="and">
				<condition attribute="msdyn_mode" operator="eq" value="717210001" />
				<condition attribute="msdyn_streamsource" operator="eq" value="192350000" />
			</filter>
		</link-entity>
	</entity>
</fetch> 

Sample 2: Routing configuration for a single record workstream

<fetch>
	<entity name="msdyn_routingconfiguration">
		<link-entity name="msdyn_liveworkstream" from="msdyn_liveworkstreamid" to="msdyn_liveworkstreamid" link-type="inner" alias="ah">
			<filter type="and">
				<condition attribute="msdyn_liveworkstreamid" operator="eq" uiname="Test Record Workstream Case 1" uitype="msdyn_liveworkstream" value="{759255C7-7AC8-98E0-7E3E-59A7F0312EFC}" />
			</filter>
		</link-entity>
	</entity>
</fetch> 

Sample 3: Routing configuration for multiple record workstreams

<fetch>
	<entity name="msdyn_routingconfiguration">
		<link-entity name="msdyn_liveworkstream" from="msdyn_liveworkstreamid" to="msdyn_liveworkstreamid" link-type="inner" alias="ah">
			<filter type="and">
				<condition attribute="msdyn_liveworkstreamid" operator="in">
					<value uiname="Test Record Workstream Case 1" uitype="msdyn_liveworkstream">{759255C7-7AC8-98E0-7E3E-59A7F0312EFC}</value>
					<value uiname="Test Record Workstream Task 1" uitype="msdyn_liveworkstream">{E6246229-33AC-5A9E-2FFE-51668AD44215}</value>
				</condition>
			</filter>
		</link-entity>
	</entity>
</fetch> 

FetchXML for routing configuration step entity

Sample 1: Routing configuration step for all record workstreams

<fetch>
	<entity name="msdyn_routingconfigurationstep">
		<link-entity name="msdyn_routingconfiguration" from="msdyn_routingconfigurationid" to="msdyn_routingconfigurationid" link-type="inner" alias="ak">
			<link-entity name="msdyn_liveworkstream" from="msdyn_liveworkstreamid" to="msdyn_liveworkstreamid" link-type="inner" alias="al">
				<filter type="and">
					<condition attribute="msdyn_mode" operator="eq" value="717210001" />
					<condition attribute="msdyn_streamsource" operator="eq" value="192350000" />
				</filter>
			</link-entity>
		</link-entity>
	</entity>
</fetch> 

Sample 2: Routing configuration step for a single record workstream

<fetch>
	<entity name="msdyn_routingconfigurationstep">
		<link-entity name="msdyn_routingconfiguration" from="msdyn_routingconfigurationid" to="msdyn_routingconfigurationid" link-type="inner" alias="ak">
			<link-entity name="msdyn_liveworkstream" from="msdyn_liveworkstreamid" to="msdyn_liveworkstreamid" link-type="inner" alias="al">
				<filter type="and">
					<condition attribute="msdyn_liveworkstreamid" operator="eq" uiname="Test Record Workstream Case 1" uitype="msdyn_liveworkstream" value="{759255C7-7AC8-98E0-7E3E-59A7F0312EFC}" />
				</filter>
			</link-entity>
		</link-entity>
	</entity>
</fetch> 

Sample 3: Routing configuration step for multiple record workstreams

<fetch>
	<entity name="msdyn_routingconfigurationstep">
		<link-entity name="msdyn_routingconfiguration" from="msdyn_routingconfigurationid" to="msdyn_routingconfigurationid" link-type="inner" alias="ak">
			<link-entity name="msdyn_liveworkstream" from="msdyn_liveworkstreamid" to="msdyn_liveworkstreamid" link-type="inner" alias="al">
				<filter type="and">
					<condition attribute="msdyn_liveworkstreamid" operator="in">
						<value uiname="Test Record Workstream Case 1" uitype="msdyn_liveworkstream">{759255C7-7AC8-98E0-7E3E-59A7F0312EFC}</value>
						<value uiname="Test Record Workstream Task 1" uitype="msdyn_liveworkstream">{E6246229-33AC-5A9E-2FFE-51668AD44215}</value>
					</condition>
				</filter>
			</link-entity>
		</link-entity>
	</entity>
</fetch> 

FetchXML for workstream capacity profile entity

Sample 1: Workstream capacity profile for all record workstreams

<fetch>
	<entity name="msdyn_liveworkstreamcapacityprofile">
		<link-entity name="msdyn_liveworkstream" from="msdyn_liveworkstreamid" to="msdyn_workstream_id" link-type="inner" alias="am">
			<filter type="and">
				<condition attribute="msdyn_mode" operator="eq" value="717210001" />
				<condition attribute="msdyn_streamsource" operator="eq" value="192350000" />
			</filter>
		</link-entity>
	</entity>
</fetch> 

Sample 2: Workstream capacity profile for a single record workstream

<fetch>
	<entity name="msdyn_liveworkstreamcapacityprofile">
		<link-entity name="msdyn_liveworkstream" from="msdyn_liveworkstreamid" to="msdyn_workstream_id" link-type="inner" alias="am">
			<filter type="and">
				<condition attribute="msdyn_liveworkstreamid" operator="eq" uiname="Test Record Workstream Case 1" uitype="msdyn_liveworkstream" value="{759255C7-7AC8-98E0-7E3E-59A7F0312EFC}" />
			</filter>
		</link-entity>
	</entity>
</fetch> 

Sample 3: Workstream capacity profile for multiple record workstreams

<fetch>
	<entity name="msdyn_liveworkstreamcapacityprofile">
		<link-entity name="msdyn_liveworkstream" from="msdyn_liveworkstreamid" to="msdyn_workstream_id" link-type="inner" alias="am">
			<filter type="and">
				<condition attribute="msdyn_liveworkstreamid" operator="in">
					<value uiname="Test Record Workstream Case 1" uitype="msdyn_liveworkstream">{759255C7-7AC8-98E0-7E3E-59A7F0312EFC}</value>
					<value uiname="Test Record Workstream Task 1" uitype="msdyn_liveworkstream">{E6246229-33AC-5A9E-2FFE-51668AD44215}</value>
				</condition>
			</filter>
		</link-entity>
	</entity>
</fetch>

Next steps

Verify migration of records

Create a schema to export configuration data
Overview of data migration for records
Use FetchXML query to filter records
Troubleshoot migration of records
Migrate configuration data for live chat
Migrate configuration data for voice channel