Story 48.1 Allowing “Removed” Products back in “Stock”

General Info

Our automation currently marks products as Removed by Seller or Removed from Sale when stock is set to 0, either via WordPress or via the Airtable field “quantity” + sync. Once removed, there is no way to restore the product—this creates a dead end.

Current behaviour:

If we change the quantity back to 1, the product status does not return to “In Stock”, and the order flow for future orders becomes disrupted. Product Statuses in Airtable are incorrectly displayed for future orders. Email notifications may not be sent, and the product may not appear on the website. WordPress continues to display the “Removed on [Date]” tag, even though the product is technically restocked.

We currently only send a Slack notification in #syb_bag_was_removed_by_seller when a seller removes a product via their account. There is no Slack notification when an admin manually removes a product by setting quantity to 0.

Expected behaviour:

This story enables the sales team to restore a removed product by setting the quantity back to 1 (in WordPress or Airtable) and syncing. The product status should return to In Stock, and all standard order flows and notifications should resume as if it had never been removed. Additionally:

  • The WordPress tag should update to “Back in stock on [Date]”

  • Slack notifications should be posted when either sellers or admins remove or restore products

  • When an admin removes a product manually, the admin’s email address should be included in the Slack message

  • All such notifications should be posted in a unified Slack channel renamed to #bag_was_removed

Changes

  • Allow quantity change from 0 → 1 for products with status Removed by Seller or Removed from Sale

  • On sync or manual WooC update:

    • Set product status to Stock in Airtable and InStock in WooC

    • Update or append WooC log: “Back in stock on [Date]”

  • Trigger existing “Product Is Live” email to seller upon restoration

  • Rename Slack channel from #syb_bag_was_removed_by_seller to #bag_was_removed

  • Post Slack message in #bag_was_removed on restoration:

    The [Bagname (w/ link)] [SKU] was put back in stock by [admin email]

  • New: When a product is manually removed by admin (quantity set to 0), post in #bag_was_removed:

    The [Bagname (w/ link)] [SKU] was removed by admin

    admin email: [admin@email.com]

  • Ensure all downstream flows (selling, status transitions, email notifications) behave identically to a standard in-stock or removed product

  • Confirm products can be removed and restored repeatedly without breaking order flows or logging

User Story

As a sales team member,

When I restore a product by changing its quantity from 0 back to 1 and syncing or updating,

Then the product should appear back in stock on the website,

And all order and notification workflows should work exactly as for any in-stock product,

Including sending the standard “Your bag is now live” email to the seller.

As a sales team member,

When a product is manually removed by admin/teammember (quantity set to 0),

Then a Slack message should be sent, just like when a seller removes a product,

Including the admin’s email who triggered the removal,

So the team has visibility into who took the action.

As a sales team member,

I want all removal and restoration messages to appear in a single renamed Slack channel: #bag_was_removed.

Acceptance Criteria

#

Gherkin Scenario

01

Scenario: Restore via WooC quantity update
Given a product status is Removed by Seller or Removed from Sale and quantity = 0
When sales updates quantity to 1 in WordPress and clicks “Update”
Then product status changes to “Stock” in Airtable and appears live on site
And WordPress shows log: “Back in stock on [Date]” next to the product in backend

02

Scenario: Restore via Airtable sync
Given a product status is Removed by Seller or Removed from Sale and quantity = 0
When sales updates quantity to 1 in Airtable and clicks “product sync”
Then product status changes to InStock on site and to Product Status “Stock” in Airtable

03

Scenario: Restoration notification
Given a product has been restored to stock
When status changes back to In Stock from Removed by Seller or Removed from Sale
Then send the existing “Your bag is now live” email to the seller
And send Slack notification in #bag_was_removed: “The [Bagname (w link)] [SKU] was put back in stock by [admin email]”

04

Scenario: Normal sell-through after restoration
Given a restored product with quantity = 1
When a customer purchases the product
Then status transitions to Sold and all sale-related notifications and email flows occur as usual

05

Scenario: Subsequent removals
Given a restored product
When quantity is set back to 0 by admin or removed via automation
Then existing removal workflow and emails execute as before
And the product may be removed and restored multiple times without breaking order flow

06

Scenario: Admin-triggered removal notification
Given a product is manually removed by admin via quantity set to 0 in WordPress or Airtable
When the change is saved or synced
Then post Slack message in #bag_was_removed:“The [Bagname (w/ link)] [SKU] was removed by admin”“admin email: [admin@email.com]”“seller email: [seller@email.com]”

07

Scenario: Rename Slack channel
Given Slack notifications exist for seller and admin removals
When we implement this story
Then rename Slack channel from #syb_bag_was_removed_by_seller to #bag_was_removed
And route all removal/restoration messages there

08

Scenario: Limit removal to valid stock status

Given a product status is currently Stock in Airtable

When a user tries to remove the product by setting the quantity to 0 (via WordPress or Airtable)

Then allow the removal workflow to proceed

But if the product status is not Stock, prevent the removal and show an error or ignore the update

09

Scenario: Send “Bag Removed & Returning” email with tracking link

Given a product is removed (quantity set to 0)

And the field SYB Return Tracking Info is filled with a valid UPS tracking number

When the removal workflow is triggered

Then additionally send the “Your bag is on its way back to you” email to the seller
SYB – 9. Bag returned after removing (S)
SYB – 9 Bag returned after removing (S) DE

And include the UPS tracking link in the email content

Comments

Leave a Reply