# Manage Inventory tied to Ecommerce store

**URL:** https://community.glideapps.com/t/manage-inventory-tied-to-ecommerce-store/34295
**Category:** Ask for Help
**Created:** [November 9, 2021, 9:13pm UTC](https://community.glideapps.com/t/manage-inventory-tied-to-ecommerce-store/34295 "2021-11-09T21:13:38Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Nathan\_Williams](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathan_williams/32/18704_2.png) [@Nathan\_Williams](https://community.glideapps.com/u/Nathan_Williams)
#### Post date: [November 9, 2021, 9:13pm UTC](https://community.glideapps.com/t/manage-inventory-tied-to-ecommerce-store/34295/1 "2021-11-09T21:13:38Z")

</div>

I have created an app utilizing glide sheets that sells courses and products. The products are limited based on inventory on hand. I am needing help creating the relations necessary to manage the inventory based on purchases and then to show a SOLD OUT sign once the item is out of stock. Thanks

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [November 9, 2021, 10:51pm UTC](https://community.glideapps.com/t/manage-inventory-tied-to-ecommerce-store/34295/2 "2021-11-09T22:51:05Z")

</div>

Assuming the items you sold are stored in another table, with a unique value to identify the item (let’s say the itemID), you can create a relation from the Items table to the Sales table using that itemID, do a rollup to count the items sold, subtract it from the original inventory to have the live inventory count.

Then show SOLD OUT when the live inventory count is less than 0.

---

<div class="post-metadata">

### Author: ![Nathan\_Williams](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathan_williams/32/18704_2.png) [@Nathan\_Williams](https://community.glideapps.com/u/Nathan_Williams)
#### Post date: [November 10, 2021, 2:16am UTC](https://community.glideapps.com/t/manage-inventory-tied-to-ecommerce-store/34295/3 "2021-11-10T02:16:00Z")

</div>

How do I create the sales page? I have ran a test cc through the stripe payment system but it never created the test sales page

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [November 10, 2021, 12:27pm UTC](https://community.glideapps.com/t/manage-inventory-tied-to-ecommerce-store/34295/4 "2021-11-10T12:27:23Z")

</div>

So you are using the buy button and the native buying flow in Glide for this?

---

<div class="post-metadata">

### Author: ![Nathan\_Williams](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathan_williams/32/18704_2.png) [@Nathan\_Williams](https://community.glideapps.com/u/Nathan_Williams)
#### Post date: [November 11, 2021, 1:41am UTC](https://community.glideapps.com/t/manage-inventory-tied-to-ecommerce-store/34295/5 "2021-11-11T01:41:33Z")

</div>

Yes I am using the stripe buy button and I have recreated my entire app utilizing google sheets since I see that is the most functional and popular choice.

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [November 11, 2021, 12:39pm UTC](https://community.glideapps.com/t/manage-inventory-tied-to-ecommerce-store/34295/6 "2021-11-11T12:39:36Z")

</div>

Please use this to “duplicate” that Sheet so it’s visible to Glide.

> [@Custom columns in App: Sales sheet](https://community.glideapps.com/t/custom-columns-in-app-sales-sheet/4356/5):
>
> Just use a formula like this in the new sheet. ={'App: Sales'!A1:Z}

However it will consume your row count.
