Story 48.2 Add-On: Restore “Not Photographed” products that were removed (pre-live)

Current state

Products that were Not Photographed with a future (private) publish date get deleted in WooCommerce when removed (qty → 0). They can’t be brought back, even if data/photography work exists.

New behaviour

This story extends the restore logic for removed items. For products that were never live and had status Not Photographed, the sales team should be able to bring them back by setting quantity → 1 (via WooC or Airtable).

On restore, the workflow should basically re-do the existing “bag accepted = Yes” automation with the following extras:

  • Recreate/restore the WooC product and set status: Not Photographed

  • Reapply the future publish date per existing scheduling logic

  • Trigger email: “Your bag will be live soon” (seller)

  • Post Slack in #syb_bag_was_removed_by_seller:

    • “The [Bagname (w/ link)] [SKU] has been put back into status Not Photographed and will be republished on [Publish Date] by [admin email]

  • Allow repeated remove/restore cycles without breaking scheduling, or notification flows

Limit condition: Only applies if the product’s last valid status was Not Photographed; otherwise ignore/block the qty update.

Acceptance Criteria

#

Scenario & Gherkin

01

Scenario: Restore removed “Not Photographed” product

Given a product had status Not Photographed with a future publish date and was removed (qty = 0, WooC deleted)

When sales sets quantity to 1 (WooC update or Airtable sync)

Then the WooC product is restored with status Not Photographed
And the publish date is re-applied per scheduling logic
But if the previous status was not Not Photographed, ignore/block the update

02

Scenario: Notifications on restoration

Given the product is restored from Removed to Not Photographed

When status changes back

Then send the “Your bag will be live soon” email to the seller

And post Slack in #syb_bag_was_removed_by_seller: “The [Bagname (w/ link)] [SKU] has been put back into status Not Photographed and will be republished on [Publish Date] by [admin email]”

03

Scenario: Repeatability

Given the product is restored as above

When the restoration completes

Then the product may be removed and restored multiple times without breaking scheduling or notifications

Comments

Leave a Reply