[WooCommerce] Migrating Existing Scheduled Orders to a New Site

There are several reasons you may need to migrate your Scheduled Orders from one site to another one.

Common reasons for this include:

  • Retiring an old site and migrating to a new one
  • Changing the site or business name / URL
  • Updating the existing QPilot app to a different environment (for example going from a staging site URL to a live URL)

Pro-Tip: WordPress User IDs and Post IDs

The requirements below require a basic understanding of how IDs for Customers and Products exist in your WordPress Site's database.
If you are not familiar with WordPress User IDs and Post IDs, you can learn more in this helpful doc from WPBeginner.

Requirements

To ensure that Scheduled Orders continue to process with the correct data, you will need to ensure the following records are not changed in your "new" WordPress Site's Database:

  • WooCommerce Customer Id's (the same as the WordPress User Id's)
  • WooCommerce Product Id's

Step-by-Step Guide to Migration

Step 1: Verify Customer and Product Ids

Verifying that your Customer and Product Id's match between two sites is an extremely important step to ensure a successful migration. This process is outlined in detail here: Validating Customer and Product Id's

Step 2: Pause Site Processing 

Before migrating, pause your site processing. This will prevent any Scheduled Orders from processing while you migrate. When you resume site processing, any Scheduled Orders with a due or past Next Occurrence Date will process automatically. 

To pause processing, follow the steps outlined in this doc: How Do I Pause Site Processing?

Step 3: Update your URL

To migrate your QPilot instance (and the attached Scheduled Orders) from one site to another, you will need to update the connected URL. You can do this by visiting your QPilot Merchant Center and selecting "Edit Site" from the site menu in the upper right of the QPilot Site's card.

From the "General Settings" tab, paste the new site URL you want to be connected to QPilot and select "Update"

Step 4: Connect QPilot to the WooCommerce REST API in Autoship Cloud 

You will sign in to your previously connected site's URL and disconnect from QPilot ( WP-Admin > Autoship Cloud > Settings > Connection Settings). This is a vital step to ensure you do not experience any connection or processing issues later on with your new site. 

Next, you will connect your new site to QPilot as outlined in this doc: Connecting to the WooCommerce API. This will update your QPilot Merchant Center with the new site's WooCommerce REST API keys (Read / Write). 

Newly created Scheduled Orders from the new site will be created with the same connected QPilot Site, and existing Scheduled Orders will be processed moving forward on the new site as well. 

Step 5: Review Migrated Scheduled Orders

After the migration is completed, Scheduled Order prevalidations are run to ensure your new site in QPilot is set up correctly and to uncover any Scheduled Orders with prevalidation warnings, so action may be taken to fix them so they do not fail to process when site processing is resumed. 

Prevalidations are listed in the "Validation Check" column in Autoship Cloud > Scheduled Orders. These validation checks ensure the Scheduled Order is ready to be processed! 

If a prevalidation warning is displayed, selecting the warning icon will provide more information on the warning and how to fix the error causing the warning. See how to run prevalidations on your Scheduled Orders.

Step 6: Resume Site Processing

Once you have ensured your newly connected site has a healthy connection status and that your Scheduled Orders were successfully migrated, you can safely resume site processing!

 To resume processing, follow the steps outlined in this doc: How Do I Resume Site Processing?