# Store edits Piste can make, and how to undo them

> Piste changes prices, discounts, pre-orders and order holds in Shopify only as a store edit someone approves from a card. Each one can be undone.

Source: https://www.usepiste.com/docs/approvals/store-edits

A store edit is a change to your Shopify store that Piste proposes on a card and a person applies: a discount's limit or end date, a price, a clearance markdown, a price probe, a pre-order, or a hold on an order. Piste only proposes kinds of edit it can undo exactly, and nothing changes in your store until someone presses the card's button.

> **Not yet run on a live store**
> Store edits have so far been tested only against a simulated Shopify store. None has yet been made in a merchant's live store.

## What can Piste change in my store?

- **Discounts:** limit a code discount to one use per customer, or set or remove a discount's end date. See [Discounts and prices](#discounts-and-prices).
- **Prices:** change a variant's price or compare-at price when you ask, mark down stock that stopped selling, or raise a best seller's price for a 14-day probe. See [Clearance markdowns](#clearance-markdowns) and [Price probes](#price-probes).
- **Pre-orders:** keep a best seller on sale past zero, and switch that off again. See [Pre-orders and the stockout guard](#pre-orders-and-the-stockout-guard).
- **Order holds:** hold a risky order's fulfilment, and release it. See [Order holds](#order-holds).

Every card also has a button to say no: `Leave it`, or `It's fine` on an order hold. Piste remembers that answer and doesn't propose the same edit again. Each card's exact buttons, who can press them, and when it goes out of date are on [Proposals and cards](https://www.usepiste.com/docs/approvals/proposals).

An automation run never proposes a price change of its own. The markdowns and probes a run proposes are chosen by Piste's checks, with prices worked out in code.

## What does Piste never edit?

- A discount made for named customers, a discount usable only once, or a discount an app made or owns.
- Anything a store edit can't undo exactly. Piste doesn't propose those kinds of change at all.

## What permission does Piste need in Shopify?

Store edits need Shopify's write permission for their kind. Piste asks for these only when you choose to grant them.

| Shopify permission | Lets Piste |
|---|---|
| `Allow Piste to change prices` | Change prices and compare-at prices, mark down, run price probes, switch pre-orders on and off, and revert a price change |
| `Allow Piste to change discounts` | Limit a discount to one use per customer, set or remove its end date, and turn a discount off on Revert |
| `Allow Piste to hold orders` | Hold an order's fulfilment and release the hold |

### 1. Open Piste in your Shopify admin

Open the Piste app from your store's Shopify admin. A connected store shows "More access Piste can use", with a button for each permission you haven't granted.

### 2. Choose the permission

Press the button, such as `Allow Piste to change prices`. Shopify shows its own dialog to approve the access, and the page reloads.

### 3. Press the card's button again

Go back to the card and press its button. The edit waited while the permission was missing, so it applies now.

Without the permission, a press changes nothing. Piste replies that it needs Shopify's permission, and that the store owner opens Piste in their Shopify admin and chooses the permission by name.

## How does Piste apply a store edit safely?

Proposing reads the discount, variant, product or order from Shopify, so the card shows your store's own name and current value. A press reads it again and writes nothing if it has changed since, and the edit is written at most once however often the button is pressed. If Shopify doesn't answer and reading it back doesn't settle it, the card says: "Shopify didn't answer, so Piste doesn't know whether this was changed. Check it in Shopify; Piste won't send it again." An edit nobody decided on within 7 days (an order hold within 24 hours) is out of date and can't be applied. [Proposals and cards](https://www.usepiste.com/docs/approvals/proposals#what-happens-when-you-press-a-button) has the rest.

## Discounts and prices

The first read Piste does of a new store flags discount codes used on at least 20% of orders, or mostly by returning customers. For a code used mostly by returning customers, it proposes a store edit limiting the code to one use per customer: a returning customer who hasn't used it yet still can. The Change follow-ups run raises that fix again, at most one a run, unless your workspace already applied, declined or undid it.

You can also ask Piste to limit a discount, set or remove its end date, or change a variant's price. Limits:

- A price moves by at most 50% either way in one edit.
- A compare-at price must be higher than the new price, and no higher than what the variant sells for now or its compare-at price now.
- An end date must be in the future, after the discount starts, and at most 365 days ahead.

A card raised in a conversation is the workspace owner's to decide.

## Clearance markdowns

A clearance markdown is a store edit that lowers every in-stock variant of a product that has had nothing ordered in 60 days. It marks the price down by 25% and keeps today's price as the compare-at price, so your storefront shows the saving. If you ask in a conversation, the depth can be between 10% and 40%; a run always uses 25%.

- The Change follow-ups run looks once a week and proposes up to 3, largest value tied up first.
- Each markdown comes with the units on hand and the value tied up, at Shopify's unit cost where the product has one and at price where it hasn't. The two are never added together.
- Left out: a product launched or first published in the last 60 days, one never published to the online store, one already on sale, one that isn't active, and variants that are out of stock, untracked or set to keep selling at zero.
- The card says "no sales in 60 days", never that a product is dead. Piste can't tell a seasonal product from one that has stopped selling.
- A markdown you leave or undo isn't proposed again.

## Price probes

A price probe raises a steady best seller's price by 5% for 14 days, to see whether it sells as well at the higher price. The bar is set before it starts: net sales a day at least 97% of the 14 days before.

Piste chooses the product in code. It needs:

- steady weekly orders for 8 weeks, each week within 25% of their average;
- at least 10 orders every week, and 30 across the last two;
- enough stock for the whole probe at its current rate;
- no sale or compare-at price, and no price change in the last 28 days;
- no other probe in the store.

Piste only proposes or starts a probe while the Change follow-ups automation is on, because that run is what ends the probe. A probe also needs `Allow Piste to read your sales reports`.

### What happens when a probe ends?

1. Press `Start the probe`. Piste replies with the new price, the date it ends, and the price it goes back to.
2. When the end date comes, the next Change follow-ups run ends the probe and posts the result in the card's thread. If the run is late, the probe ends late, and the result says how long it ran.
3. The price goes back by itself to exactly what the probe replaced. This is the one store write Piste makes without anyone pressing a button. If someone has changed the price since the probe started, Piste leaves it and says so in the thread.
4. If the probe passed its bar, a new card offers `Put it up to <price> for good` or `Leave it at <price>`. If it didn't, nothing more is proposed.

To stop a probe early, press `End it now` on its card. A probe is a before-and-after comparison, not a controlled test, and its result says so.

## Pre-orders and the stockout guard

Stock watch runs the stockout guard, and you can ask Piste what's about to sell out: it looks for best-selling variants about to sell out and says how long each will be out of stock.

- A variant counts when it sold at least 8 in the last 28 days and has 14 days of stock or fewer at that rate.
- Only variants whose stock is tracked and that stop selling at zero are judged.
- The time out of stock uses your supplier's lead time: what you've told Piste, else the lead time in your Store operations [playbook](https://www.usepiste.com/docs/playbooks), else 21 days, which the card names as assumed.
- The reorder is text on the card, with its arithmetic, for you to send your supplier. Piste sends nothing. With Gmail connected, the owner can also ask Piste in Slack for the reorder as a Gmail draft (see [Connected apps](https://www.usepiste.com/docs/apps)).

For up to 3 variants with 7 days of stock or fewer that will run out before a reorder could land, Piste proposes a pre-order: Shopify's setting to keep selling when out of stock.

> **Only the owner switches on a pre-order**
> Customers can buy a pre-order variant that isn't in stock, so only the workspace owner can press `Take pre-orders past zero`, wherever the card is. When a teammate presses it, nothing changes and Piste asks the owner in the card's thread.

If more stock has come in since the card was posted than the pre-order was proposed for, the press is refused, because the variant doesn't need to sell as a pre-order any more.

Piste then proposes switching the pre-order off, once, when any of these happens: the variant has stock again, it has taken 25 orders past zero, or it has been on pre-order for 45 days. Anyone who can decide on the card can press `Switch pre-order off`. A pre-order you leave or undo isn't offered again for that variant for 45 days.

## Order holds

An order hold stops a risky order being shipped until someone has looked at it. When a store trigger on orders runs, such as A big order, Piste reads Shopify's own risk assessment of each matched order and three plain facts:

- it's the customer's first order;
- the shipping and billing countries differ;
- the shipping method's name says it's fast, such as express or overnight.

Piste proposes a hold only when Shopify rates the order's risk high, or medium with at least two of those facts. You can also ask about an order by its number in a conversation. The card names the order by its number and amount, never the customer.

- `Hold its fulfilment` places Piste's hold on every part of the order still to ship, with the note "Piste: review before shipping" in Shopify. If part has shipped, a fulfilment service has it, or someone else holds it, Piste holds none of it.
- `It's fine` leaves the order alone, and Piste won't propose holding it again.
- `Release it` lifts exactly Piste's holds, and nobody else's. Only the person who held the order, or the workspace owner, can press it in Piste. Anyone with access can still release it in Shopify.

An order hold goes out of date after 24 hours, because a hold only helps before the order is packed. It gets no change follow-up.

## How do I undo a store edit?

Press `Undo` on the edit's card. Piste checks that the store still has what the edit wrote, then puts back exactly what it replaced, and replies with the value it's back to. A running price probe's button is `End it now`, and a held order's is `Release it`.

- An applied discount, price or markdown edit is followed up a week later as a [change follow-up](https://www.usepiste.com/docs/approvals/change-follow-ups). Its `Revert` is the same undo as the card's `Undo`: whichever is pressed first settles both.
- A pre-order can also be switched off when Piste proposes it, with `Switch pre-order off`.
- Each edit has one undo, and an undo has no undo of its own. An edit that turned out to change nothing has no Undo.
- If an undo fails, the card says why and keeps the button, so you can try again.

## Limits

These are the store edits' own numbers. Waiting and out-of-date limits for every card are on [Proposals and cards](https://www.usepiste.com/docs/approvals/proposals#limits).

| Limit | Value |
|---|---|
| Price move in one edit | 50% either way |
| Discount end date | At most 365 days ahead |
| Clearance: no orders for | 60 days |
| Clearance markdown | 25%, or 10% to 40% if you ask in a conversation |
| Markdowns proposed per run | 3, once a week |
| Price probe | 5% rise for 14 days, one per store at a time |
| Probe bar | Net sales a day at least 97% of the 14 days before |
| Stockout guard: flags | 14 days of stock or fewer |
| Pre-order offered at | 7 days of stock or fewer, up to 3 per check |
| Pre-order switched back after | Stock returns, 25 orders past zero, or 45 days |
| Assumed lead time | 21 days |

## Related

- [Proposals and cards](https://www.usepiste.com/docs/approvals/proposals): who can press each card, and when it goes out of date.
- [Change follow-ups](https://www.usepiste.com/docs/approvals/change-follow-ups): the verdict a week after a change, with Keep it and Revert.
- [Shopify](https://www.usepiste.com/docs/shopify): connecting your store and the access Piste has.
- [Store triggers](https://www.usepiste.com/docs/automations/store-triggers): the order triggers that can propose a hold.

## Questions

### Can Piste change my Shopify prices without asking?

No. A price change is a store edit that someone applies from a card, and it can move a price by at most 50% either way. The one write without a button press is a price probe putting the price back to exactly what it was when the probe ends.

### How do I undo a store edit?

Press Undo on the edit's card, or Revert on its change follow-up a week later. Both put back exactly what the edit replaced, and whichever is pressed first settles both. A held order has Release it instead.

### Who can switch on a pre-order?

Only the workspace owner, wherever the card is, because customers would be buying stock that isn't there. Anyone who can decide on the card can leave it, undo it or switch it back off.

### Does Piste email my supplier when stock runs low?

No. The stockout card gives the reorder as text, with its arithmetic, for you to send your supplier, and Piste sends nothing. If Gmail is connected, the owner can also ask Piste in Slack for the reorder as a Gmail draft, which is created only when the owner presses its button and is never sent by Piste.

### What permission does Piste need to change my store?

Shopify's permission for the kind of edit, granted by opening Piste in your Shopify admin and choosing Allow Piste to change prices, Allow Piste to change discounts or Allow Piste to hold orders.
