Bug report: unable to edit Price Rule because of invalid "customer_selection" state

A price rule for one of our merchants has an invalid state:

shop: femmeflexor.myshopify.com

price rule ID: 926935679128

customer_selection: prerequisite

prerequisite_saved_search_ids: []

prerequisite_customer_ids: []


According to the docs for Price Rule "customer_selection" property, this is an invalid state. Because of this we are unable to update any Price Rule properties. We get an error like this:

422 {"errors":{"customer_selection":["a minimum of one prerequisite saved search or prerequisite customer must be provided"]}}

x-request-id: e79152d5-6186-4a5b-9d39-b8cd3950f721



I tried to reproduce this issue on Shopify but could not:

- Cannot save "prerequisite" unless customers are specified
- I tried saving "prerequisite" with a customer, then deleting the customer, but this still returned the customer ID from the API even though the customer was deleted
- I tried saving "prerequisite" with a saved search, then deleting the saved search, but this unset the "prerequisite" setting

Founder and tech lead for Simple Affiliate:
Shopify Staff
Shopify Staff
135 21 30

Hey @boronine ,

Thanks for bringing this to our attention. I'm going to take a closer look at this one with our developer team and see what we can find about that error.

In the meantime (assuming usage of this price rule is immediately necessary), your best bet may be to send a request to change the customer_selection to "all" instead of "prerequisite" if you have not attempted to do so already. This should allow you to process other updates once the customer selection has been set to a valid state.

Graham S | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

Thank you @GrahamS ! I am happy to help if your team needs any more info to debug this.

Founder and tech lead for Simple Affiliate: