function-templates
function-templates copied to clipboard
[template request] MMS ticketing example
It would be nice to have an example template that shows how an MMS powered ticketing could work.
User flow:
- Person visits a website (fictitious "Happy Hour" event website)
- Person enters phone number and name
- Person clicks "Issue ticket"
- Button click will trigger a Twilio Function
- Twilio Function will generate a QR code (this can contain a basic JSON for example with the name)
- QR code is sent together with a message of
Hi ${name}! Thanks for registering for the happy hour event. Here's your ticket!
via Twilio Messaging (SMS withmediaUrl
property)
Files needed
-
index.html
,main.js
andstyles.css
in anassets/
directory for the event website -
issue-ticket.js
infunctions/
to send out the MMS -
generate-qr-code.js
asfunctions/
that receives data in a request parameter to generate a QR code and return it as an image data. (to be usedmediaUrl
prop of the MMS)