![](https://static.wixstatic.com/media/00c41c_206a8fd8922e4759982f7fb44072b66e~mv2.png/v1/fill/w_369,h_136,al_c,q_85,enc_auto/00c41c_206a8fd8922e4759982f7fb44072b66e~mv2.png)
Plugin to Help Migrate your Customers from XC to OrderCloud
October 25th 2022
In this previous blog post I shared a plugin to help migrating your Catalog(s) from XC to OrderCloud.
In this blog post I am sharing another useful plugin to help migrate your customers.
Instead of creating a new Plugin I decided to rename the first one and add the Customers Migration in order for code reusability and to avoid duplication.
This plugin will migrate the following Entities as shown below:
Note that in XC Addresses are Components Embedded in the Customer entities.
![](https://static.wixstatic.com/media/00c41c_b913a14f7b0d4ce1921e2a3910c121ba~mv2.png/v1/fill/w_980,h_571,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/00c41c_b913a14f7b0d4ce1921e2a3910c121ba~mv2.png)
Some notes below about implementation decisions to make this plugin as generic as possible, allowing you to customize and adapt it to your own scenarios:
I used a Single Buyer, the same one I used for Catalog Migration.
I reused XC IDs to ease the mapping and troubleshooting.
XC Primary Address is flagged as Shipping and Billing address in OrderCloud.
How to use this Plugin:
Clone the plugin from this Github repo
Update Policy files under https://github.com/yalahyane/Alyas.Commerce.OrderCloud.DataMigration/tree/main/Policies
Add the Plugin as a project reference to your Sitecore Commerce Engine.
To run from Postman use this Endpoint: {{ServiceHost}}/{{ShopsApi}}/MigrateCustomersToOrderCloud()
I encourage you to check the XC to OrderCloud blogs series by Andrew Sutherland here.
P.S: This is not a Production-Ready plugin. This is meant to get you started. You will need to try it in a Sandbox environment and adapt it to your needs.
You can set up an Order Cloud Sandbox in https://ordercloud.io/ with an API Client.
I hope you find this plugin helpful.
Feel free to leave comments or questions.
Comments