I have made a simple app where customers can purchase items and select pickup day and timeslot for the order from a restaurant.
But I am really stuck in figuring out how to either include the date/time information in the order confirmation or basically how to make sure that the restaurant gets this vital piece of information.
Any help or pointers much appreciated.
What is your “order confirmation” in this case? Is it an email or something else?
I think you should be able to send all pieces of info you need through a webhook, either separately, or joined together in a template column to send it to the restaurant.
Basically I would hook it up with a transactional email in mailchimp using a scenario in make which is sent out when a new order is placed. But can’t really get my head around how to trigger the webhook.
When using the buy button you get the stripe part but how to get more custom data such as selected pickup day and timeslot is not clear to me.
My theory is that I can make a scenario which triggers when a new row is added to the App: Sales sheet (which the buy button / stripe creates). And combine the customer specific data in that row with other column data in another sheet. Not sure if this will work though.
Ah, so you’re using a buy button flow…
I don’t know if they validate the “description” field, but would you be able to put a template that includes all the info you need as the description field of a buy button?
Then, if that can be written to the Sheet, you can process the joined template to pick out the parts you can to have an email.
You can either trigger the email based on "new rows in the Sheet or have a script to send a payload to a webhook URL.
Thanks! I gave this a try and in theory it should work. But I noticed that the Description field is the only field you can populate with at template. And for some reason the description field data is not passed to the App: Sales sheet. The column is not even generated by default. Strange.
Yeah, I was pretty sure you can’t use a calculated column as the price, due to security reasons, but I thought you can try with the description.
If that doesn’t work, maybe try this flow instead:
- Use a button with the text being something like “Start checkout process”
- Add a row to an Orders table and immediately show the details screen of the added row
- Use the buy button on that row instead. Since you already wrote the things you need in basic columns, that should all then be passed to the App: Sales sheet