# Buy Button Functionality Assistance

**URL:** <https://community.glideapps.com/t/buy-button-functionality-assistance/12331>\
**Category:** Ask for Help\
**Created:** [July 11, 2020, 9:33pm UTC](https://community.glideapps.com/t/buy-button-functionality-assistance/12331 "2020-07-11T21:33:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chima](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/chima/32/2758_2.png) [@Chima](https://community.glideapps.com/u/Chima)\
**Post date:** [July 11, 2020, 9:33pm UTC](https://community.glideapps.com/t/buy-button-functionality-assistance/12331/1 "2020-07-11T21:33:58Z")

</div>

My app has a free portion and a paid portion.

For the paid portion, i’m trying to understand if there is a way to trigger a backend workflow to initiate some actions once a client purchases access to the paid portion.

- When a customer makes a purchase using the buy button, I want when the purchase is complete the customer receives an email confirmation with details of the transaction.

- I also want to automatically make the paid section available based on the customer’s purchase via buy button.

Can anyone assist with this?

---

<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:** [July 12, 2020, 1:00am UTC](https://community.glideapps.com/t/buy-button-functionality-assistance/12331/2 "2020-07-12T01:00:07Z")

</div>

> [@Chima](#):
>
> When a customer makes a purchase using the buy button, I want when the purchase is complete the customer receives an email confirmation with details of the transaction.

You can use a script/Zapier to trigger an email when a new row is added to the ‘App: Sales’ sheet.

> [@Chima](#):
>
> I also want to automatically make the paid section available based on the customer’s purchase via buy button.

Use a VLOOKUP function in your sheet that matches the email in the profiles sheet to the email in the ‘App: Sales’ sheet. If there’s a match (returns something) then assign them to a ‘Premium’ type, set visibility of your paid portion based on that column. You can also do this via the relation column in Glide but you have to duplicate the ‘App: Sales’ sheet using a formula in the Sheets because Glide doesn’t read the ‘App: Sales’ sheet.

---

<div class="post-metadata">

**Author:** ![Chima](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/chima/32/2758_2.png) [@Chima](https://community.glideapps.com/u/Chima)\
**Post date:** [July 12, 2020, 4:57pm UTC](https://community.glideapps.com/t/buy-button-functionality-assistance/12331/3 "2020-07-12T16:57:31Z")

</div>

ThinhDinh- Thanks the zapper scripts feedback seems to work.

Re: Vlookup, when i do what you suggested, i get N/A as returned result. I believe this error is present due to the source sheet (App: Sales) and the purchaser email not being the 1st column. When i change the order of the purchaser email to the 1st column the formula works. But the problem with this is that when a customer make a purchase, the data doesn’t populate in the right fields due to the column reorder.

Re: your 2nd suggestion, “duplicate the ‘App: Sales’ sheet using a formula” if there a way to show me a example of this?

Thanks for the assistance.
