[WooCommerce] How An Autoship Scheduled Order Is Processed

The automated creation, management and processing of Scheduled Orders is the core feature of Autoship Cloud powered by QPilot.

Think of QPilot as your WooCommerce store's Autoship Cloud "Engine" that powers your online store's Autoship program so that you can focus on providing your best products to your best customers: your Autoship Customers!

In this "How It Works" article, we’ll outline the process in which QPilot processes a Scheduled Order for your site.

How Processing is Started


1. Automated Processing

Scheduled Orders are automatically processed when the following conditions are met:

  • QPilot Merchant Account is Active
    • The monthly subscription plan for the QPilot Merchant Account must be in Trialing or Active status
  • QPilot Site is set to "Production" Environment
  • Scheduled Order Processing for the QPilot site is not set to "Paused"
  • Scheduled Order Status is "Active"
  • Scheduled Order Next Occurrence Date and time is due for processing
    • For example, if today is August 24 at 8:00 AM and the Next Occurrence date is August 24 at 8:00 AM or earlier, the Scheduled Order is due for processing

How often does Automated Processing occur?

QPilot will check for Scheduled Orders that are due for processing and automatically queue those that are due every 10 minutes.

How does Order Processing Start Time affect Automated Processing?

Because your QPilot Site has a Processing Start Time, Scheduled Orders will have their Next Occurrence time set to the Processing Start Time when they are created. This means no Scheduled Orders will be automatically processed for that site until after the Start Time has passed.

Learn more about Order Processing Start Time.

2. Manual Processing

Scheduled Orders can be processed when the following conditions are met:

  • QPilot Merchant Account is Active
    • The monthly subscription plan for the QPilot Merchant Account must be in Trialing or Active status
  • QPilot Merchant Site is set to "Production" Environment
  • Scheduled Order Status is "Paused" or "Failed"

Can you manually process a Scheduled Order when the QPilot site's processing is "Paused"?

Yes! For example, if you paused processing for a QPilot site while troubleshooting an issue, you may try to manually process a Scheduled Order to confirm the issue is resolved before resuming processing.

How Processing Works

QPilot Processing Scheduled Orders with WooCommerce

Open this image in a new window to expand this visual flowchart of processing events.

  1. Processing for a Scheduled Order is started either Automatically or Manually
    1. this is known as a "processing event" that creates a record called a "processing cycle"
  2. A request is sent from QPilot to WooCommerce using the WooCommerce REST API to create an order in WooCommerce
  3. An Order is created in WooCommerce that contains Customer and Product Data
  4. WooCommerce responds to QPilot:
    1. the Order was successfully created
    2. the total of the created Order the must be paid; including any added tax or fee items
  5. QPilot updates the processing cycle to include the updated order total and sends this amount to the payment gateway associated with the payment method selected as a request to pay for the Scheduled Order
  6. The payment gateway responds to QPilot that the payment was successful and confirms:
    1. an authorization was successful
    2. a sale was successful
  7. QPilot updates the Order in WooCommerce with the payment information and updates the status of the WooCommerce Order to "Processing"

When are taxes calculated and applied during processing?

This takes place during step 3 to 4: when the Order is created in WooCommerce and before the total of the Order (to be paid) is sent by QPilot to the payment gateway.

WooCommerce is ultimately in control of applying tax or fee items to any Orders created in WooCommerce, so any taxes entered into QPilot can only be used as estimations to display to the customer.

Errors During Processing

If an error occurs during processing, the Scheduled Order will update its status to Failed and record the reason why the Scheduled Order error occurred.

For full details on specific processing errors, please see: Scheduled Order Processing Errors

Depending on which processing step the error occurs, the Order in WooCommerce status will be one of the following:

  • Step 2: Error during the Create Order request:
    • WooCommerce Order does not exist if the Create Order request fails
  • Step 4: Error during WooCommerce's response to QPilot
    • WooCommerce Order status is "Pending Payment" if WooCommerce creates an Order but fails to respond to the Create Order request
    • WooCommerce Order status is "On hold" or "Failed" due to an error caused while creating the WooCommerce Order
  • Step 7: Error from the payment gateway response
    • WooCommerce Order status is "Pending Payment" if the payment gateway responds with an error processing the payment
    • WooCommerce Order status is "Failed" if the payment gateway responds with a payment decline