# Generating Order Numbers, Payments, and Email Templates

**URL:** <https://community.glideapps.com/t/generating-order-numbers-payments-and-email-templates/68515>\
**Category:** Ask for Help\
**Created:** [December 8, 2023, 8:43pm UTC](https://community.glideapps.com/t/generating-order-numbers-payments-and-email-templates/68515 "2023-12-08T20:43:33Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![bman737](https://avatars.discourse-cdn.com/v4/letter/b/a88e4f/32.png) [@bman737](https://community.glideapps.com/u/bman737)\
**Post date:** [December 8, 2023, 8:43pm UTC](https://community.glideapps.com/t/generating-order-numbers-payments-and-email-templates/68515/1 "2023-12-08T20:43:33Z")

</div>

1. What is the most efficient way to generate a unique 5 digit order number (ideally sequential)? I need the customer to have a reference number and the RowID is way too long/complicated. I’ve tried through AirTable but it takes too long and I need it to be shown instantly so it should be done natively in Glide.

2. Just to confirm, there’s no current way to accept payments natively in Glide? I need to allow customers the options to pay for orders within the app and to be able to offer them/charge them for add-ons after the main order payment was made. It’s perhaps the biggest hurdle that I have right now and a major feature that I need. Easily accepting payments within Glide helps subsidize the cost of Glide but also makes it possible for us to shift our e-commerce portion to Glide which is the goal. But I’ve watched every Youtube Video and forum post on this and it’s either extremely complicated or prohibitively expensive from another persons template.

3. Right now I’m sending e-mails in Glide based on a Template Column but this is adding a lot of unnecessary columns on my important tables. Is there a more efficient way to do this? Perhaps a template table that contains all the variables and can be used at the time an action is taken in the primary table?

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [December 8, 2023, 9:43pm UTC](https://community.glideapps.com/t/generating-order-numbers-payments-and-email-templates/68515/2 "2023-12-08T21:43:53Z")

</div>

> [@bman737](#):
>
> What is the most efficient way to generate a unique 5 digit order number (ideally sequential)?

This is the best way to do it strictly within Glide.

> [@How do I create an auto-incrementing row number with Glide Tables?](https://community.glideapps.com/t/how-do-i-create-an-auto-incrementing-row-number-with-glide-tables/39572):
>
> This is a question that comes up a lot, so creating this topic to use as a reference. Typically, there are two distinct use cases when it comes to auto-incrementing row numbers. Use Case 1: – We need to generate a Part Number, or an Order Number, or an Employee ID. Once the number is generated, it should never change, even if rows are deleted. – The general approach for this use case is to maintain a static counter, use it to craft a suitably formatted ID, and increment it by one every time…

@Darren_Murphy could probably confirm, but I believe there would still be an issue with duplicate numbers if multiple users generated an order number at the same time. In that case, you would probably have to use an external service to sequentially process and increment the numbers.

---

<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:** [December 8, 2023, 11:58pm UTC](https://community.glideapps.com/t/generating-order-numbers-payments-and-email-templates/68515/3 "2023-12-08T23:58:29Z")

</div>

> [@bman737](#):
>
> Just to confirm, there’s no current way to accept payments natively in Glide?

No, not at the moment, and I don’t think they plan to do it at all considering they’re prioritizing internal apps. The most famous workaround is PayHere, I believe.

You can only send an invoice with the Stripe integration, but it costs 50 updates.

> [@bman737](#):
>
> Right now I’m sending e-mails in Glide based on a Template Column but this is adding a lot of unnecessary columns on my important tables

What do you mean by “unnecessary columns”?

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [December 9, 2023, 1:10am UTC](https://community.glideapps.com/t/generating-order-numbers-payments-and-email-templates/68515/4 "2023-12-09T01:10:27Z")

</div>

I can help you with that…

Check out my new Stripe integration with a shopping cart, and checkout inside the Glide App. You can add new payments to the existing order… create subscriptions… payment links… PDF Invoices… and much more.

> [@credit\_card shopping\_cart Stripe payment integration for Glide and Google sheets with shopping cart](https://community.glideapps.com/t/stripe-payment-integration-for-glide-and-google-sheets-with-shopping-cart/68394):
>
> [Stripe PRO] Stripe PRO The most advanced Stripe Integration for Glide, with a native checkout. This is only for custom builds; we will adjust all functions as promised. shopping cart inventory adjustment single payment subscriptions PDF invoicing payment link generator Google Sheets integration plus much more [[Cart checkout]](https://stripe-pro.glide.page/dl/Cart_checkout)[[Link generator]](https://stripe-pro.glide.page/dl/Payment_Link)[[PDF invoice]](https://stripe-pro.glide.page/dl/User_Profile) You can try this App using a test mode checkout and test card number. (no sign-in is required) To receive the PDF invoice, pleas…

Ps: I’m currently working on the restaurant version for that.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [December 9, 2023, 3:54am UTC](https://community.glideapps.com/t/generating-order-numbers-payments-and-email-templates/68515/5 "2023-12-09T03:54:14Z")

</div>

> [@Jeff\_Hager](#):
>
> @Darren_Murphy could probably confirm, but I believe there would still be an issue with duplicate numbers if multiple users generated an order number at the same time. In that case, you would probably have to use an external service to sequentially process and increment the numbers.

Yes, correct.

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [December 9, 2023, 3:58am UTC](https://community.glideapps.com/t/generating-order-numbers-payments-and-email-templates/68515/6 "2023-12-09T03:58:17Z")

</div>

There is a simple fix for that… use Glide’s unique ID… when the order is finalized, replace it with your own… that’s what I do in my Stripe PRO; I use Glide ID… then I generate the Invoice number.

---

<div class="post-metadata">

**Author:** ![bman737](https://avatars.discourse-cdn.com/v4/letter/b/a88e4f/32.png) [@bman737](https://community.glideapps.com/u/bman737)\
**Post date:** [December 9, 2023, 5:04pm UTC](https://community.glideapps.com/t/generating-order-numbers-payments-and-email-templates/68515/7 "2023-12-09T17:04:07Z")

</div>

Thank you. That’s exactly what I need but unfortunately at $650 it’s beyond the budget that I have left for the project.

---

<div class="post-metadata">

**Author:** ![bman737](https://avatars.discourse-cdn.com/v4/letter/b/a88e4f/32.png) [@bman737](https://community.glideapps.com/u/bman737)\
**Post date:** [December 9, 2023, 5:08pm UTC](https://community.glideapps.com/t/generating-order-numbers-payments-and-email-templates/68515/8 "2023-12-09T17:08:36Z")

</div>

> [@ThinhDinh](#):
>
> What do you mean by “unnecessary columns”?

I need to send different emails/notifications that has user specific order information. That requires me to do a template column that adds the table data in the e-mail body. I’ve had to create over 10+ columns because there are different e-mails/notifications needed… Or perhaps I’m not doing this the most efficient way?

I’m thinking that if I can have all of those template columns be in their own table then I can somehow avoid having to clutter my important main tables with those template columns.

---

<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:** [December 9, 2023, 11:38pm UTC](https://community.glideapps.com/t/generating-order-numbers-payments-and-email-templates/68515/9 "2023-12-09T23:38:15Z")

</div>

I think if it needs to reference the data in that table, then it has to be in that table and you’re not doing anything wrong if you have different columns for different types of notifications.

---

<div class="post-metadata">

**Author:** ![bman737](https://avatars.discourse-cdn.com/v4/letter/b/a88e4f/32.png) [@bman737](https://community.glideapps.com/u/bman737)\
**Post date:** [December 10, 2023, 3:35pm UTC](https://community.glideapps.com/t/generating-order-numbers-payments-and-email-templates/68515/10 "2023-12-10T15:35:36Z")

</div>

Ok, sounds good! Wasn’t sure if there was a more efficient way of doing it or if the amount of columns would decrease the performance and load time of the pages. I will keep them in the main table for the time being

---

<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:** [December 10, 2023, 11:44pm UTC](https://community.glideapps.com/t/generating-order-numbers-payments-and-email-templates/68515/11 "2023-12-10T23:44:24Z")

</div>

> [@bman737](#):
>
> the amount of columns would decrease the performance and load time of the pages.

If it’s just some template columns, I don’t think it will affect things at all.
