Migrate configuration data for SMS channel

Applies to: Dynamics 365 Contact Center—embedded, Dynamics 365 Contact Center—standalone, and Dynamics 365 Customer Service

Use the Configuration Migration tool to migrate the configurations from the source organization to the target organization for SMS.

Note

However, we recommend that you migrate configurations using the solutions framework. More information: Migrate configurations for channels using solutions

For information on how to use the Configuration Migration tool, see the following articles:

Prerequisites

The following prerequisites must be met:

  • In the source environment, if a unified routing ruleset refers to the following, then ensure that they exist in the target organization before you proceed with the migration:

    • Custom entities
    • Attributes
    • Relationships
    • Option sets
    • Lookup values
  • Ensure that the user who performs the migration has the required privileges on the following unified routing entities in the source and target environments:

    • Workstream (msdyn_liveworkstream)
    • Channel configuration (msdyn_omnichannelconfiguration)
    • Operating hours (msdyn_operatinghour)
    • Characteristic (characteristic)
    • Rating Model (rating model)
    • Rating Value (ratingvalue)
    • Capacity Profile (msdyn_capacityprofile)
    • Queue (queue)
    • Decision contract (msdyn_decisioncontract)
    • Decision ruleset (msdyn_decisionruleset)
    • Assignment configuration (msdyn_assignmentconfiguration)
    • Assignment configuration Step (msdyn_assignmentconfigurationstep)
    • Routing configuration (msdyn_routingconfiguration)
    • Routing configuration step (msdyn_routingconfigurationstep)
    • Workstream capacity profile (msdyn_liveworkstreamcapacityprofile)
    • Context variable (msdyn_ocliveworkstreamcontextvariable)
    • Quick replies (msdyn_cannedmessages)
    • Tags (msdyn_octags)

Important

The migration of the account, channel provider, phone number, bot configuration, and AI and analytics settings is not in scope.

Migrate SMS configuration

You must perform the steps in the order they're listed to migrate your configuration data successfully. Use the information in the tables and refer to the corresponding sample schemas for each configuration.

  1. Migrate configuration using a solution
  2. Migrate configuration for skill-based routing
  3. Migrate configuration for capacity profiles
  4. Migrate configuration for SMS queues
  5. Migrate configuration for SMS workstreams
  6. Migrate configuration for SMS channels
  7. Verify your migration
  8. Troubleshoot migration of data

Migrate configuration using a solution

If you use custom session templates and notifications in your SMS routing setup, perform the steps outlined in Migrate configuration using a solution.

Migrate skill-based configuration

If skill-based routing rulesets are used in your SMS routing setup, perform the steps outlined in Export and import data for skill-based routing. Make sure to adjust any filtering fetch xml appropriately for SMS.

Migrate configuration for capacity profiles

If you have configured capacity profiles in your SMS routing setup, perform the steps outlined in Export and import data for capacity profiles. Make sure to adjust any filtering fetch xml appropriately for SMS.

Migrate configuration for SMS queues

For migrating queues for SMS, perform the steps outlined in Migrate data for unified routing-based record queues. Make sure to adjust any filtering fetch xml appropriately for SMS.

Migrate configuration for SMS workstreams

  1. Use the Configuration Migration tool to create the schema and export data from the source organization for SMS 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.
  2. Ensure that the workstreams that are referred in the configuration of the SMS channels are included in the migration.

    S.No. Entity display name (Logical name) Attribute display name (Logical name) Use FetchXML to filter records
    1. Workstream (msdyn_liveworkstream)
    • API Key (msdyn_apikey)
    • API Key Version Number (msdyn_apikeyversionnumber)
    • 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)
    • CallbackPreviewDialing (msdyn_notificationtemplate_callback_previewdialing)
    • Connectors (msdyn_connectorsurl)
    • Consult (msdyn_notificationtemplate_consult)
    • Conversation mode of chat channels (msdyn_conversationmode)
    • Customer ID (msdyn_customerid)
    • Customer Disconnect Hold Duration For Open Conversation (msdyn_customerdisconnectholddurationforopenconversation)
    • 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)
    • Incoming unauthenticated (msdyn_notificationtemplate_incoming_unauth)
    • Is Default (msdyn_isdefault)
    • Keep same agent for entire conversation (msdyn_enableagentaffinity)
    • Last Validation On (msdyn_lastvalidationon)
    • Last Validation Status (msdyn_lastvalidationstatus)
    • Matching Logic (msdyn_matchinglogic)
    • Max Concurrency (msdyn_maxconcurrentconnection)
    • Mode (msdyn_mode)
    • Name (msdyn_name)
    • Notification (msdyn_notification)
    • Notification scenario placeholder (msdyn_notificationscenarioplaceholder)
    • Outbound queue (msdyn_outboundqueueid)
    • Record Identification Rule (msdyn_recordidentificationrule)
    • Record Identification Validation Rule (msdyn_recordidentificationvalidationrule)
    • Restrict download of recording (msdyn_restrictdownloadrecording)
    • Restrict download of transcript (msdyn_restrictdownloadtranscript)
    • Screen pop timeout (msdyn_screenpoptimeout)
    • Screen pop timeout (msdyn_screenpoptimeout_optionSet)
    • Secure API Key (msdyn_secureapikey)
    • Skill Attachment Rules Count (msdyn_skillattachmentrulescount)
    • Skill Attachment Rules Count (Last Updated On) (msdyn_skillattachmentrulescount_date)
    • Skill Attachment Rules Count (State) (msdyn_skillattachmentrulescount_state)
    • Session scenario placeholder (msdyn_sessionscenarioplaceholder)
    • SupervisorAssign (msdyn_notificationtemplate_supervisorassign)
    • Transfer (msdyn_notificationtemplate_transfer)
    • Waiting Time Threshold (msdyn_waitingtimethreshold)
    • Work Distribution Mode (msdyn_workdistributionmode)
    • Work Stream (msdyn_liveworkstreamid)
    Sample 1: All SMS workstreams

    Sample 2: Single SMS workstream

    Sample 3: Multiple SMS workstreams
    2. Context Variable (msdyn_ocliveworkstreamcontextvariable)
    • Name (msdyn_name)
    • Relation Ship Name (msdyn_relationshipname)
    • Type (msdyn_datatype)
    • Work stream (msdyn_liveworkstreamid)
    • IsList (msdyn_islist)
    • Modifiable (msdyn_ismodifiable)
    • Display Name (msdyn_displayname)
    • Displayable (msdyn_isdisplayable)
    • Entity Logical Name (msdyn_entitylogicalname)
    • Context variable (msdyn_ocliveworkstreamcontextvariableid)
    • Status (statecode)
    • Status Reason (statuscode)
    • System Defined (msdyn_issystemdefined)
    Sample 1: Context Variables for all SMS workstreams

    Sample 2: Context variables for a single SMS workstream

    Sample 3: Context Variables for multiple SMS workstreams
    3. 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 SMS workstreams

    Sample 2: Decision contract for a single SMS workstream

    Sample 3: Decision contract for multiple SMS workstreams
    4. 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 SMS workstreams

    Sample 2: Decision ruleset for a single SMS workstream

    Sample 3: Decision ruleset for multiple SMS workstreams
    5. 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 SMS workstreams

    Sample 2: Routing configuration for a single SMS workstream

    Sample 3: Routing configuration for multiple SMS workstreams
    6. 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 SMS workstreams

    Sample 2: Routing configuration step for a single SMS workstream

    Sample 3: Routing configuration step for multiple SMS workstreams
    7. 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 SMS workstreams

    Sample 2: Workstream capacity profile for a single SMS workstream

    Sample 3: Workstream capacity profile for multiple SMS workstreams
    8. Tag (msdyn_octag)
    • Name (msdyn_name)
    • Tag (msdyn_octagid)
  3. Generate the schema and save it.

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

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

Important

When you fetch decision rulesets (msdyn_decisionrulesets) containing context variables, some decision rulesets are created without the dependency mappings. To work around this, perform the following steps:

  1. Import data for all entities including the decision ruleset entity (msdyn_decisionrulesets).
  2. Import data for the decision ruleset entity again. This step ensures that all dependency mappings for the decision rulesets are imported.

For sample schema to get all the required records, see Sample schema for SMS workstream.

FetchXML for workstream entity

Sample 1: All SMS 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="192340000" />
		</filter>
	</entity>
</fetch>

Sample 2: Single SMS workstream

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

Sample 3: Multiple SMS 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 SMS workstream 1" uitype="msdyn_liveworkstream">{759255C7-7AC8-98E0-7E3E-59A7F0312ABC}</value>
				<value uiname="Test SMS workstream 2" uitype="msdyn_liveworkstream">{E6246229-33AC-5A9E-2FFE-51668AD44098}</value>
			</condition>
		</filter>
	</entity>
</fetch>

FetchXML for context variables entity

Sample 1: All SMS workstreams context variables

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

Sample 2: Single SMS workstream context variables

<fetch>
	<entity name="msdyn_ocliveworkstreamcontextvariable" >
		<filter type="and" >
			<condition attribute="msdyn_liveworkstreamid" operator="eq" uiname="SMS workstream" uitype="msdyn_liveworkstream" value="{D3A1F09D-51A0-A6B7-266D-58E1BDB97B53}" />
		</filter>
	</entity>
</fetch>

Sample 3: Multiple SMS workstreams context variables

<fetch>
	<entity name="msdyn_ocliveworkstreamcontextvariable" >
		<filter type="or" >
			<condition attribute="msdyn_liveworkstreamid" operator="eq" uiname="SMS workstream" uitype="msdyn_liveworkstream" value="{D3A1F09D-51A0-A6B7-266D-58E1BDB97B53}" />
			<condition attribute="msdyn_liveworkstreamid" operator="eq" uiname="SMS workstream 1" uitype="msdyn_liveworkstream" value="{f9e18e67-d1a8-ed11-aad1-00224805c057}" />
		</filter>
	</entity>
</fetch>

FetchXML for decision contract entity

Sample 1: Decision contract for all SMS 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="192340000" />
			</filter>
			<filter type="and" >
				<condition attribute="msdyn_mode" entityname="bd" operator="eq" value="717210001" />
				<condition attribute="msdyn_streamsource" entityname="bd" operator="eq" value="192340000" />
			</filter>
			<filter type="and" >
				<condition attribute="msdyn_mode" entityname="bk" operator="eq" value="717210001" />
				<condition attribute="msdyn_streamsource" entityname="bk" operator="eq" value="192340000" />
			</filter>
		</filter>
		<link-entity name="msdyn_liveworkstream" from="msdyn_routingcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="an" />
		<link-entity name="msdyn_decisionruleset" from="msdyn_inputcontractid" 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 name="msdyn_decisionruleset" from="msdyn_outputcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="bh" >
			<link-entity name="msdyn_routingconfigurationstep" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="outer" alias="bi" >
				<link-entity name="msdyn_routingconfiguration" from="msdyn_routingconfigurationid" to="msdyn_routingconfigurationid" link-type="outer" alias="bj" >
					<link-entity name="msdyn_liveworkstream" from="msdyn_liveworkstreamid" to="msdyn_liveworkstreamid" link-type="outer" alias="bk" />
				</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 SMS workstream

<fetch distinct="true" >
	<entity name="msdyn_decisioncontract" >
		<filter type="or" >
			<filter type="and" >
				<condition attribute="msdyn_liveworkstreamid" entityname="an" operator="eq" uiname="SMS workstream" uitype="msdyn_liveworkstream" value="{d3a1f09d-51a0-a6b7-266d-58e1bdb97b53}" />
			</filter>
			<filter type="and" >
			<condition attribute="msdyn_liveworkstreamid" entityname="bd" operator="eq" uiname="SMS workstream" uitype="msdyn_liveworkstream" value="{d3a1f09d-51a0-a6b7-266d-58e1bdb97b53}" />
			</filter>
			<filter type="and" >
			<condition attribute="msdyn_liveworkstreamid" entityname="bk" operator="eq" uiname="SMS workstream" uitype="msdyn_liveworkstream" value="{d3a1f09d-51a0-a6b7-266d-58e1bdb97b53}" />
			</filter>
		</filter>
		<link-entity name="msdyn_liveworkstream" from="msdyn_routingcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="an" />
		<link-entity name="msdyn_decisionruleset" from="msdyn_inputcontractid" 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 name="msdyn_decisionruleset" from="msdyn_outputcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="bh" >
			<link-entity name="msdyn_routingconfigurationstep" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="outer" alias="bi" >
				<link-entity name="msdyn_routingconfiguration" from="msdyn_routingconfigurationid" to="msdyn_routingconfigurationid" link-type="outer" alias="bj" >
					<link-entity name="msdyn_liveworkstream" from="msdyn_liveworkstreamid" to="msdyn_liveworkstreamid" link-type="outer" alias="bk" />
				</link-entity>
			</link-entity>
		</link-entity>
	</entity>
</fetch>

Sample 3: Decision contract for multiple SMS workstreams

<fetch distinct="true" >
	<entity name="msdyn_decisioncontract" >
		<filter type="or" >
			<filter type="and" >
				<filter type="or" >
					<condition attribute="msdyn_liveworkstreamid" entityname="an" operator="eq" uiname="SMS workstream 1" uitype="msdyn_liveworkstream" value="{d3a1f09d-51a0-a6b7-266d-58e1bdb97b53}" />
					<condition attribute="msdyn_liveworkstreamid" entityname="an" operator="eq" uiname="SMS workstream 2" uitype="msdyn_liveworkstream" value="{bb3cf09d-51a0-f56b-211b-58e1bdb97b44}" />
				</filter>
			</filter>
			<filter type="and" >
				<filter type="or" >
					<condition attribute="msdyn_liveworkstreamid" entityname="bd" operator="eq" uiname="SMS workstream 1" uitype="msdyn_liveworkstream" value="{d3a1f09d-51a0-a6b7-266d-58e1bdb97b53}" />
					<condition attribute="msdyn_liveworkstreamid" entityname="bd" operator="eq" uiname="SMS workstream 2" uitype="msdyn_liveworkstream" value="{bb3cf09d-51a0-f56b-211b-58e1bdb97b44}" />
				</filter>
			</filter>
			<filter type="and" >
				<filter type="or" >
					<condition attribute="msdyn_liveworkstreamid" entityname="bk" operator="eq" uiname="SMS workstream 1" uitype="msdyn_liveworkstream" value="{d3a1f09d-51a0-a6b7-266d-58e1bdb97b53}" />
					<condition attribute="msdyn_liveworkstreamid" entityname="bk" operator="eq" uiname="SMS workstream 2" uitype="msdyn_liveworkstream" value="{bb3cf09d-51a0-f56b-211b-58e1bdb97b44}" />
				</filter>
			</filter>
		</filter>
		<link-entity name="msdyn_liveworkstream" from="msdyn_routingcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="an" />
		<link-entity name="msdyn_decisionruleset" from="msdyn_inputcontractid" 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 name="msdyn_decisionruleset" from="msdyn_outputcontractid" to="msdyn_decisioncontractid" link-type="outer" alias="bh" >
			<link-entity name="msdyn_routingconfigurationstep" from="msdyn_rulesetid" to="msdyn_decisionrulesetid" link-type="outer" alias="bi" >
				<link-entity name="msdyn_routingconfiguration" from="msdyn_routingconfigurationid" to="msdyn_routingconfigurationid" link-type="outer" alias="bj" >
					<link-entity name="msdyn_liveworkstream" from="msdyn_liveworkstreamid" to="msdyn_liveworkstreamid" link-type="outer" alias="bk" />
				</link-entity>
			</link-entity>
		</link-entity>
	</entity>
</fetch>

FetchXML for decision ruleset entity

Sample 1: Decision ruleset for all SMS 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="192340000" />
			</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>
	</entity>
</fetch>

Sample 2: Decision ruleset for a single SMS workstream

<fetch distinct="true" >
	<entity name="msdyn_decisionruleset" >
		<filter type="or" >
			<filter type="and" >
				<condition attribute="msdyn_liveworkstreamid" entityname="af" operator="eq" uiname="SMS workstream" uitype="msdyn_liveworkstream" value="{d3a1f09d-51a0-a6b7-266d-58e1bdb97b53}" />
			</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>
	</entity>
</fetch>

Sample 3: Decision ruleset for multiple SMS workstreams

<fetch distinct="true" >
	<entity name="msdyn_decisionruleset" >
		<filter type="or" >
			<filter type="or" >
				<condition attribute="msdyn_liveworkstreamid" entityname="af" operator="eq" uiname="SMS workstream" uitype="msdyn_liveworkstream" value="{d3a1f09d-51a0-a6b7-266d-58e1bdb97b53}" />
				<condition attribute="msdyn_liveworkstreamid" entityname="af" operator="eq" uiname="SMS workstream 1" uitype="msdyn_liveworkstream" value="{f9e18e67-d1a8-ed11-aad1-00224805c057}" />
			</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>
	</entity>
</fetch>

FetchXML for routing configuration entity

Sample 1: Routing configuration for all SMS 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="192340000" />
			</filter>
		</link-entity>
	</entity>
</fetch>

Sample 2: Routing configuration for a single SMS 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 SMS workstream 1" uitype="msdyn_liveworkstream" value="{759255C7-7AC8-98E0-7E3E-59A7F0312ABC}" />
			</filter>
		</link-entity>
	</entity>
</fetch>

Sample 3: Routing configuration for multiple SMS 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 SMS Workstream 1" uitype="msdyn_liveworkstream">{759255C7-7AC8-98E0-7E3E-59A7F0312ABC}</value>
					<value uiname="Test SMS Workstream 2" uitype="msdyn_liveworkstream">{E6246229-33AC-5A9E-2FFE-51668AD44098}</value>
				</condition>
			</filter>
		</link-entity>
	</entity>
</fetch>

FetchXML for routing configuration step entity

Sample 1: Routing configuration step for all SMS 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="192340000" />
				</filter>
			</link-entity>
		</link-entity>
	</entity>
</fetch>

Sample 2: Routing configuration step for a single SMS 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 SMS workstream 1" uitype="msdyn_liveworkstream" value="{759255C7-7AC8-98E0-7E3E-59A7F0312EFC}" />
				</filter>
			</link-entity>
		</link-entity>
	</entity>
</fetch>

Sample 3: Routing configuration step for multiple SMS 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 SMS workstream 1" uitype="msdyn_liveworkstream">{759255C7-7AC8-98E0-7E3E-59A7F0312ABC}</value>
						<value uiname="Test SMS workstream 2" uitype="msdyn_liveworkstream">{E6246229-33AC-5A9E-2FFE-51668AD44098}</value>
					</condition>
				</filter>
			</link-entity>
		</link-entity>
	</entity>
</fetch>

FetchXML for workstream capacity profile entity

Sample 1: Workstream capacity profile for all SMS 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="192340000" />
			</filter>
		</link-entity>
	</entity>
</fetch>

Sample 2: Workstream capacity profile for a single SMS 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 SMS workstream 1" uitype="msdyn_liveworkstream" value="{759255C7-7AC8-98E0-7E3E-59A7F0312EFC}" />
			</filter>
		</link-entity>
	</entity>
</fetch>

Sample 3: Workstream capacity profile for multiple SMS 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 SMS Workstream 1" uitype="msdyn_liveworkstream">{759255C7-7AC8-98E0-7E3E-59A7F0312EFC}</value>
					<value uiname="Test SMS Workstream 2" uitype="msdyn_liveworkstream">{E6246229-33AC-5A9E-2FFE-51668AD44215}</value>
				</condition>
			</filter>
		</link-entity>
	</entity>
</fetch>

Migrate configuration for SMS channels

Assume that the workstream must exist whether it was created manually or previously migrated to the destination organization.

To migrate data for SMS channels

  1. Use the Configuration Migration tool to create the schema and export data from the source organization for the SMS channel and related entities.

    • Entity display name: When you create the schema, select the entities in the sequence as mentioned in the table.
    • Attribute display name: We recommend that you select the attributes defined in the following table. You don't have to select the system-defined attributes, such as Created By, Created On, Modified By, Modified On, and Owner. You can select custom attributes if necessary.
    S.No. Entity display name (Logical name) Attribute display name (Logical name)
    1. SMS Number Setting (msdyn_ocsmschannelsetting) FetchXML to filter records for SMS channel settings
    Note:
    - Replace the value for msdyn_liveworkstream in the condition section.
    - You need to include Phone Number (msdyn_phonenumberid) column even though data is invalid, as the records in Phone Number table are environment-specific and can’t be migrated. You need to fix phone number manually in destination environment after migration. If you aren't allowed to perform this action for any reason, you can manually edit data.xml file inside the exported zip file and replace its value with the correct phone number GUID in the destination environment.
    - Don't include Survey (msdyn_postconversationsurvey) and Survey (msdyn_postconversationsurveyseparatebotsurvey) columns as survey records are synced with Dynamics 365 Customer Voice in each environment, so they can’t be migrated.
    - Ensure as part of the entity declaration in the schema that the plugin is disabled. (disableplugins="false")
    • Bot Survey (msdyn_postconversationsurveybotsurvey)
    • Enable (msdyn_postconversationsurveyenable)
    • Enable file attachments for agents (msdyn_enablefileattachmentforagents)
    • Enable file attachments for customers (msdyn_enablefileattachmentforcustomers)
    • Message (msdyn_postconversationsurveybotsurveymessagetext)
    • Message (msdyn_postconversationsurveymessagetext)
    • Name (msdyn_name)
    • ocsmschannelsetting (msdyn_ocsmschannelsettingid)
    • Operating hours (msdyn_operatinghoursid)
    • Phone Number (msdyn_phonenumberid)
    • SMS number language (msdyn_language)
    • Survey Mode (msdyn_postconversationsurveybotsurveymode)
    • Survey Mode (msdyn_postconversationsurveymode)
    • Work stream (msdyn_liveworkstreamid)
    2. Localization (msdyn_oclocalizationdata) FetchXML to filter records for SMS channel localizations
    • Automated message (msdyn_systemmessageid)
    • Default Localized Text (msdyn_defaultlocalizedtext)
    • Entity Column Name (msdyn_entitycolumnname)
    • Entity Name (msdyn_entityname)
    • Entity Record ID (msdyn_entityrecordid)
    • Is Default (msdyn_isdefault)
    • Language Code (msdyn_customerlanguageid)
    • Language Code (msdyn_languagecode)
    • Localization (msdyn_oclocalizationdataid)
    • Localized text (msdyn_localizedtext)
    • Organization ID (organizationid)
    • Status (statecode)
    • Status Reason (statuscode)
    3. Message (msdyn_ocsystemmessage)
    • Channel (msdyn_streamsource)
    • Default language (msdyn_defaultlanguage)
    • Instance ID (msdyn_instanceid)
    • Message (msdyn_ocsystemmessageid)
    • Message description (msdyn_messagedescription)
    • Message recipient (msdyn_messagereceiver)
    • Message template trigger (msdyn_messagetemplatetrigger)
    • Message Text (msdyn_messagetext)
    • Message trigger (msdyn_systemmessageeventtype)
    • Message type (msdyn_messagetype)
    • Name (msdyn_name)
    • Organization ID (organizationid)
    • Status (statecode)
    • Status Reason (statuscode)
  2. Generate the schema and save it.

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

  4. 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 SMS channel.

FetchXML for SMS channel settings

<fetch>
	<entity name=" msdyn_ocsmschannelsetting">
		<link-entity name="msdyn_liveworkstream" from="msdyn_liveworkstreamid" to="msdyn_liveworkstreamid" link-type="inner" alias="ab">
			<filter type="and">
				<condition attribute="msdyn_liveworkstreamid" operator="eq" uiname="ALM SMS Test Workstream" uitype="msdyn_liveworkstream" value="{87bf4384-a02f-4802-8be7-1d6884a7e73f}" />
			</filter>
		</link-entity>
	</entity>
</fetch>

FetchXML for SMS channel localizations

<fetch>
	<entity name="msdyn_oclocalizationdata">
		<link-entity name="msdyn_ocsystemmessage" from="msdyn_ocsystemmessageid" to="msdyn_systemmessageid" link-type="inner" alias="ah">
			<filter type="and">
				<condition attribute="msdyn_streamsource" operator="eq" value="192360000"/>
			</filter>
		</link-entity>
	</entity>
</fetch>

Verify your migration

After you import the unified routing-related configuration data successfully from the source to target organization, perform the following steps in the target organization:

  1. In the UI, make sure that the unified routing configuration and rulesets are rendered properly and don't display errors.

  2. If skills and rating values are used in unified routing rulesets, then you need to manually link, associate, or create the users, bookable resources, and bookable resources characteristics records.

  3. If capacity profiles are used in rulesets and workstreams for unified routing, then you need to manually link, associate, or create the users, bookable resources, and bookable resources capacity profile records.

Considerations for export and import of data

To troubleshoot any issues that you might face during migration, check the log files as follows:

  • When you import data into the target organization, if you see yellow warning symbols, then check the following logs in the Configuration Migration tool:

    • Login_ErrorLog.log: Provides information about any issues you had when you signed in to the organization using the Configuration Management tool.
    • DataMigrationUtility.log: Provides information about the tasks performed using the tool during the last migration.
    • ImportDataDetail.log: Provides information about the data imported by the tool in the last data import.

    More information: Troubleshoot configuration data migration issues using log files

    Yellow warnings that indicate errors during data import.

  • If the logs contain network errors, then repeat the import process.

    Here's an example:

    Time: 11:46:09 PM
    Error: There was no endpoint listening at `https://www.contoso.com/XRMServices/2011/Organization.svc/web?SDKClientVersion=9.2.46.5279` that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
    Stack Trace: Service stack trace:
    

Migrate configuration for records based on unified routing