Skip to main content
All CollectionsOneClickUpsell for Shopify - Tutorials & DocumentationPre-purchase Offers
Migrating from Draft Orders to Shopify Functions for Pre-Purchase Discounts [OCU]
Migrating from Draft Orders to Shopify Functions for Pre-Purchase Discounts [OCU]

Learn how to transition your Product page widget and Pre-purchase offer Discounts from Draft Orders to Automatic discounts!

Jeff Maxfield avatar
Written by Jeff Maxfield
Updated over a week ago

Overview

Shopify Functions will soon replace the current Draft Orders functionality as the mechanism for auto-applying Product Page Widget and Pre-Purchase offer discounts at Checkout. OCU already uses this mechanism for the In-Checkout offer discount (Shopify Plus only).

Upon migration to Functions, OCU will create an "Automatic discount". You can find this discount and the list of all available discounts in the Shopify store Admin panel under the Discounts section.

We will create only one "OCU Product Discount" that will work for all Product page widget, Pre-purchase and In-Checkout offers where percentage or fixed amount discount types are applied. It is global, created only once, and does not affect the number of created offers.

πŸ“ Currently only a maximum of 5 automatic function-based discounts can be active per store at a time. If you encounter the limit, simply deactivate another discount created by an external app to activate your OCU Discount.

Activating the OCU Discount

In order to use the OCU automatic discount successfully, it must be manually activated in your Shopify admin.

Click the "Go to Discounts" button in the Activate OCU-Created Discount popup to be taken to your Shopify admin Discounts section:

Check the box next to "OCU Product Discount" and then click the "Activate discounts" button. Confirm the action in the popup by clicking the "Activate" button to activate it:

What If the Discount Becomes Inactive?

There are cases where your OCU discount can become inactive (has a status of "Expired" or any status other than "Active" in the Shopify admin).

In case of an inactive OCU discount, you will see a notification banner and a pop-up on the homepage with a redirect link to the Shopify "Discounts" section, where you'll need to activate the OCU discount manually:


​The OCU created automatic discount can become inactive in the following cases:

  1. When the Shopify limitation of the number of active discounts per store is reached. Currently only a maximum of 5 automatic function-based discounts can be active per store at a time.

  2. When it is deactivated manually by a user.

  3. Sometimes, we notice behavior where other apps interfere with the Shopify discount settings and modify discounts set by other apps.

If the OCU discount is inactive, then you will not be able to apply discounts for Product page widget, Pre-purchase or In-checkout offers in the OCU Offer Builder. Any existing offers with a discount will still be displayed to customers, but the discount will not be visible and will be hidden on the offer card. For newly created offers, you will also be restricted from setting up "Percentage" or "Fixed amount" discounts and discount titles.

In the Offer Builder for Product page widget, Pre-purchase and In-Checkout offers you will:

  1. See a notification that OCU discounts need to be activated.

  2. Notice that previously applied discount settings and the discount title are disabled. Only "None" or "Compare at price" discount options can be selected.

  3. Observe that the discount/saving label will not be displayed on the interactive preview, for existing offers that had discounts applied before the OCU discount became inactive.

πŸ“ When you migrate from Draft Orders to Functions, you will be restricted from using the "Free Shipping Bar" and "Discount Bar" incentive types for the Multi-product Pre-purchase offers. The "Headline Banner" type will be applied by default.

Key Points for the Migration Process

  1. New OCU installs will default to Functions and won't have access to Draft Order functionality.

  2. Shopify plans to deprecate Draft Orders next year, so our goal is to migrate all existing users before then.

  3. After release, merchants using incentive types like "Free Shipping Bar" or "Discount Bar" for Multi-product Pre-purchase offers won't be migrated to Functions in the first phase. However, if all offers with these incentive types are deleted, the store will be migrated automatically. We're currently exploring solutions to handle these two types of incentives to ensure a seamless migration for this group of merchants.

  4. Upon release, we'll create an OCU function-based discount for all stores, even for ones that don't use any Product page widget or Pre-purchase offers. This is to reserve our discount allocation, considering Shopify's current limitations.

  5. After migration from Draft Orders to Functions, existing stores won't be able to revert to Draft Orders.

  6. Existing stores that use Draft Orders for Product page widget and Pre-purchase offers, but Functions for In-checkout offers will continue using this approach, if pre-purchase offers are not migrated to Functions. The only change in the usual flow will be notifications when the OCU automatic discount is or becomes inactive, which will affect only In-checkout offers in this case.

  7. One function-based automatic discount will be created to cover all discount types and offer locations (Product page widget, Pre-purchase and In-checkout). Therefore, in the Shopify Discounts section, merchants will see only one record related to the OCU app-generated discount.

Did this answer your question?